Skip to main content

Configuration & Storage Models

V1CSIDriver

  • CSIDriver captures information about a Container Storage Interface (CSI) volume driver deployed on the cluster. Kubernetes attach detach controller uses this object to determine whether attach is required. Kubelet uses this object to determine whether pod information needs to be passed on mount. CSIDriver objects are non-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:...
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
specV1CSIDriverSpec

Example

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

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

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

Used by: StorageV1Api.createCSIDriver · StorageV1Api.patchCSIDriver · StorageV1Api.readCSIDriver

V1CSIDriverList

  • CSIDriverList is a collection of CSIDriver 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:...
itemsV1CSIDriver[]items is the list of CSIDriver
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.StorageV1Api);

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

Used by: StorageV1Api.listCSIDriver

V1CSIDriverSpec

  • CSIDriverSpec is the specification of a CSIDriver.

Source

PropertyTypeDescription
attachRequiredbooleanattachRequired indicates this CSI volume driver requires an attach operation (because it implements the CSI ControllerPublishVolume() method), and that the Kubernetes attach detach controller should...
fsGroupPolicystringfsGroupPolicy defines if the underlying volume supports changing ownership and permission of the volume before being mounted. Refer to the specific FSGroupPolicy values for additional details. This...
nodeAllocatableUpdatePeriodSecondsnumbernodeAllocatableUpdatePeriodSeconds specifies the interval between periodic updates of the CSINode allocatable capacity for this driver. When set, both periodic updates and updates triggered by...
podInfoOnMountbooleanpodInfoOnMount indicates this CSI volume driver requires additional pod information (like podName, podUID, etc.) during mount operations, if set to true. If set to false, pod information will not be...
requiresRepublishbooleanrequiresRepublish indicates the CSI driver wants NodePublishVolume being periodically called to reflect any possible change in the mounted volume. This field defaults to false. Note: After a...
seLinuxMountbooleanseLinuxMount specifies if the CSI driver supports "-o context" mount option. When "true", the CSI driver must ensure that all volumes provided by this CSI driver can be mounted separately with...
serviceAccountTokenInSecretsbooleanserviceAccountTokenInSecrets is an opt-in for CSI drivers to indicate that service account tokens should be passed via the Secrets field in NodePublishVolumeRequest instead of the VolumeContext...
storageCapacitybooleanstorageCapacity indicates that the CSI volume driver wants pod scheduling to consider the storage capacity that the driver deployment will report by creating CSIStorageCapacity objects with capacity...
tokenRequestsStorageV1TokenRequest[]tokenRequests indicates the CSI driver needs pods' service account tokens it is mounting volume for to do necessary authentication. Kubelet will pass the tokens in VolumeContext in the CSI...
volumeLifecycleModesstring[]volumeLifecycleModes defines what kind of volumes this CSI volume driver supports. The default if the list is empty is "Persistent", which is the usage defined by the CSI specification and...

V1CSINode

  • CSINode holds information about all CSI drivers installed on a node. CSI drivers do not need to create the CSINode object directly. As long as they use the node-driver-registrar sidecar container, the kubelet will automatically populate the CSINode object for the CSI driver as part of kubelet plugin registration. CSINode has the same name as a node. If the object is missing, it means either there are no CSI Drivers available on the node, or the Kubelet version is low enough that it doesn't create this object. CSINode has an OwnerReference that points to the corresponding node object.

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
specV1CSINodeSpec

Example

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

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

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

Used by: StorageV1Api.createCSINode · StorageV1Api.patchCSINode · StorageV1Api.readCSINode

V1CSINodeDriver

  • CSINodeDriver holds information about the specification of one CSI driver installed on a node

Source

PropertyTypeDescription
namestringname represents the name of the CSI driver that this object refers to. This MUST be the same name returned by the CSI GetPluginName() call for that driver.
nodeIDstringnodeID of the node from the driver point of view. This field enables Kubernetes to communicate with storage systems that do not share the same nomenclature for nodes. For example, Kubernetes may...
topologyKeysstring[]topologyKeys is the list of keys supported by the driver. When a driver is initialized on a cluster, it provides a set of topology keys that it understands (e.g. "company.com/zone",...
allocatableV1VolumeNodeResources

V1CSINodeList

  • CSINodeList is a collection of CSINode 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:...
itemsV1CSINode[]items is the list of CSINode
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.StorageV1Api);

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

Used by: StorageV1Api.listCSINode

V1CSINodeSpec

  • CSINodeSpec holds information about the specification of all CSI drivers installed on a node

Source

