kubectl label nodes <node-name> <label-key>=<label-value># node-name refers to the node IP address.
kubectl get nodes --show-labels
NAME STATUS ROLES AGE VERSION LABELS172.17.124.5 Ready <none> 12d v1.10.5-tke.3 beta.kubernetes.io/arch=amd64,beta.kubernetes.io/instance-type=QCLOUD,beta.kubernetes.io/os=linux,failure-domain.beta.kubernetes.io/region=sh,failure-domain.beta.kubernetes.io/zone=200002,kubernetes.io/hostname=172.17.124.5172.17.124.8 Ready <none> 12d v1.10.5-tke.3 beta.kubernetes.io/arch=amd64,beta.kubernetes.io/instance-type=QCLOUD,beta.kubernetes.io/os=linux,failure-domain.beta.kubernetes.io/region=sh,failure-domain.beta.kubernetes.io/zone=200002,kubernetes.io/hostname=172.17.124.8
Label Key | Description | Example Value |
kubernetes.io/hostname | Node hostname, usually the private IP address of the node | 10.0.1.22 |
kubernetes.io/os,kubernetes.io/arch | Operating system and CPU architecture | linux,amd64 |
node.kubernetes.io/instance-type | Instance type; eklet for super nodes | S2.MEDIUM2 |
beta.kubernetes.io/os,beta.kubernetes.io/arch,beta.kubernetes.io/instance-type | Legacy built-in labels, retained for compatibility with existing PVs and other objects | linux,amd64 |
100002), while CBS-CSI-specific labels use AZ names (for example, ap-guangzhou-2). Do not modify any of them, as this may cause inconsistent topology information read by different components.Label Key | Description | Written By / Example Value |
topology.kubernetes.io/zone | Kubernetes stable AZ Label | kubelet and cloud-provider; 100002 |
topology.kubernetes.io/region | Kubernetes stable region Label | gz |
failure-domain.beta.kubernetes.io/zone | Legacy AZ Label, still read by existing objects such as PVs and CSIs. | 100002 |
failure-domain.beta.kubernetes.io/region | Legacy region Label | gz |
topology.com.tencent.cloud.csi.cbs/zone | CBS-CSI driver-specific topology Label for CBS AZ scheduling | CBS-CSI; ap-guangzhou-2 |
eks.tke.cloud.tencent.com/zone-name | Name of the AZ where the super node resides | eklet-agent; ap-singapore-1 |
eks.tke.cloud.tencent.com/zone-id in Annotations. The spec.providerID of a node is in the format qcloud:///<AZ ID>/<instance ID>, which also contains AZ information. All this information is written by the system. Among them, spec.providerID is an immutable field of a Node and cannot be modified after creation.Label Key | Description |
cloud.tencent.com/node-instance-id | ID of the CVM instance corresponding to the node |
cloud.tencent.com/auto-scaling-group-id | ID of the scaling group to which the node belongs |
cloud.tencent.com/provider | Cloud provider identifier, with a value of tencentcloud |
tke.cloud.tencent.com/nodepool-id | ID of the node pool to which the node belongs |
tke.cloud.tencent.com/cbs-mountable | Whether the instance type supports mounting CBS cloud disks. |
tke.cloud.tencent.com/cdcid | ID of the Tencent Cloud CDC where the node resides |
tke.cloud.tencent.com/location | Location information of the registered node |
node.tke.cloud.tencent.com/* | Metadata of native nodes and machines, such as machine, machineset, instance-charge-type, cpu, memory, gpu, and accelerator-type |
eks., tke., cloud.tencent.com, and node.tke.cloud.tencent.com.topology.kubernetes.io/zone and failure-domain.beta.kubernetes.io/zone) are injected by kubelet and cloud-provider.topology.com.tencent.cloud.csi.cbs/zone) is written by the CSI component and used for CBS scheduling. Its value is an AZ name, which differs from the numeric AZ ID in item 1.eks.tke.cloud.tencent.com/zone-name Label and zone-id Annotation on a super node are written by eklet-agent.spec.providerID of a Node, in the format qcloud:///<AZ ID>/<instance ID>, is an immutable field of the Node and cannot be modified after creation.spec.providerID cannot be modified in place.kubectl get node <node-name> -o yaml to check whether the AZ Labels in labels, the annotations, and the spec.providerID are consistent with the instance's current actual AZ. Because this information cannot be reliably corrected in place, create a node in the target AZ to replace the original node. You can also refer to Avoiding cross-AZ CBS disk mounting with CBS-CSI to learn about the binding relationship between CBS disks and AZs.Esta página foi útil?
Você também pode entrar em contato com a Equipe de vendas ou Enviar um tíquete em caso de ajuda.
comentários