VMware Beta Community
cchen2
VMware Employee
VMware Employee

Node Pool labels for worker node

I've successfully deployed a cluster with 2 worker node pools (worker-pool-1 & worker-pool-2)

From a k8s user perspective, when I want to deploy a pod to a specified worker pool (e.x. worker-pool-2), how should I write the yaml?

For example, in case of GKE, user can use nodeSelector to specify the node pool like below:

  nodeSelector:
    cloud.google.com/gke-nodepool: POOL_NAME

And the gke-nodepool label is automatically added during the creation.

However, when checking the label of TKG cluster created by CSE 4.0, I didn't find any node pool related  labels.

Of course users can label by themself, but it may be easier to use if the node pool label can be automatically added.

administrator@client:~$ k describe node cse4-cluster-01-worker-pool-2-5694c75b78-kjr9l
Name: cse4-cluster-01-worker-pool-2-5694c75b78-kjr9l
Roles: <none>
Labels: beta.kubernetes.io/arch=amd64
beta.kubernetes.io/os=linux
kubernetes.io/arch=amd64
kubernetes.io/hostname=cse4-cluster-01-worker-pool-2-5694c75b78-kjr9l
kubernetes.io/os=linux 

 

Reply
0 Kudos
0 Replies