PropertyTypeDescription
driversV1CSINodeDriver[]drivers is a list of information of all CSI Drivers existing on a node. If all drivers in the list are uninstalled, this can become empty.

V1CSIPersistentVolumeSource

  • Represents storage that is managed by an external CSI volume driver

Source

PropertyTypeDescription
driverstringdriver is the name of the driver to use for this volume. Required.
fsTypestringfsType to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs".
readOnlybooleanreadOnly value to pass to ControllerPublishVolumeRequest. Defaults to false (read/write).
volumeAttributes{ [key: string]: stringvolumeAttributes of the volume to publish.
volumeHandlestringvolumeHandle is the unique volume name returned by the CSI volume plugin’s CreateVolume to refer to the volume on all subsequent calls. Required.
controllerExpandSecretRefV1SecretReference
controllerPublishSecretRefV1SecretReference
nodeExpandSecretRefV1SecretReference
nodePublishSecretRefV1SecretReference
nodeStageSecretRefV1SecretReference

V1CSIStorageCapacity

  • CSIStorageCapacity stores the result of one CSI GetCapacity call. For a given StorageClass, this describes the available capacity in a particular topology segment. This can be used when considering where to instantiate new PersistentVolumes. For example this can express things like: - StorageClass "standard" has "1234 GiB" available in "topology.kubernetes.io/zone=us-east1" - StorageClass "localssd" has "10 GiB" available in "kubernetes.io/hostname=knode-abc123" The following three cases all imply that no capacity is available for a certain combination: - no object exists with suitable topology and storage class name - such an object exists, but the capacity is unset - such an object exists, but the capacity is zero The producer of these objects can decide which approach is more suitable. They are consumed by the kube-scheduler when a CSI driver opts into capacity-aware scheduling with CSIDriverSpec.StorageCapacity. The scheduler compares the MaximumVolumeSize against the requested size of pending volumes to filter out unsuitable nodes. If MaximumVolumeSize is unset, it falls back to a comparison against the less precise Capacity. If that is also unset, the scheduler assumes that capacity is insufficient and tries some other node.

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:...
capacitystringcapacity is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields. The semantic is currently (CSI spec...
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:...
maximumVolumeSizestringmaximumVolumeSize is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields. This is defined since CSI...
storageClassNamestringstorageClassName represents the name of the StorageClass that the reported capacity applies to. It must meet the same requirements as the name of a StorageClass object (non-empty, DNS subdomain). If...
metadataV1ObjectMeta
nodeTopologyV1LabelSelector

Example

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

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

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

Used by: StorageV1Api.createNamespacedCSIStorageCapacity · StorageV1Api.patchNamespacedCSIStorageCapacity · StorageV1Api.readNamespacedCSIStorageCapacity

V1CSIStorageCapacityList

  • CSIStorageCapacityList is a collection of CSIStorageCapacity 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:...
itemsV1CSIStorageCapacity[]items is the list of CSIStorageCapacity 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.StorageV1Api);

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

Used by: StorageV1Api.listCSIStorageCapacityForAllNamespaces · StorageV1Api.listNamespacedCSIStorageCapacity

V1CSIVolumeSource

  • Represents a source location of a volume to mount, managed by an external CSI driver

Source

PropertyTypeDescription
driverstringdriver is the name of the CSI driver that handles this volume. Consult with your admin for the correct name as registered in the cluster.
fsTypestringfsType to mount. Ex. "ext4", "xfs", "ntfs". If not provided, the empty value is passed to the associated CSI driver which will determine the default filesystem to apply.
readOnlybooleanreadOnly specifies a read-only configuration for the volume. Defaults to false (read/write).
volumeAttributes{ [key: string]: stringvolumeAttributes stores driver-specific properties that are passed to the CSI driver. Consult your driver's documentation for supported values.
nodePublishSecretRefV1LocalObjectReference

V1FlowSchema

  • FlowSchema defines the schema of a group of flows. Note that a flow is made up of a set of inbound API requests with similar attributes and is identified by a pair of strings: the name of the FlowSchema and a "flow distinguisher".

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
specV1FlowSchemaSpec
statusV1FlowSchemaStatus

Example

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

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

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

Used by: FlowcontrolApiserverV1Api.createFlowSchema · FlowcontrolApiserverV1Api.readFlowSchema · FlowcontrolApiserverV1Api.readFlowSchemaStatus

V1FlowSchemaCondition

  • FlowSchemaCondition describes conditions for a FlowSchema.

Source

PropertyTypeDescription
lastTransitionTimeDatelastTransitionTime is the last time the condition transitioned from one status to another.
messagestringmessage is a human-readable message indicating details about last transition.
reasonstringreason is a unique, one-word, CamelCase reason for the condition's last transition.
statusstringstatus is the status of the condition. Can be True, False, Unknown. Required.
typestringtype is the type of the condition. Required.

V1FlowSchemaList

  • FlowSchemaList is a list of FlowSchema 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:...
itemsV1FlowSchema[]items is a list of FlowSchemas.
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.FlowcontrolApiserverV1Api);

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

Used by: FlowcontrolApiserverV1Api.listFlowSchema

V1FlowSchemaSpec

  • FlowSchemaSpec describes how the FlowSchema's specification looks like.

Source

PropertyTypeDescription
matchingPrecedencenumbermatchingPrecedence is used to choose among the FlowSchemas that match a given request. The chosen FlowSchema is among those with the numerically lowest (which we take to be logically highest)...
rulesV1PolicyRulesWithSubjects[]rules describes which requests will match this flow schema. This FlowSchema matches a request if and only if at least one member of rules matches the request. if it is an empty slice, there will be...
distinguisherMethodV1FlowDistinguisherMethod
priorityLevelConfigurationV1PriorityLevelConfigurationReference

V1FlowSchemaStatus

  • FlowSchemaStatus represents the current state of a FlowSchema.

Source

PropertyTypeDescription
conditionsV1FlowSchemaCondition[]conditions is a list of the current states of FlowSchema.

V1Lease

  • Lease defines a lease concept.

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
specV1LeaseSpec

Example

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

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

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

Used by: CoordinationV1Api.createNamespacedLease · CoordinationV1Api.patchNamespacedLease · CoordinationV1Api.readNamespacedLease

V1LeaseList

  • LeaseList is a list of Lease 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:...
itemsV1Lease[]items is a list of schema 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.CoordinationV1Api);

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

