I am trying to label gpu to my node This does not work
kubectl label node gke-kubia-default-pool-98519add-25c1/10.164.0.3 gpu=true
error: there is no need to specify a resource type as a separate argument when passing arguments in resource/name form (e.g. 'kubectl get resource/<resource_name>' instead of 'kubectl get resource resource/<resource_name>'
Neither without node
kubectl label gke-kubia-default-pool-98519add-25c1/10.164.0.2 gpu=true
error: the server doesn't have a resource type "gke-kubia-default-pool-98519add-25c1"
I think that node exists
Name: kubia-manual-v2
Namespace: default
Node: gke-kubia-default-pool-98519add-hsrc/10.164.0.2
Start Time: Fri, 08 Jun 2018 14:58:04 +0200
How to set the label?
How to list available nodes?
A Node is a worker machine in Kubernetes and may be either a virtual or a physical machine, depending on the cluster. Each Node is managed by the control plane. A Node can have multiple pods, and the Kubernetes control plane automatically handles scheduling the pods across the Nodes in the cluster.
Node label is a way to group nodes with similar characteristics and applications can specify where to run.
I have solved my problem.First
kubectl get no
NAME STATUS ROLES AGE VERSION
gke-kubia-default-pool-98519add-25c1 Ready <none> 20h v1.8.10-gke.0
gke-kubia-default-pool-98519add-5kfr Ready <none> 20h v1.8.10-gke.0
gke-kubia-default-pool-98519add-hsrc Ready <none> 20h v1.8.10-gke.0
Then
kubectl label node gke-kubia-default-pool-98519add-25c1 gpu=true
# output:
node "gke-kubia-default-pool-98519add-25c1" labeled
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With