Kubernetes masterサーバーにログインします。詳細は、「第2章 共通の操作」を参照してください。
$ kubectl get nodes
■コマンドの出力例(起動している場合)
NAME STATUS ROLES AGE VERSION ip-172-101-15-101.ap-northeast-1.compute.internal Ready master 41d v1.14.2 ip-172-101-15-102.ap-northeast-1.compute.internal Ready <none> 41d v1.14.2 ip-172-101-15-103.ap-northeast-1.compute.internal Ready <none> 28d v1.14.2
以下のコマンドを実行し、各コンポーネントの状態を確認します。
修正パッチF1013-2021-001適用後、Kubernetesのバージョンアップに伴い以下の手順の内容に変更があります。パッチを適用していない場合は、「修正パッチF1013-2021-001適用前」のコマンドを実行してください。パッチを適用している場合は、「修正パッチF1013-2021-001適用後」のコマンドを実行してください。
修正パッチF1013-2021-001適用前
STATUSが、「Healthy」の場合は、正常な状態です。
$ kubectl get componentstatuses
■コマンドの出力例(正常な状態の場合)
NAME STATUS MESSAGE ERROR scheduler Healthy ok controller-manager Healthy ok etcd-0 Healthy {"health": "true"}
修正パッチF1013-2021-001適用後
READYが「1/1」、STATUSが「Running」の場合は、正常な状態です。
$ kubectl get pod -n kube-system | egrep 'k8s-master|NAME'
■コマンドの出力例(正常な状態の場合)
NAME READY STATUS RESTARTS AGE etcd-az1-sghpf-server-k8s-master-00.novalocal 1/1 Running 1 72d kube-apiserver-az1-sghpf-server-k8s-master-00.novalocal 1/1 Running 1 72d kube-controller-manager-az1-sghpf-server-k8s-master-00.novalocal 1/1 Running 1 72d kube-scheduler-az1-sghpf-server-k8s-master-00.novalocal 1/1 Running 1 72d