Class KubectlService

java.lang.Object
com.sidneysimmons.kimber.service.KubectlService

public class KubectlService extends Object
Service class for working with the "kubectl" CLI tool.
  • Constructor Details

    • KubectlService

      public KubectlService()
      Default constructor.
  • Method Details

    • getKubectlVersion

      public String getKubectlVersion()
      Get the kubectl version.
      Returns:
      the kubectl version
    • printContexts

      public void printContexts()
      Print the contexts.
    • deleteConfigMap

      public void deleteConfigMap(String configMapName)
      Delete a config map with the given name. Note that this returns successful even if the config map doesn't exist.
      Parameters:
      configMapName - the config map name
    • createConfigMap

      public void createConfigMap(String configMapName, File source)
      Create a config map with the given name and source. The source may be a directory or a file.
      Parameters:
      configMapName - the config map name
      source - the source