public interface Client extends Closeable
| Modifier and Type | Method and Description |
|---|---|
<C extends Client> |
adapt(Class<C> type)
Adapt the client to another type.
|
void |
close() |
io.fabric8.kubernetes.api.model.APIGroup |
getApiGroup(String name)
Return a single api group
|
io.fabric8.kubernetes.api.model.APIGroupList |
getApiGroups()
Returns the api groups.
|
io.fabric8.kubernetes.api.model.APIResourceList |
getApiResources(String groupVersion)
Return the api resource metadata for the given groupVersion
|
String |
getApiVersion() |
Config |
getConfiguration() |
HttpClient |
getHttpClient() |
URL |
getMasterUrl() |
String |
getNamespace() |
boolean |
hasApiGroup(String apiGroup,
boolean exact)
Checks for the api group.
|
<C extends Client> |
isAdaptable(Class<C> type)
Deprecated.
if the client can test for support, then use adapt(type).isSupported() instead.
|
Client |
newClient(RequestConfig requestConfig)
Creates a new client based upon the current except with a different
RequestConfig. |
default <T extends io.fabric8.kubernetes.api.model.HasMetadata,L extends io.fabric8.kubernetes.api.model.KubernetesResourceList<T>> |
resources(Class<T> resourceType,
Class<L> listClass)
Typed API for managing resources.
|
<T extends io.fabric8.kubernetes.api.model.HasMetadata,L extends io.fabric8.kubernetes.api.model.KubernetesResourceList<T>,R extends Resource<T>> |
resources(Class<T> resourceType,
Class<L> listClass,
Class<R> resourceClass)
Typed API for managing resources.
|
io.fabric8.kubernetes.api.model.RootPaths |
rootPaths() |
<R extends io.fabric8.kubernetes.api.model.KubernetesResource> |
supports(Class<R> type)
Checks the Kubernetes server for support for the given KubernetesResource type.
|
boolean |
supportsApiPath(String path)
Deprecated.
use
supports(Class) instead |
@Deprecated <C extends Client> Boolean isAdaptable(Class<C> type)
C - The target client type.type - The target client class.ExtensionAdapter is found.<R extends io.fabric8.kubernetes.api.model.KubernetesResource> boolean supports(Class<R> type)
The response is not cached, a new check will be performed for each method invocation. In case custom resource definition is installed in between invocations, this method might return different values.
type - to check for supportboolean hasApiGroup(String apiGroup, boolean exact)
apiGroup - to check forexact - true for an exact match<C extends Client> C adapt(Class<C> type)
URL getMasterUrl()
String getApiVersion()
String getNamespace()
io.fabric8.kubernetes.api.model.RootPaths rootPaths()
@Deprecated boolean supportsApiPath(String path)
supports(Class) insteadpath - Path as stringvoid close()
close in interface AutoCloseableclose in interface Closeableio.fabric8.kubernetes.api.model.APIGroupList getApiGroups()
APIGroupList metadataio.fabric8.kubernetes.api.model.APIGroup getApiGroup(String name)
name - of the groupAPIGroup metadataio.fabric8.kubernetes.api.model.APIResourceList getApiResources(String groupVersion)
Use v1 to indicate the core/legacy resources
groupVersion - the groupVersion - group/versionAPIResourceList for the groupVersion<T extends io.fabric8.kubernetes.api.model.HasMetadata,L extends io.fabric8.kubernetes.api.model.KubernetesResourceList<T>,R extends Resource<T>> MixedOperation<T,L,R> resources(Class<T> resourceType, Class<L> listClass, Class<R> resourceClass)
Note: your resource POJO (T in this context) must implement
Namespaced if it is a namespace-scoped resource.
T - represents resource type. If it's a namespaced resource, it must implement
NamespacedL - represents resource list typeR - represents the Resource operation typeresourceType - Class for resourcedefault <T extends io.fabric8.kubernetes.api.model.HasMetadata,L extends io.fabric8.kubernetes.api.model.KubernetesResourceList<T>> MixedOperation<T,L,Resource<T>> resources(Class<T> resourceType, Class<L> listClass)
Note: your resource POJO (T in this context) must implement
Namespaced if it is a namespace-scoped resource.
T - represents resource type. If it's a namespaced resource, it must implement
NamespacedL - represents resource list typeresourceType - Class for resourceClient newClient(RequestConfig requestConfig)
RequestConfig. This client will use independent resources,
and should be closed appropriatelyrequestConfig - HttpClient getHttpClient()
Config getConfiguration()
Copyright © 2015–2023 Red Hat. All rights reserved.