Used by: CoordinationV1Api.listLeaseForAllNamespaces · CoordinationV1Api.listNamespacedLease

V1LeaseSpec

  • LeaseSpec is a specification of a Lease.

Source

PropertyTypeDescription
acquireTimeV1MicroTimeMicroTime is version of Time with microsecond level precision.
holderIdentitystringholderIdentity contains the identity of the holder of a current lease. If Coordinated Leader Election is used, the holder identity must be equal to the elected LeaseCandidate.metadata.name field.
leaseDurationSecondsnumberleaseDurationSeconds is a duration that candidates for a lease need to wait to force acquire it. This is measured against the time of last observed renewTime.
leaseTransitionsnumberleaseTransitions is the number of transitions of a lease between holders.
preferredHolderstringPreferredHolder signals to a lease holder that the lease has a more optimal holder and should be given up. This field can only be set if Strategy is also set.
renewTimeV1MicroTimeMicroTime is version of Time with microsecond level precision.
strategystringStrategy indicates the strategy for picking the leader for coordinated leader election. If the field is not specified, there is no active coordination for this lease. (Alpha) Using this field...

V1PriorityLevelConfiguration

  • PriorityLevelConfiguration represents the configuration of a priority level.

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
specV1PriorityLevelConfigurationSpec
statusV1PriorityLevelConfigurationStatus

Example

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

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

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

Used by: FlowcontrolApiserverV1Api.createPriorityLevelConfiguration · FlowcontrolApiserverV1Api.readPriorityLevelConfiguration · FlowcontrolApiserverV1Api.readPriorityLevelConfigurationStatus

V1PriorityLevelConfigurationCondition

  • PriorityLevelConfigurationCondition defines the condition of priority level.

Source

PropertyTypeDescription
lastTransitionTimeDatelastTransitionTime is the last time the condition transitioned from one status to another.
messagestringmessage is a human-readable message indicating details about last transition.
reasonstringreason is a unique, one-word, CamelCase reason for the condition's last transition.
statusstringstatus is the status of the condition. Can be True, False, Unknown. Required.
typestringtype is the type of the condition. Required.

V1PriorityLevelConfigurationList

  • PriorityLevelConfigurationList is a list of PriorityLevelConfiguration 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:...
itemsV1PriorityLevelConfiguration[]items is a list of request-priorities.
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.FlowcontrolApiserverV1Api);

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

Used by: FlowcontrolApiserverV1Api.listPriorityLevelConfiguration

V1PriorityLevelConfigurationReference

  • PriorityLevelConfigurationReference contains information that points to the "request-priority" being used.

Source

PropertyTypeDescription
namestringname is the name of the priority level configuration being referenced Required.

