public class ClientBuilder extends Object
ApiClients in a fluent fashion.| Constructor and Description |
|---|
ClientBuilder() |
| Modifier and Type | Method and Description |
|---|---|
io.kubernetes.client.openapi.ApiClient |
build() |
static ClientBuilder |
cluster()
Creates a builder which is pre-configured from the cluster configuration.
|
static io.kubernetes.client.openapi.ApiClient |
defaultClient()
|
Authentication |
getAuthentication() |
String |
getBasePath() |
boolean |
isVerifyingSsl() |
static ClientBuilder |
kubeconfig(KubeConfig config)
Creates a builder which is pre-configured from a
KubeConfig. |
static ClientBuilder |
oldCluster()
[DEPRECATED] Creates a builder which is pre-configured from the cluster configuration.
|
ClientBuilder |
setAuthentication(Authentication authentication) |
ClientBuilder |
setBasePath(String basePath) |
protected ClientBuilder |
setBasePath(String host,
String port) |
ClientBuilder |
setCertificateAuthority(byte[] caCertBytes) |
ClientBuilder |
setVerifyingSsl(boolean verifyingSsl) |
static ClientBuilder |
standard()
Creates a builder which is pre-configured in the following way
If $KUBECONFIG is defined, use that config file.
|
static ClientBuilder |
standard(boolean persistConfig) |
public static io.kubernetes.client.openapi.ApiClient defaultClient()
throws IOException
standard().IOException - if the configuration file or a file specified in a configuration file
cannot be read.public static ClientBuilder standard() throws IOException
IOException - if the configuration file or a file specified in a configuration file
cannot be read.public static ClientBuilder standard(boolean persistConfig) throws IOException
IOExceptionpublic static ClientBuilder oldCluster() throws IOException
IOException - if the Service Account Token Path or CA Path is not readable.public static ClientBuilder cluster() throws IOException
IOException - if the Service Account Token Path or CA Path is not readable.protected ClientBuilder setBasePath(String host, String port)
public static ClientBuilder kubeconfig(KubeConfig config) throws IOException
KubeConfig.
To load a KubeConfig, see KubeConfig.loadKubeConfig(Reader).
config - The KubeConfig to configure the builder from.IOException - if the files specified in the provided KubeConfig are not readablepublic String getBasePath()
public ClientBuilder setBasePath(String basePath)
public Authentication getAuthentication()
public ClientBuilder setAuthentication(Authentication authentication)
public ClientBuilder setCertificateAuthority(byte[] caCertBytes)
public boolean isVerifyingSsl()
public ClientBuilder setVerifyingSsl(boolean verifyingSsl)
public io.kubernetes.client.openapi.ApiClient build()
Copyright © 2020. All rights reserved.