DevOps/CKA Test 준비

17.CKA-ClusterTroubleshooting

치킨맛코드 2023. 3. 29. 08:31

https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/troubleshooting-kubeadm/

 

Troubleshooting kubeadm

As with any program, you might run into an error installing or running kubeadm. This page lists some common failure scenarios and have provided steps that can help you understand and fix the problem. If your problem is not listed below, please follow the f

kubernetes.io

 

node가 notready상태에 있다. 원인 분석 후 해당 node를 ready상태로 전환하라.
작업 클러스터 : hk8s
notready node : hk8s-w2

1. 작업 클러스터 이동
==> kubectl config use-context hk8s

2.현재 node 상태 확인
==> kubectl get nodes

3. 실제 서비스 접속 및 root권한 부여
==> ssh hk8s-w2
==> sudo -i

4. docker engine 확인
==> docker ps
==> systemctl status docker
4-1. 재시작을 통해 running으로 바꾸기
==> systemctl enable --now docker

5.kubelet 확인
==> systemctl status kubelet
5-1. 재시작을 통해 runnign으로 바꾸기
==> systemctl enable --now kubelet

6. kubeproxy 확인
==> kubectl get pod -n kube-system -o wide | grep kubeporxy

7.cni확인
==> kubectl get pod -n kube-system -o wide | grep callico

8. 문제가 있는 시스템 점검/재부팅
==> systemctl enable --now system_name

9. 재부팅 한 시스템 확인하기
==> systemctl status system_name
==> kubectl get nodes