Kubernetes Node
Node情報の確認
ノード一覧の取得 - kubectl get
Node一覧を見るには、次のコマンドを実行する。
kubectl get nodes
実行結果:
% kubectl get nodes
NAME STATUS ROLES AGE VERSION
minikube Ready control-plane 60s v1.24.3
Node一覧をより詳しく見るには、次のコマンドを実行する。
kubectl get nodes -o wide
実行結果:
% 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
ノード詳細の取得 - kubectl describe
kubectl describe node [ノード名]
実行結果:
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
... 省略 ...
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