Skip to main content

Core Models

V1APIResource

  • APIResource specifies the name of a resource and whether it is namespaced.

Source

PropertyTypeDescription
categoriesstring[]categories is a list of the grouped resources this resource belongs to (e.g. 'all')
groupstringgroup is the preferred group of the resource. Empty implies the group of the containing resource list. For subresources, this may have a different value, for example: Scale".
kindstringkind is the kind for the resource (e.g. 'Foo' is the kind for a resource 'foo')
namestringname is the plural name of the resource.
namespacedbooleannamespaced indicates if a resource is namespaced or not.
shortNamesstring[]shortNames is a list of suggested short names of the resource.
singularNamestringsingularName is the singular name of the resource. This allows clients to handle plural and singular opaquely. The singularName is more correct for reporting status on a single item and both...
storageVersionHashstringThe hash value of the storage version, the version this resource is converted to when written to the data store. Value must be treated as opaque by clients. Only equality comparison on the value is...
verbsstring[]verbs is a list of supported kube verbs (this includes get, list, watch, create, update, patch, delete, deletecollection, and proxy)
versionstringversion is the preferred version of the resource. Empty implies the version of the containing resource list For subresources, this may have a different value, for example: v1 (while inside a v1beta1...

V1APIResourceList

  • APIResourceList is a list of APIResource, it is used to expose the name of the resources supported in a specific group and version, and if the resource is namespaced.

Source

PropertyTypeDescription
apiVersionstringAPIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info:...
groupVersionstringgroupVersion is the group and version this APIResourceList is for.
kindstringKind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info:...
resourcesV1APIResource[]resources contains the name of the resources and if they are namespaced.

Example

import * as k8s from '@kubernetes/client-node';

const kc = new k8s.KubeConfig();
kc.loadFromDefault();
const api = kc.makeApiClient(k8s.AdmissionregistrationV1Api);

const res: k8s.V1APIResourceList = await api.getAPIResources(/* ... */);
console.log(res.groupVersion);

Used by: AdmissionregistrationV1alpha1Api.getAPIResources · AdmissionregistrationV1Api.getAPIResources · AdmissionregistrationV1beta1Api.getAPIResources · ApiextensionsV1Api.getAPIResources · ApiregistrationV1Api.getAPIResources · AppsV1Api.getAPIResources · AuthenticationV1Api.getAPIResources · AuthorizationV1Api.getAPIResources · AutoscalingV1Api.getAPIResources · AutoscalingV2Api.getAPIResources · BatchV1Api.getAPIResources · CertificatesV1alpha1Api.getAPIResources · CertificatesV1Api.getAPIResources · CertificatesV1beta1Api.getAPIResources · CoordinationV1alpha2Api.getAPIResources · CoordinationV1Api.getAPIResources · CoordinationV1beta1Api.getAPIResources · CoreV1Api.getAPIResources · CustomObjectsApi.getAPIResources · DiscoveryV1Api.getAPIResources

and 17 more…

V1APIService

  • APIService represents a server for a particular GroupVersion. Name must be "version.group".

Source

PropertyTypeDescription
apiVersionstringAPIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info:...
kindstringKind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info:...
metadataV1ObjectMeta
specV1APIServiceSpec
statusV1APIServiceStatus

Example

import * as k8s from '@kubernetes/client-node';

const kc = new k8s.KubeConfig();
kc.loadFromDefault();
const api = kc.makeApiClient(k8s.ApiregistrationV1Api);

const body: k8s.V1APIService = {
metadata: { name: 'example' },
spec: { /* ... */ },
};
const res = await api.createAPIService({ body });
console.log(res.metadata?.name);

Used by: ApiregistrationV1Api.createAPIService · ApiregistrationV1Api.readAPIService · ApiregistrationV1Api.readAPIServiceStatus

V1APIServiceCondition

  • APIServiceCondition describes the state of an APIService at a particular point

Source

PropertyTypeDescription
lastTransitionTimeDateLast time the condition transitioned from one status to another.
messagestringHuman-readable message indicating details about last transition.
reasonstringUnique, one-word, CamelCase reason for the condition's last transition.
statusstringStatus is the status of the condition. Can be True, False, Unknown.
typestringType is the type of the condition.

V1APIServiceList

  • APIServiceList is a list of APIService objects.

Source

PropertyTypeDescription
apiVersionstringAPIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info:...
itemsV1APIService[]Items is the list of APIService
kindstringKind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info:...
metadataV1ListMeta

Example

import * as k8s from '@kubernetes/client-node';

const kc = new k8s.KubeConfig();
kc.loadFromDefault();
const api = kc.makeApiClient(k8s.ApiregistrationV1Api);

const res: k8s.V1APIServiceList = await api.listAPIService({ namespace: 'default' });
for (const item of res.items) {
console.log(item.metadata?.name);
}

Used by: ApiregistrationV1Api.listAPIService

V1APIServiceSpec

  • APIServiceSpec contains information for locating and communicating with a server. Only https is supported, though you are able to disable certificate verification.

Source

PropertyTypeDescription
caBundlestringCABundle is a PEM encoded CA bundle which will be used to validate an API server's serving certificate. If unspecified, system trust roots on the apiserver are used.
groupstringGroup is the API group name this server hosts
groupPriorityMinimumnumberGroupPriorityMinimum is the priority this group should have at least. Higher priority means that the group is preferred by clients over lower priority ones. Note that other versions of this group...
insecureSkipTLSVerifybooleanInsecureSkipTLSVerify disables TLS certificate verification when communicating with this server. This is strongly discouraged. You should use the CABundle instead.
versionstringVersion is the API version this server hosts. For example, "v1"
versionPrioritynumberVersionPriority controls the ordering of this API version inside of its group. Must be greater than zero. The primary sort is based on VersionPriority, ordered highest to lowest (20 before 10)....
serviceApiregistrationV1ServiceReference

V1APIServiceStatus

  • APIServiceStatus contains derived information about an API server

Source

PropertyTypeDescription
conditionsV1APIServiceCondition[]Current service state of apiService.

V1Binding

  • Binding ties one object to another; for example, a pod is bound to a node by a scheduler.

Source

PropertyTypeDescription
apiVersionstringAPIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info:...
kindstringKind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info:...
metadataV1ObjectMeta
targetV1ObjectReference

Example

import * as k8s from '@kubernetes/client-node';

const kc = new k8s.KubeConfig();
kc.loadFromDefault();
const api = kc.makeApiClient(k8s.CoreV1Api);

const body: k8s.V1Binding = {
metadata: { name: 'example' },
};
const res = await api.createNamespacedBinding({ namespace: 'default', body });
console.log(res.metadata?.name);

Used by: CoreV1Api.createNamespacedBinding · CoreV1Api.createNamespacedPodBinding

V1ComponentCondition

  • Information about the condition of a component.

Source

PropertyTypeDescription
errorstringCondition error code for a component. For example, a health check error code.
messagestringMessage about the condition for a component. For example, information about a health check.
statusstringStatus of the condition for a component. Valid values for "Healthy": "True", "False", or "Unknown".
typestringType of condition for a component. Valid value: "Healthy"

V1ComponentStatus

  • ComponentStatus (and ComponentStatusList) holds the cluster validation info. Deprecated: This API is deprecated in v1.19+

Source

PropertyTypeDescription
apiVersionstringAPIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info:...
conditionsV1ComponentCondition[]List of component conditions observed
kindstringKind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info:...
metadataV1ObjectMeta

Example

import * as k8s from '@kubernetes/client-node';

const kc = new k8s.KubeConfig();
kc.loadFromDefault();
const api = kc.makeApiClient(k8s.CoreV1Api);

const res: k8s.V1ComponentStatus = await api.readComponentStatus(/* ... */);
console.log(res.conditions);

Used by: CoreV1Api.readComponentStatus

V1ComponentStatusList

  • Status of all the conditions for the component as a list of ComponentStatus objects. Deprecated: This API is deprecated in v1.19+

Source

PropertyTypeDescription
apiVersionstringAPIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info:...
itemsV1ComponentStatus[]List of ComponentStatus objects.
kindstringKind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info:...
metadataV1ListMeta

Example

import * as k8s from '@kubernetes/client-node';

const kc = new k8s.KubeConfig();
kc.loadFromDefault();
const api = kc.makeApiClient(k8s.CoreV1Api);

const res: k8s.V1ComponentStatusList = await api.listComponentStatus({ namespace: 'default' });
for (const item of res.items) {
console.log(item.metadata?.name);
}

Used by: CoreV1Api.listComponentStatus

V1ConfigMap

  • ConfigMap holds configuration data for pods to consume.

Source

PropertyTypeDescription
apiVersionstringAPIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info:...
binaryData{ [key: string]: stringBinaryData contains the binary data. Each key must consist of alphanumeric characters, '-', '_' or '.'. BinaryData can contain byte sequences that are not in the UTF-8 range. The keys stored in...
data{ [key: string]: stringData contains the configuration data. Each key must consist of alphanumeric characters, '-', '_' or '.'. Values with non-UTF-8 byte sequences must use the BinaryData field. The keys stored in...
immutablebooleanImmutable, if set to true, ensures that data stored in the ConfigMap cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to...
kindstringKind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info:...
metadataV1ObjectMeta

Example

import * as k8s from '@kubernetes/client-node';

const kc = new k8s.KubeConfig();
kc.loadFromDefault();
const api = kc.makeApiClient(k8s.CoreV1Api);

const body: k8s.V1ConfigMap = {
metadata: { name: 'example' },
};
const res = await api.createNamespacedConfigMap({ namespace: 'default', body });
console.log(res.metadata?.name);

Used by: CoreV1Api.createNamespacedConfigMap · CoreV1Api.patchNamespacedConfigMap · CoreV1Api.readNamespacedConfigMap

V1ConfigMapEnvSource

  • ConfigMapEnvSource selects a ConfigMap to populate the environment variables with. The contents of the target ConfigMap's Data field will represent the key-value pairs as environment variables.

Source

PropertyTypeDescription
namestringName of the referent. This field is effectively required, but due to backwards compatibility is allowed to be empty. Instances of this type with an empty value here are almost certainly wrong. More...
optionalbooleanSpecify whether the ConfigMap must be defined

V1ConfigMapKeySelector

  • Selects a key from a ConfigMap.

Source

PropertyTypeDescription
keystringThe key to select.
namestringName of the referent. This field is effectively required, but due to backwards compatibility is allowed to be empty. Instances of this type with an empty value here are almost certainly wrong. More...
optionalbooleanSpecify whether the ConfigMap or its key must be defined

V1ConfigMapList

  • ConfigMapList is a resource containing a list of ConfigMap objects.

Source

PropertyTypeDescription
apiVersionstringAPIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info:...
itemsV1ConfigMap[]Items is the list of ConfigMaps.
kindstringKind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info:...
metadataV1ListMeta

Example

import * as k8s from '@kubernetes/client-node';

const kc = new k8s.KubeConfig();
kc.loadFromDefault();
const api = kc.makeApiClient(k8s.CoreV1Api);

const res: k8s.V1ConfigMapList = await api.listNamespacedConfigMap({ namespace: 'default' });
for (const item of res.items) {
console.log(item.metadata?.name);
}

Used by: CoreV1Api.listConfigMapForAllNamespaces · CoreV1Api.listNamespacedConfigMap

V1ConfigMapNodeConfigSource

Source

PropertyTypeDescription
kubeletConfigKeystringKubeletConfigKey declares which key of the referenced ConfigMap corresponds to the KubeletConfiguration structure This field is required in all cases.
namestringName is the metadata.name of the referenced ConfigMap. This field is required in all cases.
namespacestringNamespace is the metadata.namespace of the referenced ConfigMap. This field is required in all cases.
resourceVersionstringResourceVersion is the metadata.ResourceVersion of the referenced ConfigMap. This field is forbidden in Node.Spec, and required in Node.Status.
uidstringUID is the metadata.UID of the referenced ConfigMap. This field is forbidden in Node.Spec, and required in Node.Status.

V1ConfigMapProjection

  • Adapts a ConfigMap into a projected volume. The contents of the target ConfigMap's Data field will be presented in a projected volume as files using the keys in the Data field as the file names, unless the items element is populated with specific mappings of keys to paths. Note that this is identical to a configmap volume source without the default mode.

Source

PropertyTypeDescription
itemsV1KeyToPath[]items if unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the...
namestringName of the referent. This field is effectively required, but due to backwards compatibility is allowed to be empty. Instances of this type with an empty value here are almost certainly wrong. More...
optionalbooleanoptional specify whether the ConfigMap or its keys must be defined

V1ConfigMapVolumeSource

  • Adapts a ConfigMap into a volume. The contents of the target ConfigMap's Data field will be presented in a volume as files using the keys in the Data field as the file names, unless the items element is populated with specific mappings of keys to paths. ConfigMap volumes support ownership management and SELinux relabeling.

Source

PropertyTypeDescription
defaultModenumberdefaultMode is optional: mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and...
itemsV1KeyToPath[]items if unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the...
namestringName of the referent. This field is effectively required, but due to backwards compatibility is allowed to be empty. Instances of this type with an empty value here are almost certainly wrong. More...
optionalbooleanoptional specify whether the ConfigMap or its keys must be defined

V1Endpoint

  • Endpoint represents a single logical "backend" implementing a service.

Source

PropertyTypeDescription
addressesstring[]addresses of this endpoint. For EndpointSlices of addressType "IPv4" or "IPv6", the values are IP addresses in canonical form. The syntax and semantics of other addressType values are not...
deprecatedTopology{ [key: string]: stringdeprecatedTopology contains topology information part of the v1beta1 API. This field is deprecated, and will be removed when the v1beta1 API is removed (no sooner than kubernetes v1.24). While this...
hostnamestringhostname of this endpoint. This field may be used by consumers of endpoints to distinguish endpoints from each other (e.g. in DNS names). Multiple endpoints which use the same hostname should be...
nodeNamestringnodeName represents the name of the Node hosting this endpoint. This can be used to determine endpoints local to a Node.
zonestringzone is the name of the Zone this endpoint exists in.
conditionsV1EndpointConditions
hintsV1EndpointHints
targetRefV1ObjectReference

V1EndpointAddress

  • EndpointAddress is a tuple that describes single IP address. Deprecated: This API is deprecated in v1.33+.

Source

PropertyTypeDescription
hostnamestringThe Hostname of this endpoint
ipstringThe IP of this endpoint. May not be loopback (127.0.0.0/8 or ::1), link-local (169.254.0.0/16 or fe80::/10), or link-local multicast (224.0.0.0/24 or ff02::/16).
nodeNamestringOptional: Node hosting this endpoint. This can be used to determine endpoints local to a node.
targetRefV1ObjectReference

V1EndpointConditions

  • EndpointConditions represents the current condition of an endpoint.

Source

PropertyTypeDescription
readybooleanready indicates that this endpoint is ready to receive traffic, according to whatever system is managing the endpoint. A nil value should be interpreted as "true". In general, an endpoint should be...
servingbooleanserving indicates that this endpoint is able to receive traffic, according to whatever system is managing the endpoint. For endpoints backed by pods, the EndpointSlice controller will mark the...
terminatingbooleanterminating indicates that this endpoint is terminating. A nil value should be interpreted as "false".

V1EndpointHints

  • EndpointHints provides hints describing how an endpoint should be consumed.

Source

PropertyTypeDescription
forNodesV1ForNode[]forNodes indicates the node(s) this endpoint should be consumed by when using topology aware routing. May contain a maximum of 8 entries.
forZonesV1ForZone[]forZones indicates the zone(s) this endpoint should be consumed by when using topology aware routing. May contain a maximum of 8 entries.

V1EndpointSlice

  • EndpointSlice represents a set of service endpoints. Most EndpointSlices are created by the EndpointSlice controller to represent the Pods selected by Service objects. For a given service there may be multiple EndpointSlice objects which must be joined to produce the full set of endpoints; you can find all of the slices for a given service by listing EndpointSlices in the service's namespace whose kubernetes.io/service-name label contains the service's name.

Source

PropertyTypeDescription
addressTypestringaddressType specifies the type of address carried by this EndpointSlice. All addresses in this slice must be the same type. This field is immutable after creation. The following address types are...
apiVersionstringAPIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info:...
endpointsV1Endpoint[]endpoints is a list of unique endpoints in this slice. Each slice may include a maximum of 1000 endpoints.
kindstringKind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info:...
portsDiscoveryV1EndpointPort[]ports specifies the list of network ports exposed by each endpoint in this slice. Each port must have a unique name. Each slice may include a maximum of 100 ports. Services always have at least 1...
metadataV1ObjectMeta

Example

import * as k8s from '@kubernetes/client-node';

const kc = new k8s.KubeConfig();
kc.loadFromDefault();
const api = kc.makeApiClient(k8s.DiscoveryV1Api);

const body: k8s.V1EndpointSlice = {
metadata: { name: 'example' },
};
const res = await api.createNamespacedEndpointSlice({ namespace: 'default', body });
console.log(res.metadata?.name);

Used by: DiscoveryV1Api.createNamespacedEndpointSlice · DiscoveryV1Api.patchNamespacedEndpointSlice · DiscoveryV1Api.readNamespacedEndpointSlice

V1EndpointSliceList

  • EndpointSliceList represents a list of endpoint slices

Source

PropertyTypeDescription
apiVersionstringAPIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info:...
itemsV1EndpointSlice[]items is the list of endpoint slices
kindstringKind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info:...
metadataV1ListMeta

Example

import * as k8s from '@kubernetes/client-node';

const kc = new k8s.KubeConfig();
kc.loadFromDefault();
const api = kc.makeApiClient(k8s.DiscoveryV1Api);

const res: k8s.V1EndpointSliceList = await api.listNamespacedEndpointSlice({ namespace: 'default' });
for (const item of res.items) {
console.log(item.metadata?.name);
}

Used by: DiscoveryV1Api.listEndpointSliceForAllNamespaces · DiscoveryV1Api.listNamespacedEndpointSlice

V1EndpointSubset

  • EndpointSubset is a group of addresses with a common set of ports. The expanded set of endpoints is the Cartesian product of Addresses x Ports. For example, given: { Addresses: [{"ip": "10.10.1.1"}, {"ip": "10.10.2.2"}], Ports: [{"name": "a", "port": 8675}, {"name": "b", "port": 309}] } The resulting set of endpoints can be viewed as: a: [ 10.10.1.1:8675, 10.10.2.2:8675 ], b: [ 10.10.1.1:309, 10.10.2.2:309 ] Deprecated: This API is deprecated in v1.33+.

Source

PropertyTypeDescription
addressesV1EndpointAddress[]IP addresses which offer the related ports that are marked as ready. These endpoints should be considered safe for load balancers and clients to utilize.
notReadyAddressesV1EndpointAddress[]IP addresses which offer the related ports but are not currently marked as ready because they have not yet finished starting, have recently failed a readiness check, or have recently failed a...
portsCoreV1EndpointPort[]Port numbers available on the related IP addresses.

V1Endpoints

  • Endpoints is a collection of endpoints that implement the actual service. Example: Name: "mysvc", Subsets: [ { Addresses: [{"ip": "10.10.1.1"}, {"ip": "10.10.2.2"}], Ports: [{"name": "a", "port": 8675}, {"name": "b", "port": 309}] }, { Addresses: [{"ip": "10.10.3.3"}], Ports: [{"name": "a", "port": 93}, {"name": "b", "port": 76}] }, ] Endpoints is a legacy API and does not contain information about all Service features. Use discoveryv1.EndpointSlice for complete information about Service endpoints. Deprecated: This API is deprecated in v1.33+. Use discoveryv1.EndpointSlice.

Source

PropertyTypeDescription
apiVersionstringAPIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info:...
kindstringKind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info:...
subsetsV1EndpointSubset[]The set of all endpoints is the union of all subsets. Addresses are placed into subsets according to the IPs they share. A single address with multiple ports, some of which are ready and some of...
metadataV1ObjectMeta

Example

import * as k8s from '@kubernetes/client-node';

const kc = new k8s.KubeConfig();
kc.loadFromDefault();
const api = kc.makeApiClient(k8s.CoreV1Api);

const body: k8s.V1Endpoints = {
metadata: { name: 'example' },
};
const res = await api.createNamespacedEndpoints({ namespace: 'default', body });
console.log(res.metadata?.name);

Used by: CoreV1Api.createNamespacedEndpoints · CoreV1Api.patchNamespacedEndpoints · CoreV1Api.readNamespacedEndpoints

V1EndpointsList

  • EndpointsList is a list of endpoints. Deprecated: This API is deprecated in v1.33+.

Source

PropertyTypeDescription
apiVersionstringAPIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info:...
itemsV1Endpoints[]List of endpoints.
kindstringKind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info:...
metadataV1ListMeta

Example

import * as k8s from '@kubernetes/client-node';

const kc = new k8s.KubeConfig();
kc.loadFromDefault();
const api = kc.makeApiClient(k8s.CoreV1Api);

const res: k8s.V1EndpointsList = await api.listNamespacedEndpoints({ namespace: 'default' });
for (const item of res.items) {
console.log(item.metadata?.name);
}

Used by: CoreV1Api.listEndpointsForAllNamespaces · CoreV1Api.listNamespacedEndpoints

V1LimitRange

  • LimitRange sets resource usage limits for each kind of resource in a Namespace.

Source

PropertyTypeDescription
apiVersionstringAPIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info:...
kindstringKind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info:...
metadataV1ObjectMeta
specV1LimitRangeSpec

Example

import * as k8s from '@kubernetes/client-node';

const kc = new k8s.KubeConfig();
kc.loadFromDefault();
const api = kc.makeApiClient(k8s.CoreV1Api);

const body: k8s.V1LimitRange = {
metadata: { name: 'example' },
spec: { /* ... */ },
};
const res = await api.createNamespacedLimitRange({ namespace: 'default', body });
console.log(res.metadata?.name);

Used by: CoreV1Api.createNamespacedLimitRange · CoreV1Api.patchNamespacedLimitRange · CoreV1Api.readNamespacedLimitRange

V1LimitRangeItem

  • LimitRangeItem defines a min/max usage limit for any resource that matches on kind.

Source

PropertyTypeDescription
_default{ [key: string]: stringDefault resource requirement limit value by resource name if resource limit is omitted.
defaultRequest{ [key: string]: stringDefaultRequest is the default resource requirement request value by resource name if resource request is omitted.
max{ [key: string]: stringMax usage constraints on this kind by resource name.
maxLimitRequestRatio{ [key: string]: stringMaxLimitRequestRatio if specified, the named resource must have a request and limit that are both non-zero where limit divided by request is less than or equal to the enumerated value; this...
min{ [key: string]: stringMin usage constraints on this kind by resource name.
typestringType of resource that this limit applies to.

V1LimitRangeList

  • LimitRangeList is a list of LimitRange items.

Source

PropertyTypeDescription
apiVersionstringAPIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info:...
itemsV1LimitRange[]Items is a list of LimitRange objects. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
kindstringKind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info:...
metadataV1ListMeta

Example

import * as k8s from '@kubernetes/client-node';

const kc = new k8s.KubeConfig();
kc.loadFromDefault();
const api = kc.makeApiClient(k8s.CoreV1Api);

const res: k8s.V1LimitRangeList = await api.listNamespacedLimitRange({ namespace: 'default' });
for (const item of res.items) {
console.log(item.metadata?.name);
}

Used by: CoreV1Api.listLimitRangeForAllNamespaces · CoreV1Api.listNamespacedLimitRange

V1LimitRangeSpec

  • LimitRangeSpec defines a min/max usage limit for resources that match on kind.

Source

PropertyTypeDescription
limitsV1LimitRangeItem[]Limits is the list of LimitRangeItem objects that are enforced.

V1Namespace

  • Namespace provides a scope for Names. Use of multiple namespaces is optional.

Source

PropertyTypeDescription
apiVersionstringAPIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info:...
kindstringKind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info:...
metadataV1ObjectMeta
specV1NamespaceSpec
statusV1NamespaceStatus

Example

import * as k8s from '@kubernetes/client-node';

const kc = new k8s.KubeConfig();
kc.loadFromDefault();
const api = kc.makeApiClient(k8s.CoreV1Api);

const body: k8s.V1Namespace = {
metadata: { name: 'example' },
spec: { /* ... */ },
};
const res = await api.createNamespace({ body });
console.log(res.metadata?.name);

Used by: CoreV1Api.createNamespace · CoreV1Api.readNamespace · CoreV1Api.readNamespaceStatus

V1NamespaceCondition

  • NamespaceCondition contains details about state of namespace.

Source

PropertyTypeDescription
lastTransitionTimeDateLast time the condition transitioned from one status to another.
messagestringHuman-readable message indicating details about last transition.
reasonstringUnique, one-word, CamelCase reason for the condition's last transition.
statusstringStatus of the condition, one of True, False, Unknown.
typestringType of namespace controller condition.

V1NamespaceList

  • NamespaceList is a list of Namespaces.

Source

PropertyTypeDescription
apiVersionstringAPIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info:...
itemsV1Namespace[]Items is the list of Namespace objects in the list. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/
kindstringKind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info:...
metadataV1ListMeta

Example

import * as k8s from '@kubernetes/client-node';

const kc = new k8s.KubeConfig();
kc.loadFromDefault();
const api = kc.makeApiClient(k8s.CoreV1Api);

const res: k8s.V1NamespaceList = await api.listNamespace({ namespace: 'default' });
for (const item of res.items) {
console.log(item.metadata?.name);
}

Used by: CoreV1Api.listNamespace

V1NamespaceSpec

  • NamespaceSpec describes the attributes on a Namespace.

Source

PropertyTypeDescription
finalizersstring[]Finalizers is an opaque list of values that must be empty to permanently remove object from storage. More info: https://kubernetes.io/docs/tasks/administer-cluster/namespaces/

V1NamespaceStatus

  • NamespaceStatus is information about the current status of a Namespace.

Source

PropertyTypeDescription
conditionsV1NamespaceCondition[]Represents the latest available observations of a namespace's current state.
phasestringPhase is the current lifecycle phase of the namespace. More info: https://kubernetes.io/docs/tasks/administer-cluster/namespaces/

V1Node

  • Node is a worker node in Kubernetes. Each node will have a unique identifier in the cache (i.e. in etcd).

Source

PropertyTypeDescription
apiVersionstringAPIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info:...
kindstringKind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info:...
metadataV1ObjectMeta
specV1NodeSpec
statusV1NodeStatus

Example

import * as k8s from '@kubernetes/client-node';

const kc = new k8s.KubeConfig();
kc.loadFromDefault();
const api = kc.makeApiClient(k8s.CoreV1Api);

const body: k8s.V1Node = {
metadata: { name: 'example' },
spec: { /* ... */ },
};
const res = await api.createNode({ body });
console.log(res.metadata?.name);

Used by: CoreV1Api.createNode · CoreV1Api.readNode · CoreV1Api.readNodeStatus

V1NodeAddress

  • NodeAddress contains information for the node's address.

Source

PropertyTypeDescription
addressstringThe node address.
typestringNode address type, one of Hostname, ExternalIP or InternalIP.

V1NodeAffinity

  • Node affinity is a group of node affinity scheduling rules.

Source

PropertyTypeDescription
preferredDuringSchedulingIgnoredDuringExecutionV1PreferredSchedulingTerm[]The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that...
requiredDuringSchedulingIgnoredDuringExecutionV1NodeSelector

V1NodeCondition

  • NodeCondition contains condition information for a node.

Source

PropertyTypeDescription
lastHeartbeatTimeDateLast time we got an update on a given condition.
lastTransitionTimeDateLast time the condition transit from one status to another.
messagestringHuman readable message indicating details about last transition.
reasonstring(brief) reason for the condition's last transition.
statusstringStatus of the condition, one of True, False, Unknown.
typestringType of node condition.

V1NodeConfigSource

  • NodeConfigSource specifies a source of node configuration. Exactly one subfield (excluding metadata) must be non-nil. This API is deprecated since 1.22

Source

PropertyTypeDescription
configMapV1ConfigMapNodeConfigSource

V1NodeConfigStatus

  • NodeConfigStatus describes the status of the config assigned by Node.Spec.ConfigSource.

Source

PropertyTypeDescription
errorstringError describes any problems reconciling the Spec.ConfigSource to the Active config. Errors may occur, for example, attempting to checkpoint Spec.ConfigSource to the local Assigned record, attempting...
activeV1NodeConfigSource
assignedV1NodeConfigSource
lastKnownGoodV1NodeConfigSource

V1NodeDaemonEndpoints

  • NodeDaemonEndpoints lists ports opened by daemons running on the Node.

Source

PropertyTypeDescription
kubeletEndpointV1DaemonEndpoint

V1NodeFeatures

  • NodeFeatures describes the set of features implemented by the CRI implementation. The features contained in the NodeFeatures should depend only on the cri implementation independent of runtime handlers.

Source

PropertyTypeDescription
supplementalGroupsPolicybooleanSupplementalGroupsPolicy is set to true if the runtime supports SupplementalGroupsPolicy and ContainerUser.

V1NodeList

  • NodeList is the whole list of all Nodes which have been registered with master.

Source

PropertyTypeDescription
apiVersionstringAPIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info:...
itemsV1Node[]List of nodes
kindstringKind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info:...
metadataV1ListMeta

Example

import * as k8s from '@kubernetes/client-node';

const kc = new k8s.KubeConfig();
kc.loadFromDefault();
const api = kc.makeApiClient(k8s.CoreV1Api);

const res: k8s.V1NodeList = await api.listNode({ namespace: 'default' });
for (const item of res.items) {
console.log(item.metadata?.name);
}

Used by: CoreV1Api.listNode

V1NodeRuntimeHandler

  • NodeRuntimeHandler is a set of runtime handler information.

Source

PropertyTypeDescription
namestringRuntime handler name. Empty for the default runtime handler.
featuresV1NodeRuntimeHandlerFeatures

V1NodeRuntimeHandlerFeatures

  • NodeRuntimeHandlerFeatures is a set of features implemented by the runtime handler.

Source

PropertyTypeDescription
recursiveReadOnlyMountsbooleanRecursiveReadOnlyMounts is set to true if the runtime handler supports RecursiveReadOnlyMounts.
userNamespacesbooleanUserNamespaces is set to true if the runtime handler supports UserNamespaces, including for volumes.

V1NodeSelector

  • A node selector represents the union of the results of one or more label queries over a set of nodes; that is, it represents the OR of the selectors represented by the node selector terms.

Source

PropertyTypeDescription
nodeSelectorTermsV1NodeSelectorTerm[]Required. A list of node selector terms. The terms are ORed.

V1NodeSelectorRequirement

  • A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values.

Source

PropertyTypeDescription
keystringThe label key that the selector applies to.
operatorstringRepresents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.
valuesstring[]An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt,...

V1NodeSelectorTerm

  • A null or empty node selector term matches no objects. The requirements of them are ANDed. The TopologySelectorTerm type implements a subset of the NodeSelectorTerm.

Source

PropertyTypeDescription
matchExpressionsV1NodeSelectorRequirement[]A list of node selector requirements by node's labels.
matchFieldsV1NodeSelectorRequirement[]A list of node selector requirements by node's fields.

V1NodeSpec

  • NodeSpec describes the attributes that a node is created with.

Source

PropertyTypeDescription
externalIDstringDeprecated. Not all kubelets will set this field. Remove field after 1.13. see: https://issues.k8s.io/61966
podCIDRstringPodCIDR represents the pod IP range assigned to the node.
podCIDRsstring[]podCIDRs represents the IP ranges assigned to the node for usage by Pods on that node. If this field is specified, the 0th entry must match the podCIDR field. It may contain at most 1 value for each...
providerIDstringID of the node assigned by the cloud provider in the format: ://
taintsV1Taint[]If specified, the node's taints.
unschedulablebooleanUnschedulable controls node schedulability of new pods. By default, node is schedulable. More info: https://kubernetes.io/docs/concepts/nodes/node/#manual-node-administration
configSourceV1NodeConfigSource

V1NodeStatus

  • NodeStatus is information about the current status of a node.

Source

PropertyTypeDescription
addressesV1NodeAddress[]List of addresses reachable to the node. Queried from cloud provider, if available. More info: https://kubernetes.io/docs/reference/node/node-status/#addresses Note: This field is declared as...
allocatable{ [key: string]: stringAllocatable represents the resources of a node that are available for scheduling. Defaults to Capacity.
capacity{ [key: string]: stringCapacity represents the total resources of a node. More info: https://kubernetes.io/docs/reference/node/node-status/#capacity
conditionsV1NodeCondition[]Conditions is an array of current observed node conditions. More info: https://kubernetes.io/docs/reference/node/node-status/#condition
declaredFeaturesstring[]DeclaredFeatures represents the features related to feature gates that are declared by the node.
imagesV1ContainerImage[]List of container images on this node
phasestringNodePhase is the recently observed lifecycle phase of the node. More info: https://kubernetes.io/docs/concepts/nodes/node/#phase The field is never populated, and now is deprecated.
runtimeHandlersV1NodeRuntimeHandler[]The available runtime handlers.
volumesAttachedV1AttachedVolume[]List of volumes that are attached to the node.
volumesInUsestring[]List of attachable volumes in use (mounted) by the node.
configV1NodeConfigStatus
daemonEndpointsV1NodeDaemonEndpoints
featuresV1NodeFeatures
nodeInfoV1NodeSystemInfo

V1NodeSwapStatus

  • NodeSwapStatus represents swap memory information.

Source

PropertyTypeDescription
capacitynumberTotal amount of swap memory in bytes.

V1NodeSystemInfo

  • NodeSystemInfo is a set of ids/uuids to uniquely identify the node.

Source

PropertyTypeDescription
architecturestringThe Architecture reported by the node
bootIDstringBoot ID reported by the node.
containerRuntimeVersionstringContainerRuntime Version reported by the node through runtime remote API (e.g. containerd://1.4.2).
kernelVersionstringKernel Version reported by the node from 'uname -r' (e.g. 3.16.0-0.bpo.4-amd64).
kubeProxyVersionstringDeprecated: KubeProxy Version reported by the node.
kubeletVersionstringKubelet Version reported by the node.
machineIDstringMachineID reported by the node. For unique machine identification in the cluster this field is preferred. Learn more from man(5) machine-id: http://man7.org/linux/man-pages/man5/machine-id.5.html
operatingSystemstringThe Operating System reported by the node
osImagestringOS Image reported by the node from /etc/os-release (e.g. Debian GNU/Linux 7 (wheezy)).
systemUUIDstringSystemUUID reported by the node. For unique machine identification MachineID is preferred. This field is specific to Red Hat hosts...
swapV1NodeSwapStatus

V1PersistentVolume

Source

PropertyTypeDescription
apiVersionstringAPIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info:...
kindstringKind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info:...
metadataV1ObjectMeta
specV1PersistentVolumeSpec
statusV1PersistentVolumeStatus

Example

import * as k8s from '@kubernetes/client-node';

const kc = new k8s.KubeConfig();
kc.loadFromDefault();
const api = kc.makeApiClient(k8s.CoreV1Api);

const body: k8s.V1PersistentVolume = {
metadata: { name: 'example' },
spec: { /* ... */ },
};
const res = await api.createPersistentVolume({ body });
console.log(res.metadata?.name);

Used by: CoreV1Api.createPersistentVolume · CoreV1Api.readPersistentVolume · CoreV1Api.readPersistentVolumeStatus

V1PersistentVolumeClaim

  • PersistentVolumeClaim is a user's request for and claim to a persistent volume

Source

PropertyTypeDescription
apiVersionstringAPIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info:...
kindstringKind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info:...
metadataV1ObjectMeta
specV1PersistentVolumeClaimSpec
statusV1PersistentVolumeClaimStatus

Example

import * as k8s from '@kubernetes/client-node';

const kc = new k8s.KubeConfig();
kc.loadFromDefault();
const api = kc.makeApiClient(k8s.CoreV1Api);

const body: k8s.V1PersistentVolumeClaim = {
metadata: { name: 'example' },
spec: { /* ... */ },
};
const res = await api.createNamespacedPersistentVolumeClaim({ namespace: 'default', body });
console.log(res.metadata?.name);

Used by: CoreV1Api.createNamespacedPersistentVolumeClaim · CoreV1Api.readNamespacedPersistentVolumeClaim · CoreV1Api.readNamespacedPersistentVolumeClaimStatus

V1PersistentVolumeClaimCondition

  • PersistentVolumeClaimCondition contains details about state of pvc

Source

PropertyTypeDescription
lastProbeTimeDatelastProbeTime is the time we probed the condition.
lastTransitionTimeDatelastTransitionTime is the time the condition transitioned from one status to another.
messagestringmessage is the human-readable message indicating details about last transition.
reasonstringreason is a unique, this should be a short, machine understandable string that gives the reason for condition's last transition. If it reports "Resizing" that means the underlying persistent...
statusstringStatus is the status of the condition. Can be True, False, Unknown. More info:...
typestringType is the type of the condition. More info:...

V1PersistentVolumeClaimList

  • PersistentVolumeClaimList is a list of PersistentVolumeClaim items.

Source

PropertyTypeDescription
apiVersionstringAPIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info:...
itemsV1PersistentVolumeClaim[]items is a list of persistent volume claims. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims
kindstringKind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info:...
metadataV1ListMeta

Example

import * as k8s from '@kubernetes/client-node';

const kc = new k8s.KubeConfig();
kc.loadFromDefault();
const api = kc.makeApiClient(k8s.CoreV1Api);

const res: k8s.V1PersistentVolumeClaimList = await api.listNamespacedPersistentVolumeClaim({ namespace: 'default' });
for (const item of res.items) {
console.log(item.metadata?.name);
}

Used by: CoreV1Api.listNamespacedPersistentVolumeClaim · CoreV1Api.listPersistentVolumeClaimForAllNamespaces

V1PersistentVolumeClaimSpec

  • PersistentVolumeClaimSpec describes the common attributes of storage devices and allows a Source for provider-specific attributes

Source

PropertyTypeDescription
accessModesstring[]accessModes contains the desired access modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1
storageClassNamestringstorageClassName is the name of the StorageClass required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1
volumeAttributesClassNamestringvolumeAttributesClassName may be used to set the VolumeAttributesClass used by this claim. If specified, the CSI driver will create or update the volume with the attributes defined in the...
volumeModestringvolumeMode defines what type of volume is required by the claim. Value of Filesystem is implied when not included in claim spec.
volumeNamestringvolumeName is the binding reference to the PersistentVolume backing this claim.
dataSourceV1TypedLocalObjectReference
dataSourceRefV1TypedObjectReference
resourcesV1VolumeResourceRequirements
selectorV1LabelSelector

V1PersistentVolumeClaimStatus

  • PersistentVolumeClaimStatus is the current status of a persistent volume claim.

Source

PropertyTypeDescription
accessModesstring[]accessModes contains the actual access modes the volume backing the PVC has. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1
allocatedResourceStatuses{ [key: string]: stringallocatedResourceStatuses stores status of resource being resized for the given PVC. Key names follow standard Kubernetes label syntax. Valid values are either: * Un-prefixed keys: - storage - the...
allocatedResources{ [key: string]: stringallocatedResources tracks the resources allocated to a PVC including its capacity. Key names follow standard Kubernetes label syntax. Valid values are either: * Un-prefixed keys: - storage - the...
capacity{ [key: string]: stringcapacity represents the actual resources of the underlying volume.
conditionsV1PersistentVolumeClaimCondition[]conditions is the current Condition of persistent volume claim. If underlying persistent volume is being resized then the Condition will be set to 'Resizing'.
currentVolumeAttributesClassNamestringcurrentVolumeAttributesClassName is the current name of the VolumeAttributesClass the PVC is using. When unset, there is no VolumeAttributeClass applied to this PersistentVolumeClaim
phasestringphase represents the current phase of PersistentVolumeClaim.
modifyVolumeStatusV1ModifyVolumeStatus

V1PersistentVolumeClaimTemplate

  • PersistentVolumeClaimTemplate is used to produce PersistentVolumeClaim objects as part of an EphemeralVolumeSource.

Source

PropertyTypeDescription
metadataV1ObjectMeta
specV1PersistentVolumeClaimSpec

V1PersistentVolumeClaimVolumeSource

  • PersistentVolumeClaimVolumeSource references the user's PVC in the same namespace. This volume finds the bound PV and mounts that volume for the pod. A PersistentVolumeClaimVolumeSource is, essentially, a wrapper around another type of volume that is owned by someone else (the system).

Source

PropertyTypeDescription
claimNamestringclaimName is the name of a PersistentVolumeClaim in the same namespace as the pod using this volume. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims
readOnlybooleanreadOnly Will force the ReadOnly setting in VolumeMounts. Default false.

V1PersistentVolumeList

  • PersistentVolumeList is a list of PersistentVolume items.

Source

PropertyTypeDescription
apiVersionstringAPIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info:...
itemsV1PersistentVolume[]items is a list of persistent volumes. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes
kindstringKind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info:...
metadataV1ListMeta

Example

import * as k8s from '@kubernetes/client-node';

const kc = new k8s.KubeConfig();
kc.loadFromDefault();
const api = kc.makeApiClient(k8s.CoreV1Api);

const res: k8s.V1PersistentVolumeList = await api.listPersistentVolume({ namespace: 'default' });
for (const item of res.items) {
console.log(item.metadata?.name);
}

Used by: CoreV1Api.listPersistentVolume

V1PersistentVolumeSpec

  • PersistentVolumeSpec is the specification of a persistent volume.

Source

PropertyTypeDescription
accessModesstring[]accessModes contains all ways the volume can be mounted. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes
capacity{ [key: string]: stringcapacity is the description of the persistent volume's resources and capacity. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#capacity
mountOptionsstring[]mountOptions is the list of mount options, e.g. ["ro", "soft"]. Not validated - mount will simply fail if one is invalid. More info:...
persistentVolumeReclaimPolicystringpersistentVolumeReclaimPolicy defines what happens to a persistent volume when released from its claim. Valid options are Retain (default for manually created PersistentVolumes), Delete (default for...
storageClassNamestringstorageClassName is the name of StorageClass to which this persistent volume belongs. Empty value means that this volume does not belong to any StorageClass.
volumeAttributesClassNamestringName of VolumeAttributesClass to which this persistent volume belongs. Empty value is not allowed. When this field is not set, it indicates that this volume does not belong to any...
volumeModestringvolumeMode defines if a volume is intended to be used with a formatted filesystem or to remain in raw block state. Value of Filesystem is implied when not included in spec.
awsElasticBlockStoreV1AWSElasticBlockStoreVolumeSource
azureDiskV1AzureDiskVolumeSource
azureFileV1AzureFilePersistentVolumeSource
cephfsV1CephFSPersistentVolumeSource
cinderV1CinderPersistentVolumeSource
claimRefV1ObjectReference
csiV1CSIPersistentVolumeSource
fcV1FCVolumeSource
flexVolumeV1FlexPersistentVolumeSource
flockerV1FlockerVolumeSource
gcePersistentDiskV1GCEPersistentDiskVolumeSource
glusterfsV1GlusterfsPersistentVolumeSource
hostPathV1HostPathVolumeSource
iscsiV1ISCSIPersistentVolumeSource
localV1LocalVolumeSource
nfsV1NFSVolumeSource
nodeAffinityV1VolumeNodeAffinity
photonPersistentDiskV1PhotonPersistentDiskVolumeSource
portworxVolumeV1PortworxVolumeSource
quobyteV1QuobyteVolumeSource
rbdV1RBDPersistentVolumeSource
scaleIOV1ScaleIOPersistentVolumeSource
storageosV1StorageOSPersistentVolumeSource
vsphereVolumeV1VsphereVirtualDiskVolumeSource

V1PersistentVolumeStatus

  • PersistentVolumeStatus is the current status of a persistent volume.

Source

PropertyTypeDescription
lastPhaseTransitionTimeDatelastPhaseTransitionTime is the time the phase transitioned from one to another and automatically resets to current time everytime a volume phase transitions.
messagestringmessage is a human-readable message indicating details about why the volume is in this state.
phasestringphase indicates if a volume is available, bound to a claim, or released by a claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#phase
reasonstringreason is a brief CamelCase string that describes any failure and is meant for machine parsing and tidy display in the CLI.

V1Pod

  • Pod is a collection of containers that can run on a host. This resource is created by clients and scheduled onto hosts.

Source

PropertyTypeDescription
apiVersionstringAPIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info:...
kindstringKind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info:...
metadataV1ObjectMeta
specV1PodSpec
statusV1PodStatus

Example

import * as k8s from '@kubernetes/client-node';

const kc = new k8s.KubeConfig();
kc.loadFromDefault();
const api = kc.makeApiClient(k8s.CoreV1Api);

const body: k8s.V1Pod = {
metadata: { name: 'example' },
spec: { /* ... */ },
};
const res = await api.createNamespacedPod({ namespace: 'default', body });
console.log(res.metadata?.name);

Used by: CoreV1Api.createNamespacedPod · CoreV1Api.readNamespacedPod · CoreV1Api.readNamespacedPodEphemeralcontainers

V1PodAffinity

  • Pod affinity is a group of inter pod affinity scheduling rules.

Source

PropertyTypeDescription
preferredDuringSchedulingIgnoredDuringExecutionV1WeightedPodAffinityTerm[]The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that...
requiredDuringSchedulingIgnoredDuringExecutionV1PodAffinityTerm[]If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met...

V1PodAffinityTerm

  • Defines a set of pods (namely those matching the labelSelector relative to the given namespace(s)) that this pod should be co-located (affinity) or not co-located (anti-affinity) with, where co-located is defined as running on a node whose value of the label with key matches that of any node on which a pod of the set of pods is running

Source

PropertyTypeDescription
matchLabelKeysstring[]MatchLabelKeys is a set of pod label keys to select which pods will be taken into consideration. The keys are used to lookup values from the incoming pod labels, those key-value labels are merged...
mismatchLabelKeysstring[]MismatchLabelKeys is a set of pod label keys to select which pods will be taken into consideration. The keys are used to lookup values from the incoming pod labels, those key-value labels are merged...
namespacesstring[]namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector....
topologyKeystringThis pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose...
labelSelectorV1LabelSelector
namespaceSelectorV1LabelSelector

V1PodAntiAffinity

  • Pod anti affinity is a group of inter pod anti affinity scheduling rules.

Source

PropertyTypeDescription
preferredDuringSchedulingIgnoredDuringExecutionV1WeightedPodAffinityTerm[]The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node...
requiredDuringSchedulingIgnoredDuringExecutionV1PodAffinityTerm[]If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease...

V1PodCertificateProjection

  • PodCertificateProjection provides a private key and X.509 certificate in the pod filesystem.

Source

PropertyTypeDescription
certificateChainPathstringWrite the certificate chain at this path in the projected volume. Most applications should use credentialBundlePath. When using keyPath and certificateChainPath, your application needs to check...
credentialBundlePathstringWrite the credential bundle at this path in the projected volume. The credential bundle is a single file that contains multiple PEM blocks. The first PEM block is a PRIVATE KEY block, containing a...
keyPathstringWrite the key at this path in the projected volume. Most applications should use credentialBundlePath. When using keyPath and certificateChainPath, your application needs to check that the key and...
keyTypestringThe type of keypair Kubelet will generate for the pod. Valid values are "RSA3072", "RSA4096", "ECDSAP256", "ECDSAP384", "ECDSAP521", and "ED25519".
maxExpirationSecondsnumbermaxExpirationSeconds is the maximum lifetime permitted for the certificate. Kubelet copies this value verbatim into the PodCertificateRequests it generates for this projection. If omitted,...
signerNamestringKubelet's generated CSRs will be addressed to this signer.
userAnnotations{ [key: string]: stringuserAnnotations allow pod authors to pass additional information to the signer implementation. Kubernetes does not restrict or validate this metadata in any way. These values are copied verbatim...

V1PodCondition

  • PodCondition contains details for the current condition of this pod.

Source

PropertyTypeDescription
lastProbeTimeDateLast time we probed the condition.
lastTransitionTimeDateLast time the condition transitioned from one status to another.
messagestringHuman-readable message indicating details about last transition.
observedGenerationnumberIf set, this represents the .metadata.generation that the pod condition was set based upon. The PodObservedGenerationTracking feature gate must be enabled to use this field.
reasonstringUnique, one-word, CamelCase reason for the condition's last transition.
statusstringStatus is the status of the condition. Can be True, False, Unknown. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions
typestringType is the type of the condition. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions

V1PodDNSConfig

  • PodDNSConfig defines the DNS parameters of a pod in addition to those generated from DNSPolicy.

Source

PropertyTypeDescription
nameserversstring[]A list of DNS name server IP addresses. This will be appended to the base nameservers generated from DNSPolicy. Duplicated nameservers will be removed.
optionsV1PodDNSConfigOption[]A list of DNS resolver options. This will be merged with the base options generated from DNSPolicy. Duplicated entries will be removed. Resolution options given in Options will override those that...
searchesstring[]A list of DNS search domains for host-name lookup. This will be appended to the base search paths generated from DNSPolicy. Duplicated search paths will be removed.

V1PodDNSConfigOption

  • PodDNSConfigOption defines DNS resolver options of a pod.

Source

PropertyTypeDescription
namestringName is this DNS resolver option's name. Required.
valuestringValue is this DNS resolver option's value.

V1PodDisruptionBudget

  • PodDisruptionBudget is an object to define the max disruption that can be caused to a collection of pods

Source

PropertyTypeDescription
apiVersionstringAPIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info:...
kindstringKind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info:...
metadataV1ObjectMeta
specV1PodDisruptionBudgetSpec
statusV1PodDisruptionBudgetStatus

Example

import * as k8s from '@kubernetes/client-node';

const kc = new k8s.KubeConfig();
kc.loadFromDefault();
const api = kc.makeApiClient(k8s.PolicyV1Api);

const body: k8s.V1PodDisruptionBudget = {
metadata: { name: 'example' },
spec: { /* ... */ },
};
const res = await api.createNamespacedPodDisruptionBudget({ namespace: 'default', body });
console.log(res.metadata?.name);

Used by: PolicyV1Api.createNamespacedPodDisruptionBudget · PolicyV1Api.readNamespacedPodDisruptionBudget · PolicyV1Api.readNamespacedPodDisruptionBudgetStatus

V1PodDisruptionBudgetList

  • PodDisruptionBudgetList is a collection of PodDisruptionBudgets.

Source

PropertyTypeDescription
apiVersionstringAPIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info:...
itemsV1PodDisruptionBudget[]Items is a list of PodDisruptionBudgets
kindstringKind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info:...
metadataV1ListMeta

Example

import * as k8s from '@kubernetes/client-node';

const kc = new k8s.KubeConfig();
kc.loadFromDefault();
const api = kc.makeApiClient(k8s.PolicyV1Api);

const res: k8s.V1PodDisruptionBudgetList = await api.listNamespacedPodDisruptionBudget({ namespace: 'default' });
for (const item of res.items) {
console.log(item.metadata?.name);
}

Used by: PolicyV1Api.listNamespacedPodDisruptionBudget · PolicyV1Api.listPodDisruptionBudgetForAllNamespaces

V1PodDisruptionBudgetSpec

  • PodDisruptionBudgetSpec is a description of a PodDisruptionBudget.

Source

PropertyTypeDescription
maxUnavailableIntOrStringIntOrString is a type that can hold an int32 or a string. When used in JSON or YAML marshalling and unmarshalling, it produces or consumes the inner type. This allows you to have, for example, a...
minAvailableIntOrStringIntOrString is a type that can hold an int32 or a string. When used in JSON or YAML marshalling and unmarshalling, it produces or consumes the inner type. This allows you to have, for example, a...
unhealthyPodEvictionPolicystringUnhealthyPodEvictionPolicy defines the criteria for when unhealthy pods should be considered for eviction. Current implementation considers healthy pods, as pods that have status.conditions item with...
selectorV1LabelSelector

V1PodDisruptionBudgetStatus

  • PodDisruptionBudgetStatus represents information about the status of a PodDisruptionBudget. Status may trail the actual state of a system.

Source

PropertyTypeDescription
conditionsV1Condition[]Conditions contain conditions for PDB. The disruption controller sets the DisruptionAllowed condition. The following are known values for the reason field (additional reasons could be added in the...
currentHealthynumbercurrent number of healthy pods
desiredHealthynumberminimum desired number of healthy pods
disruptedPods{ [key: string]: DateDisruptedPods contains information about pods whose eviction was processed by the API server eviction subresource handler but has not yet been observed by the PodDisruptionBudget controller. A pod...
disruptionsAllowednumberNumber of pod disruptions that are currently allowed.
expectedPodsnumbertotal number of pods counted by this disruption budget
observedGenerationnumberMost recent generation observed when updating this PDB status. DisruptionsAllowed and other status information is valid only if observedGeneration equals to PDB's object generation.

V1PodExtendedResourceClaimStatus

  • PodExtendedResourceClaimStatus is stored in the PodStatus for the extended resource requests backed by DRA. It stores the generated name for the corresponding special ResourceClaim created by the scheduler.

Source

PropertyTypeDescription
requestMappingsV1ContainerExtendedResourceRequest[]RequestMappings identifies the mapping of <container, extended resource backed by DRA> to device request in the generated ResourceClaim.
resourceClaimNamestringResourceClaimName is the name of the ResourceClaim that was generated for the Pod in the namespace of the Pod.

V1PodFailurePolicy

  • PodFailurePolicy describes how failed pods influence the backoffLimit.

Source

PropertyTypeDescription
rulesV1PodFailurePolicyRule[]A list of pod failure policy rules. The rules are evaluated in order. Once a rule matches a Pod failure, the remaining of the rules are ignored. When no rule matches the Pod failure, the default...

V1PodFailurePolicyOnExitCodesRequirement

  • PodFailurePolicyOnExitCodesRequirement describes the requirement for handling a failed pod based on its container exit codes. In particular, it lookups the .state.terminated.exitCode for each app container and init container status, represented by the .status.containerStatuses and .status.initContainerStatuses fields in the Pod status, respectively. Containers completed with success (exit code 0) are excluded from the requirement check.

Source

PropertyTypeDescription
containerNamestringRestricts the check for exit codes to the container with the specified name. When null, the rule applies to all containers. When specified, it should match one the container or initContainer names in...
operatorstringRepresents the relationship between the container exit code(s) and the specified values. Containers completed with success (exit code 0) are excluded from the requirement check. Possible values are: ...
valuesnumber[]Specifies the set of values. Each returned container exit code (might be multiple in case of multiple containers) is checked against this set of values with respect to the operator. The list of...

V1PodFailurePolicyOnPodConditionsPattern

  • PodFailurePolicyOnPodConditionsPattern describes a pattern for matching an actual pod condition type.

Source

PropertyTypeDescription
statusstringSpecifies the required Pod condition status. To match a pod condition it is required that the specified status equals the pod condition status. Defaults to True.
typestringSpecifies the required Pod condition type. To match a pod condition it is required that specified type equals the pod condition type.

V1PodFailurePolicyRule

  • PodFailurePolicyRule describes how a pod failure is handled when the requirements are met. One of onExitCodes and onPodConditions, but not both, can be used in each rule.

Source

PropertyTypeDescription
actionstringSpecifies the action taken on a pod failure when the requirements are satisfied. Possible values are: - FailJob: indicates that the pod's job is marked as Failed and all running pods are...
onPodConditionsV1PodFailurePolicyOnPodConditionsPattern[]Represents the requirement on the pod conditions. The requirement is represented as a list of pod condition patterns. The requirement is satisfied if at least one pattern matches an actual pod...
onExitCodesV1PodFailurePolicyOnExitCodesRequirement

V1PodIP

  • PodIP represents a single IP address allocated to the pod.

Source

PropertyTypeDescription
ipstringIP is the IP address assigned to the pod

V1PodList

  • PodList is a list of Pods.

Source

PropertyTypeDescription
apiVersionstringAPIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info:...
itemsV1Pod[]List of pods. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md
kindstringKind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info:...
metadataV1ListMeta

Example

import * as k8s from '@kubernetes/client-node';

const kc = new k8s.KubeConfig();
kc.loadFromDefault();
const api = kc.makeApiClient(k8s.CoreV1Api);

const res: k8s.V1PodList = await api.listNamespacedPod({ namespace: 'default' });
for (const item of res.items) {
console.log(item.metadata?.name);
}

Used by: CoreV1Api.listNamespacedPod · CoreV1Api.listPodForAllNamespaces

V1PodOS

  • PodOS defines the OS parameters of a pod.

Source

PropertyTypeDescription
namestringName is the name of the operating system. The currently supported values are linux and windows. Additional value may be defined in future and can be one of:...

V1PodReadinessGate

  • PodReadinessGate contains the reference to a pod condition

Source

PropertyTypeDescription
conditionTypestringConditionType refers to a condition in the pod's condition list with matching type.

V1PodResourceClaim

  • PodResourceClaim references exactly one ResourceClaim, either directly or by naming a ResourceClaimTemplate which is then turned into a ResourceClaim for the pod. It adds a name to it that uniquely identifies the ResourceClaim inside the Pod. Containers that need access to the ResourceClaim reference it with this name.

Source

PropertyTypeDescription
namestringName uniquely identifies this resource claim inside the pod. This must be a DNS_LABEL.
resourceClaimNamestringResourceClaimName is the name of a ResourceClaim object in the same namespace as this pod. Exactly one of ResourceClaimName and ResourceClaimTemplateName must be set.
resourceClaimTemplateNamestringResourceClaimTemplateName is the name of a ResourceClaimTemplate object in the same namespace as this pod. The template will be used to create a new ResourceClaim, which will be bound to this pod....

V1PodResourceClaimStatus

  • PodResourceClaimStatus is stored in the PodStatus for each PodResourceClaim which references a ResourceClaimTemplate. It stores the generated name for the corresponding ResourceClaim.

Source

PropertyTypeDescription
namestringName uniquely identifies this resource claim inside the pod. This must match the name of an entry in pod.spec.resourceClaims, which implies that the string must be a DNS_LABEL.
resourceClaimNamestringResourceClaimName is the name of the ResourceClaim that was generated for the Pod in the namespace of the Pod. If this is unset, then generating a ResourceClaim was not necessary. The...

V1PodSchedulingGate

  • PodSchedulingGate is associated to a Pod to guard its scheduling.

Source

PropertyTypeDescription
namestringName of the scheduling gate. Each scheduling gate must have a unique name field.

V1PodSecurityContext

  • PodSecurityContext holds pod-level security attributes and common container settings. Some fields are also present in container.securityContext. Field values of container.securityContext take precedence over field values of PodSecurityContext.

Source

PropertyTypeDescription
fsGroupnumberA special supplemental group that applies to all containers in a pod. Some volume types allow the Kubelet to change the ownership of that volume to be owned by the pod: 1. The owning GID will be the...
fsGroupChangePolicystringfsGroupChangePolicy defines behavior of changing ownership and permission of the volume before being exposed inside Pod. This field will only apply to volume types which support fsGroup based...
runAsGroupnumberThe GID to run the entrypoint of the container process. Uses runtime default if unset. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified...
runAsNonRootbooleanIndicates that the container must run as a non-root user. If true, the Kubelet will validate the image at runtime to ensure that it does not run as UID 0 (root) and fail to start the container if it...
runAsUsernumberThe UID to run the entrypoint of the container process. Defaults to user specified in image metadata if unspecified. May also be set in SecurityContext. If set in both SecurityContext and...
seLinuxChangePolicystringseLinuxChangePolicy defines how the container's SELinux label is applied to all volumes used by the Pod. It has no effect on nodes that do not support SELinux or to volumes does not support SELinux....
supplementalGroupsnumber[]A list of groups applied to the first process run in each container, in addition to the container's primary GID and fsGroup (if specified). If the SupplementalGroupsPolicy feature is enabled, the...
supplementalGroupsPolicystringDefines how supplemental groups of the first container processes are calculated. Valid values are "Merge" and "Strict". If not specified, "Merge" is used. (Alpha) Using the field requires the...
sysctlsV1Sysctl[]Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported sysctls (by the container runtime) might fail to launch. Note that this field cannot be set when spec.os.name is...
appArmorProfileV1AppArmorProfile
seLinuxOptionsV1SELinuxOptions
seccompProfileV1SeccompProfile
windowsOptionsV1WindowsSecurityContextOptions

V1PodSpec

  • PodSpec is a description of a pod.

Source

PropertyTypeDescription
activeDeadlineSecondsnumberOptional duration in seconds the pod may be active on the node relative to StartTime before the system will actively try to mark it failed and kill associated containers. Value must be a positive...
automountServiceAccountTokenbooleanAutomountServiceAccountToken indicates whether a service account token should be automatically mounted.
containersV1Container[]List of containers belonging to the pod. Containers cannot currently be added or removed. There must be at least one container in a Pod. Cannot be updated.
dnsPolicystringSet DNS policy for the pod. Defaults to "ClusterFirst". Valid values are 'ClusterFirstWithHostNet', 'ClusterFirst', 'Default' or 'None'. DNS parameters given in DNSConfig will be merged...
enableServiceLinksbooleanEnableServiceLinks indicates whether information about services should be injected into pod's environment variables, matching the syntax of Docker links. Optional: Defaults to true.
ephemeralContainersV1EphemeralContainer[]List of ephemeral containers run in this pod. Ephemeral containers may be run in an existing pod to perform user-initiated actions such as debugging. This list cannot be specified when creating a...
hostAliasesV1HostAlias[]HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts file if specified.
hostIPCbooleanUse the host's ipc namespace. Optional: Default to false.
hostNetworkbooleanHost networking requested for this pod. Use the host's network namespace. When using HostNetwork you should specify ports so the scheduler is aware. When hostNetwork is true, specified hostPort...
hostPIDbooleanUse the host's pid namespace. Optional: Default to false.
hostUsersbooleanUse the host's user namespace. Optional: Default to true. If set to true or not present, the pod will be run in the host user namespace, useful for when the pod needs a feature only available to the...
hostnamestringSpecifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value.
hostnameOverridestringHostnameOverride specifies an explicit override for the pod's hostname as perceived by the pod. This field only specifies the pod's hostname and does not affect its DNS records. When this field is...
imagePullSecretsV1LocalObjectReference[]ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. If specified, these secrets will be passed to individual...
initContainersV1Container[]List of initialization containers belonging to the pod. Init containers are executed in order prior to containers being started. If any init container fails, the pod is considered to have failed and...
nodeNamestringNodeName indicates in which node this pod is scheduled. If empty, this pod is a candidate for scheduling by the scheduler defined in schedulerName. Once this field is set, the kubelet for this node...
nodeSelector{ [key: string]: stringNodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node's labels for the pod to be scheduled on that node. More info:...
overhead{ [key: string]: stringOverhead represents the resource overhead associated with running a pod for a given RuntimeClass. This field will be autopopulated at admission time by the RuntimeClass admission controller. If the...
preemptionPolicystringPreemptionPolicy is the Policy for preempting pods with lower priority. One of Never, PreemptLowerPriority. Defaults to PreemptLowerPriority if unset.
prioritynumberThe priority value. Various system components use this field to find the priority of the pod. When Priority Admission Controller is enabled, it prevents users from setting this field. The admission...
priorityClassNamestringIf specified, indicates the pod's priority. "system-node-critical" and "system-cluster-critical" are two special keywords which indicate the highest priorities with the former being the highest...
readinessGatesV1PodReadinessGate[]If specified, all readiness gates will be evaluated for pod readiness. A pod is ready when all its containers are ready AND all conditions specified in the readiness gates have status equal to...
resourceClaimsV1PodResourceClaim[]ResourceClaims defines which ResourceClaims must be allocated and reserved before the Pod is allowed to start. The resources will be made available to those containers which consume them by name. ...
restartPolicystringRestart policy for all containers within the pod. One of Always, OnFailure, Never. In some contexts, only a subset of those values may be permitted. Default to Always. More info:...
runtimeClassNamestringRuntimeClassName refers to a RuntimeClass object in the node.k8s.io group, which should be used to run this pod. If no RuntimeClass resource matches the named class, the pod will not be run. If...
schedulerNamestringIf specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler.
schedulingGatesV1PodSchedulingGate[]SchedulingGates is an opaque list of values that if specified will block scheduling the pod. If schedulingGates is not empty, the pod will stay in the SchedulingGated state and the scheduler will not...
serviceAccountstringDeprecatedServiceAccount is a deprecated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead.
serviceAccountNamestringServiceAccountName is the name of the ServiceAccount to use to run this pod. More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/
setHostnameAsFQDNbooleanIf true the pod's hostname will be configured as the pod's FQDN, rather than the leaf name (the default). In Linux containers, this means setting the FQDN in the hostname field of the kernel (the...
shareProcessNamespacebooleanShare a single process namespace between all of the containers in a pod. When this is set containers will be able to view and signal processes from other containers in the same pod, and the first...
subdomainstringIf specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all.
terminationGracePeriodSecondsnumberOptional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request. Value must be non-negative integer. The value zero indicates stop immediately via the kill...
tolerationsV1Toleration[]If specified, the pod's tolerations.
topologySpreadConstraintsV1TopologySpreadConstraint[]TopologySpreadConstraints describes how a group of pods ought to spread across topology domains. Scheduler will schedule pods in a way which abides by the constraints. All topologySpreadConstraints...
volumesV1Volume[]List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes
affinityV1Affinity
dnsConfigV1PodDNSConfig
osV1PodOS
resourcesV1ResourceRequirements
securityContextV1PodSecurityContext
workloadRefV1WorkloadReference

V1PodStatus

  • PodStatus represents information about the status of a pod. Status may trail the actual state of a system, especially if the node that hosts the pod cannot contact the control plane.

Source

PropertyTypeDescription
allocatedResources{ [key: string]: stringAllocatedResources is the total requests allocated for this pod by the node. If pod-level requests are not set, this will be the total requests aggregated across containers in the pod.
conditionsV1PodCondition[]Current service state of pod. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions
containerStatusesV1ContainerStatus[]Statuses of containers in this pod. Each container in the pod should have at most one status in this list, and all statuses should be for containers in the pod. However this is not enforced. If a...
ephemeralContainerStatusesV1ContainerStatus[]Statuses for any ephemeral containers that have run in this pod. Each ephemeral container in the pod should have at most one status in this list, and all statuses should be for containers in the pod....
hostIPstringhostIP holds the IP address of the host to which the pod is assigned. Empty if the pod has not started yet. A pod can be assigned to a node that has a problem in kubelet which in turns mean that...
hostIPsV1HostIP[]hostIPs holds the IP addresses allocated to the host. If this field is specified, the first entry must match the hostIP field. This list is empty if the pod has not started yet. A pod can be assigned...
initContainerStatusesV1ContainerStatus[]Statuses of init containers in this pod. The most recent successful non-restartable init container will have ready = true, the most recently started container will have startTime set. Each init...
messagestringA human readable message indicating details about why the pod is in this condition.
nominatedNodeNamestringnominatedNodeName is set only when this pod preempts other pods on the node, but it cannot be scheduled right away as preemption victims receive their graceful termination periods. This field does...
observedGenerationnumberIf set, this represents the .metadata.generation that the pod status was set based upon. The PodObservedGenerationTracking feature gate must be enabled to use this field.
phasestringThe phase of a Pod is a simple, high-level summary of where the Pod is in its lifecycle. The conditions array, the reason and message fields, and the individual container status arrays contain more...
podIPstringpodIP address allocated to the pod. Routable at least within the cluster. Empty if not yet allocated.
podIPsV1PodIP[]podIPs holds the IP addresses allocated to the pod. If this field is specified, the 0th entry must match the podIP field. Pods may be allocated at most 1 value for each of IPv4 and IPv6. This list is...
qosClassstringThe Quality of Service (QOS) classification assigned to the pod based on resource requirements See PodQOSClass type for available QOS classes More info:...
reasonstringA brief CamelCase message indicating details about why the pod is in this state. e.g. 'Evicted'
resizestringStatus of resources resize desired for pod's containers. It is empty if no resources resize is pending. Any changes to container resources will automatically set this to "Proposed" Deprecated:...
resourceClaimStatusesV1PodResourceClaimStatus[]Status of resource claims.
startTimeDateRFC 3339 date and time at which the object was acknowledged by the Kubelet. This is before the Kubelet pulled the container image(s) for the pod.
extendedResourceClaimStatusV1PodExtendedResourceClaimStatus
resourcesV1ResourceRequirements

V1PodTemplate

  • PodTemplate describes a template for creating copies of a predefined pod.

Source

PropertyTypeDescription
apiVersionstringAPIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info:...
kindstringKind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info:...
metadataV1ObjectMeta
templateV1PodTemplateSpec

Example

import * as k8s from '@kubernetes/client-node';

const kc = new k8s.KubeConfig();
kc.loadFromDefault();
const api = kc.makeApiClient(k8s.CoreV1Api);

const body: k8s.V1PodTemplate = {
metadata: { name: 'example' },
};
const res = await api.createNamespacedPodTemplate({ namespace: 'default', body });
console.log(res.metadata?.name);

Used by: CoreV1Api.createNamespacedPodTemplate · CoreV1Api.patchNamespacedPodTemplate · CoreV1Api.readNamespacedPodTemplate

V1PodTemplateList

  • PodTemplateList is a list of PodTemplates.

Source

PropertyTypeDescription
apiVersionstringAPIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info:...
itemsV1PodTemplate[]List of pod templates
kindstringKind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info:...
metadataV1ListMeta

Example

import * as k8s from '@kubernetes/client-node';

const kc = new k8s.KubeConfig();
kc.loadFromDefault();
const api = kc.makeApiClient(k8s.CoreV1Api);

const res: k8s.V1PodTemplateList = await api.listNamespacedPodTemplate({ namespace: 'default' });
for (const item of res.items) {
console.log(item.metadata?.name);
}

Used by: CoreV1Api.listNamespacedPodTemplate · CoreV1Api.listPodTemplateForAllNamespaces

V1PodTemplateSpec

  • PodTemplateSpec describes the data a pod should have when created from a template

Source

PropertyTypeDescription
metadataV1ObjectMeta
specV1PodSpec

V1ReplicationController

  • ReplicationController represents the configuration of a replication controller.

Source

PropertyTypeDescription
apiVersionstringAPIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info:...
kindstringKind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info:...
metadataV1ObjectMeta
specV1ReplicationControllerSpec
statusV1ReplicationControllerStatus

Example

import * as k8s from '@kubernetes/client-node';

const kc = new k8s.KubeConfig();
kc.loadFromDefault();
const api = kc.makeApiClient(k8s.CoreV1Api);

const body: k8s.V1ReplicationController = {
metadata: { name: 'example' },
spec: { /* ... */ },
};
const res = await api.createNamespacedReplicationController({ namespace: 'default', body });
console.log(res.metadata?.name);

Used by: CoreV1Api.createNamespacedReplicationController · CoreV1Api.readNamespacedReplicationController · CoreV1Api.readNamespacedReplicationControllerStatus

V1ReplicationControllerCondition

  • ReplicationControllerCondition describes the state of a replication controller at a certain point.

Source

PropertyTypeDescription
lastTransitionTimeDateThe last time the condition transitioned from one status to another.
messagestringA human readable message indicating details about the transition.
reasonstringThe reason for the condition's last transition.
statusstringStatus of the condition, one of True, False, Unknown.
typestringType of replication controller condition.

V1ReplicationControllerList

  • ReplicationControllerList is a collection of replication controllers.

Source

PropertyTypeDescription
apiVersionstringAPIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info:...
itemsV1ReplicationController[]List of replication controllers. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller
kindstringKind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info:...
metadataV1ListMeta

Example

import * as k8s from '@kubernetes/client-node';

const kc = new k8s.KubeConfig();
kc.loadFromDefault();
const api = kc.makeApiClient(k8s.CoreV1Api);

const res: k8s.V1ReplicationControllerList = await api.listNamespacedReplicationController({ namespace: 'default' });
for (const item of res.items) {
console.log(item.metadata?.name);
}

Used by: CoreV1Api.listNamespacedReplicationController · CoreV1Api.listReplicationControllerForAllNamespaces

V1ReplicationControllerSpec

  • ReplicationControllerSpec is the specification of a replication controller.

Source

PropertyTypeDescription
minReadySecondsnumberMinimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as...
replicasnumberReplicas is the number of desired replicas. This is a pointer to distinguish between explicit zero and unspecified. Defaults to 1. More info:...
selector{ [key: string]: stringSelector is a label query over pods that should match the Replicas count. If Selector is empty, it is defaulted to the labels present on the Pod template. Label keys and values that must match in...
templateV1PodTemplateSpec

V1ReplicationControllerStatus

  • ReplicationControllerStatus represents the current status of a replication controller.

Source

PropertyTypeDescription
availableReplicasnumberThe number of available replicas (ready for at least minReadySeconds) for this replication controller.
conditionsV1ReplicationControllerCondition[]Represents the latest available observations of a replication controller's current state.
fullyLabeledReplicasnumberThe number of pods that have labels matching the labels of the pod template of the replication controller.
observedGenerationnumberObservedGeneration reflects the generation of the most recently observed replication controller.
readyReplicasnumberThe number of ready replicas for this replication controller.
replicasnumberReplicas is the most recently observed number of replicas. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#what-is-a-replicationcontroller

V1ResourceQuota

  • ResourceQuota sets aggregate quota restrictions enforced per namespace

Source

PropertyTypeDescription
apiVersionstringAPIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info:...
kindstringKind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info:...
metadataV1ObjectMeta
specV1ResourceQuotaSpec
statusV1ResourceQuotaStatus

Example

import * as k8s from '@kubernetes/client-node';

const kc = new k8s.KubeConfig();
kc.loadFromDefault();
const api = kc.makeApiClient(k8s.CoreV1Api);

const body: k8s.V1ResourceQuota = {
metadata: { name: 'example' },
spec: { /* ... */ },
};
const res = await api.createNamespacedResourceQuota({ namespace: 'default', body });
console.log(res.metadata?.name);

Used by: CoreV1Api.createNamespacedResourceQuota · CoreV1Api.readNamespacedResourceQuota · CoreV1Api.readNamespacedResourceQuotaStatus

V1ResourceQuotaList

  • ResourceQuotaList is a list of ResourceQuota items.

Source

PropertyTypeDescription
apiVersionstringAPIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info:...
itemsV1ResourceQuota[]Items is a list of ResourceQuota objects. More info: https://kubernetes.io/docs/concepts/policy/resource-quotas/
kindstringKind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info:...
metadataV1ListMeta

Example

import * as k8s from '@kubernetes/client-node';

const kc = new k8s.KubeConfig();
kc.loadFromDefault();
const api = kc.makeApiClient(k8s.CoreV1Api);

const res: k8s.V1ResourceQuotaList = await api.listNamespacedResourceQuota({ namespace: 'default' });
for (const item of res.items) {
console.log(item.metadata?.name);
}

Used by: CoreV1Api.listNamespacedResourceQuota · CoreV1Api.listResourceQuotaForAllNamespaces

V1ResourceQuotaSpec

  • ResourceQuotaSpec defines the desired hard limits to enforce for Quota.

Source

PropertyTypeDescription
hard{ [key: string]: stringhard is the set of desired hard limits for each named resource. More info: https://kubernetes.io/docs/concepts/policy/resource-quotas/
scopesstring[]A collection of filters that must match each object tracked by a quota. If not specified, the quota matches all objects.
scopeSelectorV1ScopeSelector

V1ResourceQuotaStatus

  • ResourceQuotaStatus defines the enforced hard limits and observed use.

Source

PropertyTypeDescription
hard{ [key: string]: stringHard is the set of enforced hard limits for each named resource. More info: https://kubernetes.io/docs/concepts/policy/resource-quotas/
used{ [key: string]: stringUsed is the current observed total usage of the resource in the namespace.

V1Secret

  • Secret holds secret data of a certain type. The total bytes of the values in the Data field must be less than MaxSecretSize bytes.

Source

PropertyTypeDescription
apiVersionstringAPIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info:...
data{ [key: string]: stringData contains the secret data. Each key must consist of alphanumeric characters, '-', '_' or '.'. The serialized form of the secret data is a base64 encoded string, representing the arbitrary...
immutablebooleanImmutable, if set to true, ensures that data stored in the Secret cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil.
kindstringKind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info:...
stringData{ [key: string]: stringstringData allows specifying non-binary secret data in string form. It is provided as a write-only input field for convenience. All keys and values are merged into the data field on write,...
typestringUsed to facilitate programmatic handling of secret data. More info: https://kubernetes.io/docs/concepts/configuration/secret/#secret-types
metadataV1ObjectMeta

Example

import * as k8s from '@kubernetes/client-node';

const kc = new k8s.KubeConfig();
kc.loadFromDefault();
const api = kc.makeApiClient(k8s.CoreV1Api);

const body: k8s.V1Secret = {
metadata: { name: 'example' },
};
const res = await api.createNamespacedSecret({ namespace: 'default', body });
console.log(res.metadata?.name);

Used by: CoreV1Api.createNamespacedSecret · CoreV1Api.patchNamespacedSecret · CoreV1Api.readNamespacedSecret

V1SecretEnvSource

  • SecretEnvSource selects a Secret to populate the environment variables with. The contents of the target Secret's Data field will represent the key-value pairs as environment variables.

Source

PropertyTypeDescription
namestringName of the referent. This field is effectively required, but due to backwards compatibility is allowed to be empty. Instances of this type with an empty value here are almost certainly wrong. More...
optionalbooleanSpecify whether the Secret must be defined

V1SecretKeySelector

  • SecretKeySelector selects a key of a Secret.

Source

PropertyTypeDescription
keystringThe key of the secret to select from. Must be a valid secret key.
namestringName of the referent. This field is effectively required, but due to backwards compatibility is allowed to be empty. Instances of this type with an empty value here are almost certainly wrong. More...
optionalbooleanSpecify whether the Secret or its key must be defined

V1SecretList

  • SecretList is a list of Secret.

Source

PropertyTypeDescription
apiVersionstringAPIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info:...
itemsV1Secret[]Items is a list of secret objects. More info: https://kubernetes.io/docs/concepts/configuration/secret
kindstringKind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info:...
metadataV1ListMeta

Example

import * as k8s from '@kubernetes/client-node';

const kc = new k8s.KubeConfig();
kc.loadFromDefault();
const api = kc.makeApiClient(k8s.CoreV1Api);

const res: k8s.V1SecretList = await api.listNamespacedSecret({ namespace: 'default' });
for (const item of res.items) {
console.log(item.metadata?.name);
}

Used by: CoreV1Api.listNamespacedSecret · CoreV1Api.listSecretForAllNamespaces

V1SecretProjection

  • Adapts a secret into a projected volume. The contents of the target Secret's Data field will be presented in a projected volume as files using the keys in the Data field as the file names. Note that this is identical to a secret volume source without the default mode.

Source

PropertyTypeDescription
itemsV1KeyToPath[]items if unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the...
namestringName of the referent. This field is effectively required, but due to backwards compatibility is allowed to be empty. Instances of this type with an empty value here are almost certainly wrong. More...
optionalbooleanoptional field specify whether the Secret or its key must be defined

V1SecretReference

  • SecretReference represents a Secret Reference. It has enough information to retrieve secret in any namespace

Source

PropertyTypeDescription
namestringname is unique within a namespace to reference a secret resource.
namespacestringnamespace defines the space within which the secret name must be unique.

V1SecretVolumeSource

  • Adapts a Secret into a volume. The contents of the target Secret's Data field will be presented in a volume as files using the keys in the Data field as the file names. Secret volumes support ownership management and SELinux relabeling.

Source

PropertyTypeDescription
defaultModenumberdefaultMode is Optional: mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and...
itemsV1KeyToPath[]items If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the...
optionalbooleanoptional field specify whether the Secret or its keys must be defined
secretNamestringsecretName is the name of the secret in the pod's namespace to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret

V1Service

  • Service is a named abstraction of software service (for example, mysql) consisting of local port (for example 3306) that the proxy listens on, and the selector that determines which pods will answer requests sent through the proxy.

Source

PropertyTypeDescription
apiVersionstringAPIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info:...
kindstringKind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info:...
metadataV1ObjectMeta
specV1ServiceSpec
statusV1ServiceStatus

Example

import * as k8s from '@kubernetes/client-node';

const kc = new k8s.KubeConfig();
kc.loadFromDefault();
const api = kc.makeApiClient(k8s.CoreV1Api);

const body: k8s.V1Service = {
metadata: { name: 'example' },
spec: { /* ... */ },
};
const res = await api.createNamespacedService({ namespace: 'default', body });
console.log(res.metadata?.name);

Used by: CoreV1Api.createNamespacedService · CoreV1Api.readNamespacedService · CoreV1Api.readNamespacedServiceStatus

V1ServiceAccount

  • ServiceAccount binds together: * a name, understood by users, and perhaps by peripheral systems, for an identity * a principal that can be authenticated and authorized * a set of secrets

Source

PropertyTypeDescription
apiVersionstringAPIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info:...
automountServiceAccountTokenbooleanAutomountServiceAccountToken indicates whether pods running as this service account should have an API token automatically mounted. Can be overridden at the pod level.
imagePullSecretsV1LocalObjectReference[]ImagePullSecrets is a list of references to secrets in the same namespace to use for pulling any images in pods that reference this ServiceAccount. ImagePullSecrets are distinct from Secrets because...
kindstringKind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info:...
secretsV1ObjectReference[]Secrets is a list of the secrets in the same namespace that pods running using this ServiceAccount are allowed to use. Pods are only limited to this list if this service account has a...
metadataV1ObjectMeta

Example

import * as k8s from '@kubernetes/client-node';

const kc = new k8s.KubeConfig();
kc.loadFromDefault();
const api = kc.makeApiClient(k8s.CoreV1Api);

const body: k8s.V1ServiceAccount = {
metadata: { name: 'example' },
};
const res = await api.createNamespacedServiceAccount({ namespace: 'default', body });
console.log(res.metadata?.name);

Used by: CoreV1Api.createNamespacedServiceAccount · CoreV1Api.patchNamespacedServiceAccount · CoreV1Api.readNamespacedServiceAccount

V1ServiceAccountList

  • ServiceAccountList is a list of ServiceAccount objects

Source

PropertyTypeDescription
apiVersionstringAPIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info:...
itemsV1ServiceAccount[]List of ServiceAccounts. More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/
kindstringKind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info:...
metadataV1ListMeta

Example

import * as k8s from '@kubernetes/client-node';

const kc = new k8s.KubeConfig();
kc.loadFromDefault();
const api = kc.makeApiClient(k8s.CoreV1Api);

const res: k8s.V1ServiceAccountList = await api.listNamespacedServiceAccount({ namespace: 'default' });
for (const item of res.items) {
console.log(item.metadata?.name);
}

Used by: CoreV1Api.listNamespacedServiceAccount · CoreV1Api.listServiceAccountForAllNamespaces

V1ServiceAccountTokenProjection

  • ServiceAccountTokenProjection represents a projected service account token volume. This projection can be used to insert a service account token into the pods runtime filesystem for use against APIs (Kubernetes API Server or otherwise).

Source

PropertyTypeDescription
audiencestringaudience is the intended audience of the token. A recipient of a token must identify itself with an identifier specified in the audience of the token, and otherwise should reject the token. The...
expirationSecondsnumberexpirationSeconds is the requested duration of validity of the service account token. As the token approaches expiration, the kubelet volume plugin will proactively rotate the service account token....
pathstringpath is the path relative to the mount point of the file to project the token into.

V1ServiceBackendPort

  • ServiceBackendPort is the service port being referenced.

Source

PropertyTypeDescription
namestringname is the name of the port on the Service. This is a mutually exclusive setting with "Number".
numbernumbernumber is the numerical port number (e.g. 80) on the Service. This is a mutually exclusive setting with "Name".

V1ServiceCIDR

  • ServiceCIDR defines a range of IP addresses using CIDR format (e.g. 192.168.0.0/24 or 2001:db2::/64). This range is used to allocate ClusterIPs to Service objects.

Source

PropertyTypeDescription
apiVersionstringAPIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info:...
kindstringKind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info:...
metadataV1ObjectMeta
specV1ServiceCIDRSpec
statusV1ServiceCIDRStatus

Example

import * as k8s from '@kubernetes/client-node';

const kc = new k8s.KubeConfig();
kc.loadFromDefault();
const api = kc.makeApiClient(k8s.NetworkingV1Api);

const body: k8s.V1ServiceCIDR = {
metadata: { name: 'example' },
spec: { /* ... */ },
};
const res = await api.createServiceCIDR({ body });
console.log(res.metadata?.name);

Used by: NetworkingV1Api.createServiceCIDR · NetworkingV1Api.readServiceCIDR · NetworkingV1Api.readServiceCIDRStatus

V1ServiceCIDRList

  • ServiceCIDRList contains a list of ServiceCIDR objects.

Source

PropertyTypeDescription
apiVersionstringAPIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info:...
itemsV1ServiceCIDR[]items is the list of ServiceCIDRs.
kindstringKind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info:...
metadataV1ListMeta

Example

import * as k8s from '@kubernetes/client-node';

const kc = new k8s.KubeConfig();
kc.loadFromDefault();
const api = kc.makeApiClient(k8s.NetworkingV1Api);

const res: k8s.V1ServiceCIDRList = await api.listServiceCIDR({ namespace: 'default' });
for (const item of res.items) {
console.log(item.metadata?.name);
}

Used by: NetworkingV1Api.listServiceCIDR

V1ServiceCIDRSpec

  • ServiceCIDRSpec define the CIDRs the user wants to use for allocating ClusterIPs for Services.

Source

PropertyTypeDescription
cidrsstring[]CIDRs defines the IP blocks in CIDR notation (e.g. "192.168.0.0/24" or "2001:db8::/64") from which to assign service cluster IPs. Max of two CIDRs is allowed, one of each IP family. This field is...

V1ServiceCIDRStatus

  • ServiceCIDRStatus describes the current state of the ServiceCIDR.

Source

PropertyTypeDescription
conditionsV1Condition[]conditions holds an array of metav1.Condition that describe the state of the ServiceCIDR. Current service state

V1ServiceList

  • ServiceList holds a list of services.

Source

PropertyTypeDescription
apiVersionstringAPIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info:...
itemsV1Service[]List of services
kindstringKind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info:...
metadataV1ListMeta

Example

import * as k8s from '@kubernetes/client-node';

const kc = new k8s.KubeConfig();
kc.loadFromDefault();
const api = kc.makeApiClient(k8s.CoreV1Api);

const res: k8s.V1ServiceList = await api.listNamespacedService({ namespace: 'default' });
for (const item of res.items) {
console.log(item.metadata?.name);
}

Used by: CoreV1Api.listNamespacedService · CoreV1Api.listServiceForAllNamespaces

V1ServicePort

  • ServicePort contains information on service's port.

Source

PropertyTypeDescription
appProtocolstringThe application protocol for this port. This is used as a hint for implementations to offer richer behavior for protocols that they understand. This field follows standard Kubernetes label syntax....
namestringThe name of this port within the service. This must be a DNS_LABEL. All ports within a ServiceSpec must have unique names. When considering the endpoints for a Service, this must match the 'name'...
nodePortnumberThe port on each node on which this service is exposed when type is NodePort or LoadBalancer. Usually assigned by the system. If a value is specified, in-range, and not in use it will be used,...
portnumberThe port that will be exposed by this service.
protocolstringThe IP protocol for this port. Supports "TCP", "UDP", and "SCTP". Default is TCP.
targetPortIntOrStringIntOrString is a type that can hold an int32 or a string. When used in JSON or YAML marshalling and unmarshalling, it produces or consumes the inner type. This allows you to have, for example, a...

V1ServiceSpec

  • ServiceSpec describes the attributes that a user creates on a service.

Source

PropertyTypeDescription
allocateLoadBalancerNodePortsbooleanallocateLoadBalancerNodePorts defines if NodePorts will be automatically allocated for services with type LoadBalancer. Default is "true". It may be set to "false" if the cluster load-balancer...
clusterIPstringclusterIP is the IP address of the service and is usually assigned randomly. If an address is specified manually, is in-range (as per system configuration), and is not in use, it will be allocated to...
clusterIPsstring[]ClusterIPs is a list of IP addresses assigned to this service, and are usually assigned randomly. If an address is specified manually, is in-range (as per system configuration), and is not in use,...
externalIPsstring[]externalIPs is a list of IP addresses for which nodes in the cluster will also accept traffic for this service. These IPs are not managed by Kubernetes. The user is responsible for ensuring that...
externalNamestringexternalName is the external reference that discovery mechanisms will return as an alias for this service (e.g. a DNS CNAME record). No proxying will be involved. Must be a lowercase RFC-1123...
externalTrafficPolicystringexternalTrafficPolicy describes how nodes distribute service traffic they receive on one of the Service's "externally-facing" addresses (NodePorts, ExternalIPs, and LoadBalancer IPs). If set to...
healthCheckNodePortnumberhealthCheckNodePort specifies the healthcheck nodePort for the service. This only applies when type is set to LoadBalancer and externalTrafficPolicy is set to Local. If a value is specified, is...
internalTrafficPolicystringInternalTrafficPolicy describes how nodes distribute service traffic they receive on the ClusterIP. If set to "Local", the proxy will assume that pods only want to talk to endpoints of the service...
ipFamiliesstring[]IPFamilies is a list of IP families (e.g. IPv4, IPv6) assigned to this service. This field is usually assigned automatically based on cluster configuration and the ipFamilyPolicy field. If this field...
ipFamilyPolicystringIPFamilyPolicy represents the dual-stack-ness requested or required by this Service. If there is no value provided, then this field will be set to SingleStack. Services can be "SingleStack" (a...
loadBalancerClassstringloadBalancerClass is the class of the load balancer implementation this Service belongs to. If specified, the value of this field must be a label-style identifier, with an optional prefix, e.g....
loadBalancerIPstringOnly applies to Service Type: LoadBalancer. This feature depends on whether the underlying cloud-provider supports specifying the loadBalancerIP when a load balancer is created. This field will be...
loadBalancerSourceRangesstring[]If specified and supported by the platform, this will restrict traffic through the cloud-provider load-balancer will be restricted to the specified client IPs. This field will be ignored if the...
portsV1ServicePort[]The list of ports that are exposed by this service. More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies
publishNotReadyAddressesbooleanpublishNotReadyAddresses indicates that any agent which deals with endpoints for this Service should disregard any indications of ready/not-ready. The primary use case for setting this field is for a...
selector{ [key: string]: stringRoute service traffic to pods with label keys and values matching this selector. If empty or not present, the service is assumed to have an external process managing its endpoints, which Kubernetes...
sessionAffinitystringSupports "ClientIP" and "None". Used to maintain session affinity. Enable client IP based session affinity. Must be ClientIP or None. Defaults to None. More info:...
trafficDistributionstringTrafficDistribution offers a way to express preferences for how traffic is distributed to Service endpoints. Implementations can use this field as a hint, but are not required to guarantee strict...
typestringtype determines how the Service is exposed. Defaults to ClusterIP. Valid options are ExternalName, ClusterIP, NodePort, and LoadBalancer. "ClusterIP" allocates a cluster-internal IP address for...
sessionAffinityConfigV1SessionAffinityConfig

V1ServiceStatus

  • ServiceStatus represents the current status of a service.

Source

PropertyTypeDescription
conditionsV1Condition[]Current service state
loadBalancerV1LoadBalancerStatus