All Implemented Interfaces:
KubeCmdClient<Kubectl>

public class Kubectl extends BaseCmdKubeClient<Kubectl>
A KubeCmdClient wrapping kubectl.
  • Field Details

  • Constructor Details

    • Kubectl

      public Kubectl()
      Constructs a new Kubectl instance.
    • Kubectl

      public Kubectl(String config)
      Constructs a new Kubectl instance with the specified configuration.
      Parameters:
      config - The configuration to use.
  • Method Details

    • inNamespace

      public Kubectl inNamespace(String namespace)
      Sets the namespace for the Kubectl instance.
      Parameters:
      namespace - The namespace to set.
      Returns:
      A new Kubectl instance with the specified namespace.
    • getCurrentNamespace

      public String getCurrentNamespace()
      Gets the current namespace of the Kubectl instance.
      Returns:
      The current namespace.
    • defaultOlmNamespace

      public String defaultOlmNamespace()
      Gets the default OLM (Operator Lifecycle Manager) namespace.
      Returns:
      The default OLM namespace.
    • cmd

      public String cmd()
      Gets the command name for kubectl.
      Specified by:
      cmd in interface KubeCmdClient<Kubectl>
      Specified by:
      cmd in class BaseCmdKubeClient<Kubectl>
      Returns:
      The command name.
    • getUsername

      public String getUsername()
      Gets the username.
      Returns:
      The username.