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.
| Property | Type | Description |
|---|---|---|
apiVersion | string | APIVersion 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:... |
kind | string | Kind 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:... |
metadata | V1ObjectMeta | |
spec | V1CSIDriverSpec |
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.
| Property | Type | Description |
|---|---|---|
apiVersion | string | APIVersion 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:... |
items | V1CSIDriver[] | items is the list of CSIDriver |
kind | string | Kind 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:... |
metadata | V1ListMeta |
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.
| Property | Type | Description |
|---|---|---|
attachRequired | boolean | attachRequired indicates this CSI volume driver requires an attach operation (because it implements the CSI ControllerPublishVolume() method), and that the Kubernetes attach detach controller should... |
fsGroupPolicy | string | fsGroupPolicy 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... |
nodeAllocatableUpdatePeriodSeconds | number | nodeAllocatableUpdatePeriodSeconds specifies the interval between periodic updates of the CSINode allocatable capacity for this driver. When set, both periodic updates and updates triggered by... |
podInfoOnMount | boolean | podInfoOnMount 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... |
requiresRepublish | boolean | requiresRepublish 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... |
seLinuxMount | boolean | seLinuxMount 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... |
serviceAccountTokenInSecrets | boolean | serviceAccountTokenInSecrets 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... |
storageCapacity | boolean | storageCapacity 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... |
tokenRequests | StorageV1TokenRequest[] | 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... |
volumeLifecycleModes | string[] | 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.
| Property | Type | Description |
|---|---|---|
apiVersion | string | APIVersion 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:... |
kind | string | Kind 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:... |
metadata | V1ObjectMeta | |
spec | V1CSINodeSpec |
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
| Property | Type | Description |
|---|---|---|
name | string | name 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. |
nodeID | string | nodeID 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... |
topologyKeys | string[] | 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",... |
allocatable | V1VolumeNodeResources |
V1CSINodeList
- CSINodeList is a collection of CSINode objects.
| Property | Type | Description |
|---|---|---|
apiVersion | string | APIVersion 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:... |
items | V1CSINode[] | items is the list of CSINode |
kind | string | Kind 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:... |
metadata | V1ListMeta |
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
| Property | Type | Description |
|---|---|---|
drivers | V1CSINodeDriver[] | 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
| Property | Type | Description |
|---|---|---|
driver | string | driver is the name of the driver to use for this volume. Required. |
fsType | string | fsType to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". |
readOnly | boolean | readOnly value to pass to ControllerPublishVolumeRequest. Defaults to false (read/write). |
volumeAttributes | { [key: string]: string | volumeAttributes of the volume to publish. |
volumeHandle | string | volumeHandle is the unique volume name returned by the CSI volume plugin’s CreateVolume to refer to the volume on all subsequent calls. Required. |
controllerExpandSecretRef | V1SecretReference | |
controllerPublishSecretRef | V1SecretReference | |
nodeExpandSecretRef | V1SecretReference | |
nodePublishSecretRef | V1SecretReference | |
nodeStageSecretRef | V1SecretReference |
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.
| Property | Type | Description |
|---|---|---|
apiVersion | string | APIVersion 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:... |
capacity | string | capacity 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... |
kind | string | Kind 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:... |
maximumVolumeSize | string | maximumVolumeSize 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... |
storageClassName | string | storageClassName 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... |
metadata | V1ObjectMeta | |
nodeTopology | V1LabelSelector |
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.
| Property | Type | Description |
|---|---|---|
apiVersion | string | APIVersion 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:... |
items | V1CSIStorageCapacity[] | items is the list of CSIStorageCapacity objects. |
kind | string | Kind 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:... |
metadata | V1ListMeta |
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
| Property | Type | Description |
|---|---|---|
driver | string | driver is the name of the CSI driver that handles this volume. Consult with your admin for the correct name as registered in the cluster. |
fsType | string | fsType 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. |
readOnly | boolean | readOnly specifies a read-only configuration for the volume. Defaults to false (read/write). |
volumeAttributes | { [key: string]: string | volumeAttributes stores driver-specific properties that are passed to the CSI driver. Consult your driver's documentation for supported values. |
nodePublishSecretRef | V1LocalObjectReference |
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".
| Property | Type | Description |
|---|---|---|
apiVersion | string | APIVersion 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:... |
kind | string | Kind 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:... |
metadata | V1ObjectMeta | |
spec | V1FlowSchemaSpec | |
status | V1FlowSchemaStatus |
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.
| Property | Type | Description |
|---|---|---|
lastTransitionTime | Date | lastTransitionTime is the last time the condition transitioned from one status to another. |
message | string | message is a human-readable message indicating details about last transition. |
reason | string | reason is a unique, one-word, CamelCase reason for the condition's last transition. |
status | string | status is the status of the condition. Can be True, False, Unknown. Required. |
type | string | type is the type of the condition. Required. |
V1FlowSchemaList
- FlowSchemaList is a list of FlowSchema objects.
| Property | Type | Description |
|---|---|---|
apiVersion | string | APIVersion 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:... |
items | V1FlowSchema[] | items is a list of FlowSchemas. |
kind | string | Kind 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:... |
metadata | V1ListMeta |
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.
| Property | Type | Description |
|---|---|---|
matchingPrecedence | number | matchingPrecedence 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)... |
rules | V1PolicyRulesWithSubjects[] | 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... |
distinguisherMethod | V1FlowDistinguisherMethod | |
priorityLevelConfiguration | V1PriorityLevelConfigurationReference |
V1FlowSchemaStatus
- FlowSchemaStatus represents the current state of a FlowSchema.
| Property | Type | Description |
|---|---|---|
conditions | V1FlowSchemaCondition[] | conditions is a list of the current states of FlowSchema. |
V1Lease
- Lease defines a lease concept.
| Property | Type | Description |
|---|---|---|
apiVersion | string | APIVersion 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:... |
kind | string | Kind 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:... |
metadata | V1ObjectMeta | |
spec | V1LeaseSpec |
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.
| Property | Type | Description |
|---|---|---|
apiVersion | string | APIVersion 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:... |
items | V1Lease[] | items is a list of schema objects. |
kind | string | Kind 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:... |
metadata | V1ListMeta |
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.
| Property | Type | Description |
|---|---|---|
acquireTime | V1MicroTime | MicroTime is version of Time with microsecond level precision. |
holderIdentity | string | holderIdentity 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. |
leaseDurationSeconds | number | leaseDurationSeconds 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. |
leaseTransitions | number | leaseTransitions is the number of transitions of a lease between holders. |
preferredHolder | string | PreferredHolder 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. |
renewTime | V1MicroTime | MicroTime is version of Time with microsecond level precision. |
strategy | string | Strategy 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.
| Property | Type | Description |
|---|---|---|
apiVersion | string | APIVersion 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:... |
kind | string | Kind 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:... |
metadata | V1ObjectMeta | |
spec | V1PriorityLevelConfigurationSpec | |
status | V1PriorityLevelConfigurationStatus |
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.
| Property | Type | Description |
|---|---|---|
lastTransitionTime | Date | lastTransitionTime is the last time the condition transitioned from one status to another. |
message | string | message is a human-readable message indicating details about last transition. |
reason | string | reason is a unique, one-word, CamelCase reason for the condition's last transition. |
status | string | status is the status of the condition. Can be True, False, Unknown. Required. |
type | string | type is the type of the condition. Required. |
V1PriorityLevelConfigurationList
- PriorityLevelConfigurationList is a list of PriorityLevelConfiguration objects.
| Property | Type | Description |
|---|---|---|
apiVersion | string | APIVersion 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:... |
items | V1PriorityLevelConfiguration[] | items is a list of request-priorities. |
kind | string | Kind 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:... |
metadata | V1ListMeta |
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.
| Property | Type | Description |
|---|---|---|
name | string | name is the name of the priority level configuration being referenced Required. |
V1PriorityLevelConfigurationSpec
- PriorityLevelConfigurationSpec specifies the configuration of a priority level.
| Property | Type | Description |
|---|---|---|
type | string | type 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... |
exempt | V1ExemptPriorityLevelConfiguration | |
limited | V1LimitedPriorityLevelConfiguration |
V1PriorityLevelConfigurationStatus
- PriorityLevelConfigurationStatus represents the current state of a "request-priority".
| Property | Type | Description |
|---|---|---|
conditions | V1PriorityLevelConfigurationCondition[] | 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.
| Property | Type | Description |
|---|---|---|
allowVolumeExpansion | boolean | allowVolumeExpansion shows whether the storage class allow volume expand. |
allowedTopologies | V1TopologySelectorTerm[] | allowedTopologies restrict the node topologies where volumes can be dynamically provisioned. Each volume plugin defines its own supported topology specifications. An empty TopologySelectorTerm list... |
apiVersion | string | APIVersion 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:... |
kind | string | Kind 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:... |
mountOptions | string[] | 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]: string | parameters holds the parameters for the provisioner that should create volumes of this storage class. |
provisioner | string | provisioner indicates the type of the provisioner. |
reclaimPolicy | string | reclaimPolicy controls the reclaimPolicy for dynamically provisioned PersistentVolumes of this storage class. Defaults to Delete. |
volumeBindingMode | string | volumeBindingMode indicates how PersistentVolumeClaims should be provisioned and bound. When unset, VolumeBindingImmediate is used. This field is only honored by servers that enable the... |
metadata | V1ObjectMeta |
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.
| Property | Type | Description |
|---|---|---|
apiVersion | string | APIVersion 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:... |
items | V1StorageClass[] | items is the list of StorageClasses |
kind | string | Kind 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:... |
metadata | V1ListMeta |
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.
| Property | Type | Description |
|---|---|---|
apiVersion | string | APIVersion 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:... |
kind | string | Kind 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:... |
metadata | V1ObjectMeta | |
spec | V1VolumeAttachmentSpec | |
status | V1VolumeAttachmentStatus |
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.
| Property | Type | Description |
|---|---|---|
apiVersion | string | APIVersion 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:... |
items | V1VolumeAttachment[] | items is the list of VolumeAttachments |
kind | string | Kind 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:... |
metadata | V1ListMeta |
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.
| Property | Type | Description |
|---|---|---|
persistentVolumeName | string | persistentVolumeName represents the name of the persistent volume to attach. |
inlineVolumeSpec | V1PersistentVolumeSpec |
V1VolumeAttachmentSpec
- VolumeAttachmentSpec is the specification of a VolumeAttachment request.
| Property | Type | Description |
|---|---|---|
attacher | string | attacher indicates the name of the volume driver that MUST handle this request. This is the name returned by GetPluginName(). |
nodeName | string | nodeName represents the node that the volume should be attached to. |
source | V1VolumeAttachmentSource |
V1VolumeAttachmentStatus
- VolumeAttachmentStatus is the status of a VolumeAttachment request.
| Property | Type | Description |
|---|---|---|
attached | boolean | attached 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]: string | attachmentMetadata 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... |
attachError | V1VolumeError | |
detachError | V1VolumeError |