Package com.sidneysimmons.kimber.service
Class KubectlService
java.lang.Object
com.sidneysimmons.kimber.service.KubectlService
Service class for working with the "kubectl" CLI tool.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcreateConfigMap(String configMapName, File source) Create a config map with the given name and source.voiddeleteConfigMap(String configMapName) Delete a config map with the given name.Get the kubectl version.voidPrint the contexts.
-
Constructor Details
-
KubectlService
public KubectlService()Default constructor.
-
-
Method Details
-
getKubectlVersion
Get the kubectl version.- Returns:
- the kubectl version
-
printContexts
public void printContexts()Print the contexts. -
deleteConfigMap
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
Create a config map with the given name and source. The source may be a directory or a file.- Parameters:
configMapName- the config map namesource- the source
-