V1PriorityLevelConfigurationSpec

  • PriorityLevelConfigurationSpec specifies the configuration of a priority level.

Source

PropertyTypeDescription
typestringtype indicates whether this priority level is subject to limitation on request execution. A value of \"Exempt\" means that requests of this priority level are not subject to a limit (and thus...
exemptV1ExemptPriorityLevelConfiguration
limitedV1LimitedPriorityLevelConfiguration

V1PriorityLevelConfigurationStatus

  • PriorityLevelConfigurationStatus represents the current state of a "request-priority".

Source

PropertyTypeDescription
conditionsV1PriorityLevelConfigurationCondition[]conditions is the current state of "request-priority".

V1StorageClass

  • StorageClass describes the parameters for a class of storage for which PersistentVolumes can be dynamically provisioned. StorageClasses are non-namespaced; the name of the storage class according to etcd is in ObjectMeta.Name.

Source

PropertyTypeDescription
allowVolumeExpansionbooleanallowVolumeExpansion shows whether the storage class allow volume expand.
allowedTopologiesV1TopologySelectorTerm[]allowedTopologies restrict the node topologies where volumes can be dynamically provisioned. Each volume plugin defines its own supported topology specifications. An empty TopologySelectorTerm list...
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:...
mountOptionsstring[]mountOptions controls the mountOptions for dynamically provisioned PersistentVolumes of this storage class. e.g. ["ro", "soft"]. Not validated - mount of the PVs will simply fail if one is...
parameters{ [key: string]: stringparameters holds the parameters for the provisioner that should create volumes of this storage class.
provisionerstringprovisioner indicates the type of the provisioner.
reclaimPolicystringreclaimPolicy controls the reclaimPolicy for dynamically provisioned PersistentVolumes of this storage class. Defaults to Delete.
volumeBindingModestringvolumeBindingMode indicates how PersistentVolumeClaims should be provisioned and bound. When unset, VolumeBindingImmediate is used. This field is only honored by servers that enable the...
metadataV1ObjectMeta

Example

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

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

const body: k8s.V1StorageClass = {
metadata: { name: 'example' },
};
const res = await api.createStorageClass({ body });
console.log(res.metadata?.name);

Used by: StorageV1Api.createStorageClass · StorageV1Api.patchStorageClass · StorageV1Api.readStorageClass

V1StorageClassList

  • StorageClassList is a collection of storage classes.

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:...
itemsV1StorageClass[]items is the list of StorageClasses
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.StorageV1Api);

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

Used by: StorageV1Api.listStorageClass

V1VolumeAttachment

  • VolumeAttachment captures the intent to attach or detach the specified volume to/from the specified node. VolumeAttachment objects are non-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:...
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
specV1VolumeAttachmentSpec
statusV1VolumeAttachmentStatus

Example

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

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

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

Used by: StorageV1Api.createVolumeAttachment · StorageV1Api.readVolumeAttachment · StorageV1Api.readVolumeAttachmentStatus

V1VolumeAttachmentList

  • VolumeAttachmentList is a collection of VolumeAttachment 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:...
itemsV1VolumeAttachment[]items is the list of VolumeAttachments
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.StorageV1Api);

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

Used by: StorageV1Api.listVolumeAttachment

V1VolumeAttachmentSource

  • VolumeAttachmentSource represents a volume that should be attached. Right now only PersistentVolumes can be attached via external attacher, in the future we may allow also inline volumes in pods. Exactly one member can be set.

Source

PropertyTypeDescription
persistentVolumeNamestringpersistentVolumeName represents the name of the persistent volume to attach.
inlineVolumeSpecV1PersistentVolumeSpec

V1VolumeAttachmentSpec

  • VolumeAttachmentSpec is the specification of a VolumeAttachment request.

Source

PropertyTypeDescription
attacherstringattacher indicates the name of the volume driver that MUST handle this request. This is the name returned by GetPluginName().
nodeNamestringnodeName represents the node that the volume should be attached to.
sourceV1VolumeAttachmentSource

V1VolumeAttachmentStatus

  • VolumeAttachmentStatus is the status of a VolumeAttachment request.

Source

PropertyTypeDescription
attachedbooleanattached indicates the volume is successfully attached. This field must only be set by the entity completing the attach operation, i.e. the external-attacher.
attachmentMetadata{ [key: string]: stringattachmentMetadata is populated with any information returned by the attach operation, upon successful attach, that must be passed into subsequent WaitForAttach or Mount calls. This field must only...
attachErrorV1VolumeError
detachErrorV1VolumeError