Describing nodes
The kubectl describe
command allows us to get the state, metadata, and events of an object in a Kubernetes cluster. In this section, we will use it to describe the node.
We have got a list of nodes, so let's check out one of them:
- To describe a node, run the following command:
$ kubectl describe node gke-kubectl-lab-default-pool-b3c7050d-6s1l
As the command's output is quite big, we are going to show only some parts of it. You can check out the full output yourself.
- In the following screenshot, we see the assigned
Labels
(which can be used to organize and select subsets of objects) andAnnotations
(extra information about the node is stored there) for the node, andUnschedulable: false
means that the node accepts pods to be scheduled on to it. For example,Labels
can be used forNode Affinity
(which allows us to constrain which nodes the pod is eligible to be scheduled on, based on the labels on the node) to schedule pods on particular nodes...