Package io.jpostman.kubernetes
Class KubernetesClientFactory
- java.lang.Object
-
- io.jpostman.kubernetes.KubernetesClientFactory
-
public class KubernetesClientFactory extends Object
Creates Kubernetes API clients from kubeconfig or default configuration.
-
-
Constructor Summary
Constructors Constructor Description KubernetesClientFactory()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description io.kubernetes.client.openapi.ApiClientcreateDefaultClient()Creates a Kubernetes API client.static Stringoptional(String name, String defaultValue)
-
-
-
Method Detail
-
createDefaultClient
public io.kubernetes.client.openapi.ApiClient createDefaultClient() throws IOExceptionCreates a Kubernetes API client.If
KUBECONFIGis provided as a Java system property or environment variable, that kubeconfig file is used. If the value is a relative path, this method first checks the working directory and then the test classpath. Otherwise, the default Kubernetes client configuration is used.- Returns:
- configured Kubernetes API client
- Throws:
IOException- if Kubernetes configuration cannot be loaded
-
-