Class KubernetesClientImpl
- java.lang.Object
-
- io.fabric8.kubernetes.client.impl.BaseClient
-
- io.fabric8.kubernetes.client.impl.KubernetesClientImpl
-
- All Implemented Interfaces:
Client
,KubernetesClient
,NamespacedKubernetesClient
,Closeable
,AutoCloseable
public class KubernetesClientImpl extends BaseClient implements NamespacedKubernetesClient
Class for Kubernetes Client implementing KubernetesClient interface. It is thread safe.
-
-
Field Summary
Fields Modifier and Type Field Description static String
KUBERNETES_VERSION_ENDPOINT
static org.slf4j.Logger
logger
-
Fields inherited from class io.fabric8.kubernetes.client.impl.BaseClient
APIS, config, DEFAULT_EXECUTOR_SUPPLIER, httpClient, kubernetesSerialization
-
-
Constructor Summary
Constructors Modifier Constructor Description KubernetesClientImpl(HttpClient httpClient, Config config)
Used by test logicKubernetesClientImpl(HttpClient httpClient, Config config, KubernetesClientBuilder.ExecutorSupplier executorSupplier, KubernetesSerialization kubernetesSerialization)
protected
KubernetesClientImpl(BaseClient client)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AdmissionRegistrationAPIGroupDSL
admissionRegistration()
ApiextensionsAPIGroupDSL
apiextensions()
NonNamespaceOperation<io.fabric8.kubernetes.api.model.APIService,io.fabric8.kubernetes.api.model.APIServiceList,Resource<io.fabric8.kubernetes.api.model.APIService>>
apiServices()
AppsAPIGroupDSL
apps()
AuthenticationAPIGroupDSL
authentication()
AuthorizationAPIGroupDSL
authorization()
AutoscalingAPIGroupDSL
autoscaling()
BatchAPIGroupDSL
batch()
MixedOperation<io.fabric8.kubernetes.api.model.Binding,io.fabric8.kubernetes.api.model.KubernetesResourceList<io.fabric8.kubernetes.api.model.Binding>,Resource<io.fabric8.kubernetes.api.model.Binding>>
bindings()
CertificatesAPIGroupDSL
certificates()
NonNamespaceOperation<io.fabric8.kubernetes.api.model.certificates.v1beta1.CertificateSigningRequest,io.fabric8.kubernetes.api.model.certificates.v1beta1.CertificateSigningRequestList,Resource<io.fabric8.kubernetes.api.model.certificates.v1beta1.CertificateSigningRequest>>
certificateSigningRequests()
NonNamespaceOperation<io.fabric8.kubernetes.api.model.ComponentStatus,io.fabric8.kubernetes.api.model.ComponentStatusList,Resource<io.fabric8.kubernetes.api.model.ComponentStatus>>
componentstatuses()
MixedOperation<io.fabric8.kubernetes.api.model.ConfigMap,io.fabric8.kubernetes.api.model.ConfigMapList,Resource<io.fabric8.kubernetes.api.model.ConfigMap>>
configMaps()
protected KubernetesClientImpl
copy()
protected OperationContext
createInNamespaceContext(String name, boolean any)
DiscoveryAPIGroupDSL
discovery()
DynamicResourceAllocationAPIGroupDSL
dynamicResourceAllocation()
MixedOperation<io.fabric8.kubernetes.api.model.Endpoints,io.fabric8.kubernetes.api.model.EndpointsList,Resource<io.fabric8.kubernetes.api.model.Endpoints>>
endpoints()
EventingAPIGroupDSL
events()
ExtensionsAPIGroupDSL
extensions()
FlowControlAPIGroupDSL
flowControl()
MixedOperation<io.fabric8.kubernetes.api.model.GenericKubernetesResource,io.fabric8.kubernetes.api.model.GenericKubernetesResourceList,Resource<io.fabric8.kubernetes.api.model.GenericKubernetesResource>>
genericKubernetesResources(ResourceDefinitionContext context)
MixedOperation<io.fabric8.kubernetes.api.model.GenericKubernetesResource,io.fabric8.kubernetes.api.model.GenericKubernetesResourceList,Resource<io.fabric8.kubernetes.api.model.GenericKubernetesResource>>
genericKubernetesResources(String apiVersion, String kind)
VersionInfo
getKubernetesVersion()
VersionInfo
getVersion()
NamespacedKubernetesClient
inAnyNamespace()
SharedInformerFactory
informers()
NamespacedKubernetesClient
inNamespace(String name)
LeaderElectorBuilder
leaderElector()
MixedOperation<io.fabric8.kubernetes.api.model.coordination.v1.Lease,io.fabric8.kubernetes.api.model.coordination.v1.LeaseList,Resource<io.fabric8.kubernetes.api.model.coordination.v1.Lease>>
leases()
MixedOperation<io.fabric8.kubernetes.api.model.LimitRange,io.fabric8.kubernetes.api.model.LimitRangeList,Resource<io.fabric8.kubernetes.api.model.LimitRange>>
limitRanges()
NamespaceListVisitFromServerGetDeleteRecreateWaitApplicable<io.fabric8.kubernetes.api.model.HasMetadata>
load(InputStream is)
NonNamespaceOperation<io.fabric8.kubernetes.api.model.Namespace,io.fabric8.kubernetes.api.model.NamespaceList,Resource<io.fabric8.kubernetes.api.model.Namespace>>
namespaces()
NetworkAPIGroupDSL
network()
Client
newClient(RequestConfig requestConfig)
NonNamespaceOperation<io.fabric8.kubernetes.api.model.Node,io.fabric8.kubernetes.api.model.NodeList,Resource<io.fabric8.kubernetes.api.model.Node>>
nodes()
MixedOperation<io.fabric8.kubernetes.api.model.PersistentVolumeClaim,io.fabric8.kubernetes.api.model.PersistentVolumeClaimList,Resource<io.fabric8.kubernetes.api.model.PersistentVolumeClaim>>
persistentVolumeClaims()
NonNamespaceOperation<io.fabric8.kubernetes.api.model.PersistentVolume,io.fabric8.kubernetes.api.model.PersistentVolumeList,Resource<io.fabric8.kubernetes.api.model.PersistentVolume>>
persistentVolumes()
MixedOperation<io.fabric8.kubernetes.api.model.Pod,io.fabric8.kubernetes.api.model.PodList,PodResource>
pods()
PolicyAPIGroupDSL
policy()
RbacAPIGroupDSL
rbac()
protected void
registerDefaultAdapters()
Registers the default adapters for this client.protected void
registerDefaultHandlers()
Registers default handlers for Kubernetes resources.MixedOperation<io.fabric8.kubernetes.api.model.ReplicationController,io.fabric8.kubernetes.api.model.ReplicationControllerList,RollableScalableResource<io.fabric8.kubernetes.api.model.ReplicationController>>
replicationControllers()
NamespaceableResource<io.fabric8.kubernetes.api.model.HasMetadata>
resource(InputStream is)
NamespaceableResource<io.fabric8.kubernetes.api.model.HasMetadata>
resource(String s)
<T extends io.fabric8.kubernetes.api.model.HasMetadata>
NamespaceableResource<T>resource(T item)
NamespaceListVisitFromServerGetDeleteRecreateWaitApplicable<io.fabric8.kubernetes.api.model.HasMetadata>
resourceList(io.fabric8.kubernetes.api.model.HasMetadata... items)
NamespaceListVisitFromServerGetDeleteRecreateWaitApplicable<io.fabric8.kubernetes.api.model.HasMetadata>
resourceList(io.fabric8.kubernetes.api.model.KubernetesResourceList item)
NamespaceListVisitFromServerGetDeleteRecreateWaitApplicable<io.fabric8.kubernetes.api.model.HasMetadata>
resourceList(String s)
NamespaceListVisitFromServerGetDeleteRecreateWaitApplicable<io.fabric8.kubernetes.api.model.HasMetadata>
resourceList(Collection<? extends io.fabric8.kubernetes.api.model.HasMetadata> items)
NamespaceVisitFromServerGetWatchDeleteRecreateWaitApplicableListImpl
resourceListFor(Object item)
MixedOperation<io.fabric8.kubernetes.api.model.ResourceQuota,io.fabric8.kubernetes.api.model.ResourceQuotaList,Resource<io.fabric8.kubernetes.api.model.ResourceQuota>>
resourceQuotas()
RunOperations
run()
NonNamespaceOperation<io.fabric8.kubernetes.api.model.node.v1beta1.RuntimeClass,io.fabric8.kubernetes.api.model.node.v1beta1.RuntimeClassList,Resource<io.fabric8.kubernetes.api.model.node.v1beta1.RuntimeClass>>
runtimeClasses()
SchedulingAPIGroupDSL
scheduling()
MixedOperation<io.fabric8.kubernetes.api.model.Secret,io.fabric8.kubernetes.api.model.SecretList,Resource<io.fabric8.kubernetes.api.model.Secret>>
secrets()
MixedOperation<io.fabric8.kubernetes.api.model.ServiceAccount,io.fabric8.kubernetes.api.model.ServiceAccountList,ServiceAccountResource>
serviceAccounts()
MixedOperation<io.fabric8.kubernetes.api.model.Service,io.fabric8.kubernetes.api.model.ServiceList,ServiceResource<io.fabric8.kubernetes.api.model.Service>>
services()
StorageAPIGroupDSL
storage()
InOutCreateable<io.fabric8.kubernetes.api.model.authentication.TokenReview,io.fabric8.kubernetes.api.model.authentication.TokenReview>
tokenReviews()
MetricAPIGroupDSL
top()
V1APIGroupDSL
v1()
void
visitResources(ApiVisitor visitor)
FunctionCallable<? extends NamespacedKubernetesClient>
withRequestConfig(RequestConfig requestConfig)
-
Methods inherited from class io.fabric8.kubernetes.client.impl.BaseClient
adapt, addToCloseable, close, getAdapters, getApiGroup, getApiGroups, getApiResources, getApiVersion, getAPIVersions, getClosed, getConfiguration, getExecutor, getHandlers, getHttpClient, getKubernetesSerialization, getMasterUrl, getNamespace, getOperationContext, getVersionInfo, hasApiGroup, newClient, newHasMetadataOperation, operationContext, raw, raw, removeFromCloseable, resources, rootPaths, setDerivedFields, setMatchingGroupPredicate, supports, supports, supportsApiPath
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.fabric8.kubernetes.client.Client
adapt, close, getApiGroup, getApiGroups, getApiResources, getApiVersion, getAPIVersions, getConfiguration, getHttpClient, getMasterUrl, getNamespace, hasApiGroup, raw, raw, resources, resources, rootPaths, supports, supports, supportsApiPath
-
Methods inherited from interface io.fabric8.kubernetes.client.KubernetesClient
getKubernetesSerialization, resources
-
-
-
-
Field Detail
-
logger
public static final org.slf4j.Logger logger
-
KUBERNETES_VERSION_ENDPOINT
public static final String KUBERNETES_VERSION_ENDPOINT
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
KubernetesClientImpl
public KubernetesClientImpl(HttpClient httpClient, Config config)
Used by test logic
-
KubernetesClientImpl
public KubernetesClientImpl(HttpClient httpClient, Config config, KubernetesClientBuilder.ExecutorSupplier executorSupplier, KubernetesSerialization kubernetesSerialization)
-
KubernetesClientImpl
protected KubernetesClientImpl(BaseClient client)
-
-
Method Detail
-
registerDefaultAdapters
protected void registerDefaultAdapters()
Registers the default adapters for this client.
-
registerDefaultHandlers
protected void registerDefaultHandlers()
Registers default handlers for Kubernetes resources.
-
inNamespace
public NamespacedKubernetesClient inNamespace(String name)
- Specified by:
inNamespace
in interfaceNamespacedKubernetesClient
-
createInNamespaceContext
protected OperationContext createInNamespaceContext(String name, boolean any)
-
leaderElector
public LeaderElectorBuilder leaderElector()
- Specified by:
leaderElector
in interfaceKubernetesClient
-
withRequestConfig
public FunctionCallable<? extends NamespacedKubernetesClient> withRequestConfig(RequestConfig requestConfig)
- Specified by:
withRequestConfig
in interfaceNamespacedKubernetesClient
-
componentstatuses
public NonNamespaceOperation<io.fabric8.kubernetes.api.model.ComponentStatus,io.fabric8.kubernetes.api.model.ComponentStatusList,Resource<io.fabric8.kubernetes.api.model.ComponentStatus>> componentstatuses()
- Specified by:
componentstatuses
in interfaceKubernetesClient
-
load
public NamespaceListVisitFromServerGetDeleteRecreateWaitApplicable<io.fabric8.kubernetes.api.model.HasMetadata> load(InputStream is)
- Specified by:
load
in interfaceKubernetesClient
-
resourceList
public NamespaceListVisitFromServerGetDeleteRecreateWaitApplicable<io.fabric8.kubernetes.api.model.HasMetadata> resourceList(io.fabric8.kubernetes.api.model.KubernetesResourceList item)
- Specified by:
resourceList
in interfaceKubernetesClient
-
resourceListFor
public NamespaceVisitFromServerGetWatchDeleteRecreateWaitApplicableListImpl resourceListFor(Object item)
-
resourceList
public NamespaceListVisitFromServerGetDeleteRecreateWaitApplicable<io.fabric8.kubernetes.api.model.HasMetadata> resourceList(io.fabric8.kubernetes.api.model.HasMetadata... items)
- Specified by:
resourceList
in interfaceKubernetesClient
-
resourceList
public NamespaceListVisitFromServerGetDeleteRecreateWaitApplicable<io.fabric8.kubernetes.api.model.HasMetadata> resourceList(Collection<? extends io.fabric8.kubernetes.api.model.HasMetadata> items)
- Specified by:
resourceList
in interfaceKubernetesClient
-
resourceList
public NamespaceListVisitFromServerGetDeleteRecreateWaitApplicable<io.fabric8.kubernetes.api.model.HasMetadata> resourceList(String s)
- Specified by:
resourceList
in interfaceKubernetesClient
-
resource
public <T extends io.fabric8.kubernetes.api.model.HasMetadata> NamespaceableResource<T> resource(T item)
- Specified by:
resource
in interfaceKubernetesClient
-
resource
public NamespaceableResource<io.fabric8.kubernetes.api.model.HasMetadata> resource(String s)
- Specified by:
resource
in interfaceKubernetesClient
-
resource
public NamespaceableResource<io.fabric8.kubernetes.api.model.HasMetadata> resource(InputStream is)
- Specified by:
resource
in interfaceKubernetesClient
-
bindings
public MixedOperation<io.fabric8.kubernetes.api.model.Binding,io.fabric8.kubernetes.api.model.KubernetesResourceList<io.fabric8.kubernetes.api.model.Binding>,Resource<io.fabric8.kubernetes.api.model.Binding>> bindings()
- Specified by:
bindings
in interfaceKubernetesClient
-
endpoints
public MixedOperation<io.fabric8.kubernetes.api.model.Endpoints,io.fabric8.kubernetes.api.model.EndpointsList,Resource<io.fabric8.kubernetes.api.model.Endpoints>> endpoints()
- Specified by:
endpoints
in interfaceKubernetesClient
-
namespaces
public NonNamespaceOperation<io.fabric8.kubernetes.api.model.Namespace,io.fabric8.kubernetes.api.model.NamespaceList,Resource<io.fabric8.kubernetes.api.model.Namespace>> namespaces()
- Specified by:
namespaces
in interfaceKubernetesClient
-
nodes
public NonNamespaceOperation<io.fabric8.kubernetes.api.model.Node,io.fabric8.kubernetes.api.model.NodeList,Resource<io.fabric8.kubernetes.api.model.Node>> nodes()
- Specified by:
nodes
in interfaceKubernetesClient
-
persistentVolumes
public NonNamespaceOperation<io.fabric8.kubernetes.api.model.PersistentVolume,io.fabric8.kubernetes.api.model.PersistentVolumeList,Resource<io.fabric8.kubernetes.api.model.PersistentVolume>> persistentVolumes()
- Specified by:
persistentVolumes
in interfaceKubernetesClient
-
persistentVolumeClaims
public MixedOperation<io.fabric8.kubernetes.api.model.PersistentVolumeClaim,io.fabric8.kubernetes.api.model.PersistentVolumeClaimList,Resource<io.fabric8.kubernetes.api.model.PersistentVolumeClaim>> persistentVolumeClaims()
- Specified by:
persistentVolumeClaims
in interfaceKubernetesClient
-
pods
public MixedOperation<io.fabric8.kubernetes.api.model.Pod,io.fabric8.kubernetes.api.model.PodList,PodResource> pods()
- Specified by:
pods
in interfaceKubernetesClient
-
replicationControllers
public MixedOperation<io.fabric8.kubernetes.api.model.ReplicationController,io.fabric8.kubernetes.api.model.ReplicationControllerList,RollableScalableResource<io.fabric8.kubernetes.api.model.ReplicationController>> replicationControllers()
- Specified by:
replicationControllers
in interfaceKubernetesClient
-
resourceQuotas
public MixedOperation<io.fabric8.kubernetes.api.model.ResourceQuota,io.fabric8.kubernetes.api.model.ResourceQuotaList,Resource<io.fabric8.kubernetes.api.model.ResourceQuota>> resourceQuotas()
- Specified by:
resourceQuotas
in interfaceKubernetesClient
-
scheduling
public SchedulingAPIGroupDSL scheduling()
- Specified by:
scheduling
in interfaceKubernetesClient
-
secrets
public MixedOperation<io.fabric8.kubernetes.api.model.Secret,io.fabric8.kubernetes.api.model.SecretList,Resource<io.fabric8.kubernetes.api.model.Secret>> secrets()
- Specified by:
secrets
in interfaceKubernetesClient
-
services
public MixedOperation<io.fabric8.kubernetes.api.model.Service,io.fabric8.kubernetes.api.model.ServiceList,ServiceResource<io.fabric8.kubernetes.api.model.Service>> services()
- Specified by:
services
in interfaceKubernetesClient
-
serviceAccounts
public MixedOperation<io.fabric8.kubernetes.api.model.ServiceAccount,io.fabric8.kubernetes.api.model.ServiceAccountList,ServiceAccountResource> serviceAccounts()
- Specified by:
serviceAccounts
in interfaceKubernetesClient
-
apiServices
public NonNamespaceOperation<io.fabric8.kubernetes.api.model.APIService,io.fabric8.kubernetes.api.model.APIServiceList,Resource<io.fabric8.kubernetes.api.model.APIService>> apiServices()
- Specified by:
apiServices
in interfaceKubernetesClient
-
configMaps
public MixedOperation<io.fabric8.kubernetes.api.model.ConfigMap,io.fabric8.kubernetes.api.model.ConfigMapList,Resource<io.fabric8.kubernetes.api.model.ConfigMap>> configMaps()
- Specified by:
configMaps
in interfaceKubernetesClient
-
limitRanges
public MixedOperation<io.fabric8.kubernetes.api.model.LimitRange,io.fabric8.kubernetes.api.model.LimitRangeList,Resource<io.fabric8.kubernetes.api.model.LimitRange>> limitRanges()
- Specified by:
limitRanges
in interfaceKubernetesClient
-
apiextensions
public ApiextensionsAPIGroupDSL apiextensions()
- Specified by:
apiextensions
in interfaceKubernetesClient
-
certificateSigningRequests
public NonNamespaceOperation<io.fabric8.kubernetes.api.model.certificates.v1beta1.CertificateSigningRequest,io.fabric8.kubernetes.api.model.certificates.v1beta1.CertificateSigningRequestList,Resource<io.fabric8.kubernetes.api.model.certificates.v1beta1.CertificateSigningRequest>> certificateSigningRequests()
- Specified by:
certificateSigningRequests
in interfaceKubernetesClient
-
certificates
public CertificatesAPIGroupDSL certificates()
- Specified by:
certificates
in interfaceKubernetesClient
-
authorization
public AuthorizationAPIGroupDSL authorization()
- Specified by:
authorization
in interfaceKubernetesClient
-
authentication
public AuthenticationAPIGroupDSL authentication()
- Specified by:
authentication
in interfaceKubernetesClient
-
tokenReviews
public InOutCreateable<io.fabric8.kubernetes.api.model.authentication.TokenReview,io.fabric8.kubernetes.api.model.authentication.TokenReview> tokenReviews()
- Specified by:
tokenReviews
in interfaceKubernetesClient
-
genericKubernetesResources
public MixedOperation<io.fabric8.kubernetes.api.model.GenericKubernetesResource,io.fabric8.kubernetes.api.model.GenericKubernetesResourceList,Resource<io.fabric8.kubernetes.api.model.GenericKubernetesResource>> genericKubernetesResources(String apiVersion, String kind)
- Specified by:
genericKubernetesResources
in interfaceKubernetesClient
-
genericKubernetesResources
public MixedOperation<io.fabric8.kubernetes.api.model.GenericKubernetesResource,io.fabric8.kubernetes.api.model.GenericKubernetesResourceList,Resource<io.fabric8.kubernetes.api.model.GenericKubernetesResource>> genericKubernetesResources(ResourceDefinitionContext context)
- Specified by:
genericKubernetesResources
in interfaceKubernetesClient
-
discovery
public DiscoveryAPIGroupDSL discovery()
- Specified by:
discovery
in interfaceKubernetesClient
-
dynamicResourceAllocation
public DynamicResourceAllocationAPIGroupDSL dynamicResourceAllocation()
- Specified by:
dynamicResourceAllocation
in interfaceKubernetesClient
-
events
public EventingAPIGroupDSL events()
- Specified by:
events
in interfaceKubernetesClient
-
inAnyNamespace
public NamespacedKubernetesClient inAnyNamespace()
- Specified by:
inAnyNamespace
in interfaceNamespacedKubernetesClient
-
copy
protected KubernetesClientImpl copy()
-
extensions
public ExtensionsAPIGroupDSL extensions()
- Specified by:
extensions
in interfaceKubernetesClient
-
flowControl
public FlowControlAPIGroupDSL flowControl()
- Specified by:
flowControl
in interfaceKubernetesClient
-
getVersion
public VersionInfo getVersion()
- Specified by:
getVersion
in interfaceKubernetesClient
-
getKubernetesVersion
public VersionInfo getKubernetesVersion()
- Specified by:
getKubernetesVersion
in interfaceKubernetesClient
-
v1
public V1APIGroupDSL v1()
- Specified by:
v1
in interfaceKubernetesClient
-
admissionRegistration
public AdmissionRegistrationAPIGroupDSL admissionRegistration()
- Specified by:
admissionRegistration
in interfaceKubernetesClient
-
apps
public AppsAPIGroupDSL apps()
- Specified by:
apps
in interfaceKubernetesClient
-
autoscaling
public AutoscalingAPIGroupDSL autoscaling()
- Specified by:
autoscaling
in interfaceKubernetesClient
-
network
public NetworkAPIGroupDSL network()
- Specified by:
network
in interfaceKubernetesClient
-
storage
public StorageAPIGroupDSL storage()
- Specified by:
storage
in interfaceKubernetesClient
-
batch
public BatchAPIGroupDSL batch()
- Specified by:
batch
in interfaceKubernetesClient
-
top
public MetricAPIGroupDSL top()
- Specified by:
top
in interfaceKubernetesClient
-
policy
public PolicyAPIGroupDSL policy()
- Specified by:
policy
in interfaceKubernetesClient
-
rbac
public RbacAPIGroupDSL rbac()
- Specified by:
rbac
in interfaceKubernetesClient
-
informers
public SharedInformerFactory informers()
- Specified by:
informers
in interfaceKubernetesClient
-
leases
public MixedOperation<io.fabric8.kubernetes.api.model.coordination.v1.Lease,io.fabric8.kubernetes.api.model.coordination.v1.LeaseList,Resource<io.fabric8.kubernetes.api.model.coordination.v1.Lease>> leases()
- Specified by:
leases
in interfaceKubernetesClient
-
run
public RunOperations run()
- Specified by:
run
in interfaceKubernetesClient
-
runtimeClasses
public NonNamespaceOperation<io.fabric8.kubernetes.api.model.node.v1beta1.RuntimeClass,io.fabric8.kubernetes.api.model.node.v1beta1.RuntimeClassList,Resource<io.fabric8.kubernetes.api.model.node.v1beta1.RuntimeClass>> runtimeClasses()
- Specified by:
runtimeClasses
in interfaceKubernetesClient
-
newClient
public Client newClient(RequestConfig requestConfig)
-
visitResources
public void visitResources(ApiVisitor visitor)
- Specified by:
visitResources
in interfaceKubernetesClient
-
-