Kubernetes Node

Checking Node Information

View the node list - kubectl get

Run the following command to view the Node list.

kubectl get nodes

Result:

% kubectl get nodes
NAME       STATUS   ROLES           AGE   VERSION
minikube   Ready    control-plane   60s   v1.24.3

To view the Node list in more detail, run the following command.

kubectl get nodes -o wide

Result:

% kubectl get nodes -o wide
NAME       STATUS   ROLES           AGE    VERSION   INTERNAL-IP    EXTERNAL-IP   OS-IMAGE             KERNEL-VERSION      CONTAINER-RUNTIME
minikube   Ready    control-plane   104s   v1.24.3   192.168.49.2   <none>        Ubuntu 20.04.4 LTS   5.10.124-linuxkit   docker://20.10.17

View node details - kubectl describe

kubectl describe node [node name]

Result:

kubectl describe node minikube
% kubectl describe node minikube
Name:               minikube
Roles:              control-plane
Labels:             beta.kubernetes.io/arch=arm64
                    beta.kubernetes.io/os=linux
                    kubernetes.io/arch=arm64
                    kubernetes.io/hostname=minikube
                    kubernetes.io/os=linux
                    minikube.k8s.io/commit=62e108c3dfdec8029a890ad6d8ef96b6461426dc
                    minikube.k8s.io/name=minikube
                    minikube.k8s.io/primary=true
                    minikube.k8s.io/updated_at=2022_09_09T08_31_13_0700

... omitted ...

Events:
  Type    Reason                   Age    From             Message
  ----    ------                   ----   ----             -------
  Normal  Starting                 2m44s  kube-proxy
  Normal  Starting                 2m58s  kubelet          Starting kubelet.
  Normal  NodeAllocatableEnforced  2m58s  kubelet          Updated Node Allocatable limit across pods
  Normal  NodeHasSufficientMemory  2m58s  kubelet          Node minikube status is now: NodeHasSufficientMemory
  Normal  NodeHasNoDiskPressure    2m58s  kubelet          Node minikube status is now: NodeHasNoDiskPressure
  Normal  NodeHasSufficientPID     2m58s  kubelet          Node minikube status is now: NodeHasSufficientPID
  Normal  RegisteredNode           2m46s  node-controller  Node minikube event: Registered Node minikube in Controller