public class ClientBuilder
extends java.lang.Object
ApiClient
s in a fluent fashion.Constructor and Description |
---|
ClientBuilder() |
Modifier and Type | Method and Description |
---|---|
io.kubernetes.client.ApiClient |
build() |
static ClientBuilder |
cluster()
Creates a builder which is pre-configured from the cluster configuration.
|
static io.kubernetes.client.ApiClient |
defaultClient()
|
Authentication |
getAuthentication() |
java.lang.String |
getBasePath() |
boolean |
isVerifyingSsl() |
static ClientBuilder |
kubeconfig(KubeConfig config)
Creates a builder which is pre-configured from a
KubeConfig . |
java.lang.String |
overridePatchFormat() |
ClientBuilder |
setAuthentication(Authentication authentication) |
ClientBuilder |
setBasePath(java.lang.String basePath) |
ClientBuilder |
setCertificateAuthority(byte[] caCertBytes) |
ClientBuilder |
setOverridePatchFormat(java.lang.String patchFormat) |
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.ApiClient defaultClient() throws java.io.IOException
standard()
.java.io.IOException
- if the configuration file or a file specified in a configuration file
cannot be read.public static ClientBuilder standard() throws java.io.IOException
java.io.IOException
- if the configuration file or a file specified in a configuration file
cannot be read.public static ClientBuilder standard(boolean persistConfig) throws java.io.IOException
java.io.IOException
public static ClientBuilder cluster() throws java.io.IOException
java.io.IOException
- if the Service Account Token Path or CA Path is not readable.public static ClientBuilder kubeconfig(KubeConfig config) throws java.io.IOException
KubeConfig
.
To load a KubeConfig, see KubeConfig.loadKubeConfig(Reader)
.
config
- The KubeConfig
to configure the builder from.java.io.IOException
- if the files specified in the provided KubeConfig are not readablepublic java.lang.String getBasePath()
public ClientBuilder setBasePath(java.lang.String basePath)
public Authentication getAuthentication()
public ClientBuilder setAuthentication(Authentication authentication)
public ClientBuilder setCertificateAuthority(byte[] caCertBytes)
public boolean isVerifyingSsl()
public ClientBuilder setVerifyingSsl(boolean verifyingSsl)
public java.lang.String overridePatchFormat()
public ClientBuilder setOverridePatchFormat(java.lang.String patchFormat)
public io.kubernetes.client.ApiClient build()
Copyright © 2019. All rights reserved.