kubernetes: k8s.io/kubernetes/test/e2e/framework/kubectl Index | Files

package kubectl

import "k8s.io/kubernetes/test/e2e/framework/kubectl"


Package Files


func LogFailedContainers Uses

func LogFailedContainers(c clientset.Interface, ns string, logFunc func(ftm string, args ...interface{}))

LogFailedContainers runs `kubectl logs` on a failed containers.

type TestKubeconfig Uses

type TestKubeconfig struct {
    CertDir     string
    Host        string
    KubeConfig  string
    KubeContext string
    KubectlPath string
    Namespace   string // Every test has at least one namespace unless creation is skipped

TestKubeconfig is a struct containing the needed attributes from TestContext and Framework(Namespace).

func NewTestKubeconfig Uses

func NewTestKubeconfig(certdir, host, kubeconfig, kubecontext, kubectlpath, namespace string) *TestKubeconfig

NewTestKubeconfig returns a new Kubeconfig struct instance.

func (*TestKubeconfig) KubectlCmd Uses

func (tk *TestKubeconfig) KubectlCmd(args ...string) *exec.Cmd

KubectlCmd runs the kubectl executable through the wrapper script.

func (*TestKubeconfig) ReadFileViaContainer Uses

func (tk *TestKubeconfig) ReadFileViaContainer(podName, containerName string, path string) (string, error)

ReadFileViaContainer reads a file using kubectl exec cat <path>.

func (*TestKubeconfig) WriteFileViaContainer Uses

func (tk *TestKubeconfig) WriteFileViaContainer(podName, containerName string, path string, contents string) error

WriteFileViaContainer writes a file using kubectl exec echo <contents> > <path> via specified container because of the primitive technique we're using here, we only allow ASCII alphanumeric characters

Package kubectl imports 15 packages (graph) and is imported by 182 packages. Updated 2020-10-08. Refresh now. Tools for package owners.