Class KubectlExec

java.lang.Object
io.kubernetes.client.extended.kubectl.KubectlExec
All Implemented Interfaces:
Kubectl.Executable<Integer>

public class KubectlExec extends Object implements Kubectl.Executable<Integer>
  • Method Details

    • command

      public KubectlExec command(String[] command)
    • stdin

      public KubectlExec stdin(boolean stdin)
    • tty

      public KubectlExec tty(boolean tty)
    • onUnhandledError

      public KubectlExec onUnhandledError(Consumer<Throwable> onUnhandledError)
    • execute

      public Integer execute() throws KubectlException
      Description copied from interface: Kubectl.Executable
      Run and retrieve the output from the kubectl helpers.
      Specified by:
      execute in interface Kubectl.Executable<Integer>
      Returns:
      the output, can be Void
      Throws:
      KubectlException - the kubectl exception
    • copyAsync

      protected static Thread copyAsync(InputStream in, OutputStream out, Consumer<Throwable> onUnhandledError)
    • container

      public KubectlExec container(String container)
    • name

      public KubectlExec name(String name)
    • getGenericApi

      protected io.kubernetes.client.util.generic.GenericKubernetesApi<io.kubernetes.client.openapi.models.V1Pod,io.kubernetes.client.common.KubernetesListObject> getGenericApi() throws KubectlException
      Throws:
      KubectlException
    • isNamespaced

      protected boolean isNamespaced(io.kubernetes.client.common.KubernetesObject obj)
    • getGenericApi

      protected io.kubernetes.client.util.generic.GenericKubernetesApi<? extends io.kubernetes.client.common.KubernetesObject,? extends io.kubernetes.client.common.KubernetesListObject> getGenericApi(io.kubernetes.client.common.KubernetesObject targetObj) throws KubectlException
      Throws:
      KubectlException
    • namespace

      public KubectlExec namespace(String namespace)
    • refreshDiscovery

      protected void refreshDiscovery() throws KubectlException
      Throws:
      KubectlException
    • getGenericApi

      protected <ApiType extends io.kubernetes.client.common.KubernetesObject> io.kubernetes.client.util.generic.GenericKubernetesApi<ApiType,? extends io.kubernetes.client.common.KubernetesListObject> getGenericApi(Class<ApiType> apiTypeClass) throws KubectlException
      Throws:
      KubectlException
    • getGenericApi

      protected <ApiType extends io.kubernetes.client.common.KubernetesObject, ApiListType extends io.kubernetes.client.common.KubernetesListObject> io.kubernetes.client.util.generic.GenericKubernetesApi<ApiType,ApiListType> getGenericApi(Class<ApiType> apiTypeClass, Class<ApiListType> apiListTypeClass) throws KubectlException
      Throws:
      KubectlException
    • apiClient

      public KubectlExec apiClient(io.kubernetes.client.openapi.ApiClient apiClient)
    • skipDiscovery

      public KubectlExec skipDiscovery()