Class KubeConfig
java.lang.Object
io.micronaut.kubernetes.client.openapi.config.KubeConfig
Holder for data loaded from the kube config file.
-
Constructor Summary
ConstructorsConstructorDescriptionKubeConfig(@Nullable String kubeConfigPath, Map<String, Object> configMap) Creates a kube config from the supplied config map and source path.KubeConfig(Map<String, Object> configMap) Creates a kube config from the supplied config map. -
Method Summary
Modifier and TypeMethodDescriptionGets a cluster from the current context.Gets a path of the parent folder of the kube config file.getUser()Gets a user from the current context.booleanChecks whether the exec command is provided for getting authentication token.
-
Constructor Details
-
KubeConfig
Creates a kube config from the supplied config map.- Parameters:
configMap- the kube config map- Throws:
IllegalArgumentException- if required kube config fields are missing
-
KubeConfig
Creates a kube config from the supplied config map and source path.- Parameters:
kubeConfigPath- the kube config pathconfigMap- the kube config map- Throws:
IllegalArgumentException- if required kube config fields are missing
-
-
Method Details
-
getCluster
-
getUser
-
getKubeConfigParentPath
-
isExecCommandProvided
public boolean isExecCommandProvided()Checks whether the exec command is provided for getting authentication token.- Returns:
trueif the exec command is provided in the kube config
-