교육/[패스트캠퍼스]Kubernetes 자격증 마스터 클래스

패스트캠퍼스 환급챌린지 4일차 : Kubernetes 자격증 마스터 클래스 : CKA/CKAD/CKS 강의 후기

esne 2025. 3. 8. 22:44

본 포스팅은 패스트캠퍼스 환급 챌린지 참여를 위해 작성하였습니다.(https://bit.ly/4hTSJNB)


공부 인증
시작 시각, 종료 시각, 강의장 목록

공부 후기
현재 클러스터 확인 kubectl config current-context
멀티 클러스터 이동 kubectl config use-context k8s 또는 hk8s
클러스터 상태 확인 kubectl cluster-info
CNI 정보 확인 ssh k8s-master
sudo ls /etc/cni/net.d
kubectl [command] [TYPE] [NAME] [flags]
*kubectl --help
*command: 자원에 실행할 명령(create, get, delete, edit, ...)
*TYPE: 자원의 타입(node, pod, service, ...)
*NAME(optional): 자원의 이름
*flags: 부가적으로 설정할 옵션(--help, -o options, --dry-run, ...)

 

오늘 배운 실전 문제이다.

특정 클러스터의 특정 이름을 찾아서 /var/CKA2022/[특정클러스터이름]-node-info.txt 파일로 저장
특정 클러스터에서 ready 상태인 노드의 이름만 추출하여 /var/CKA2022/[특정클러스터이름]-node-ready.txt 파일에 저장

 

발생 에러
ubuntu@console:~$ kubectl config use-context hk8s
Switched to context "hk8s".
ubuntu@console:~$ kubectl get nodes
Unable to connect to the server: net/http: TLS handshake timeout

 

원인 유추 Kubectl reports "Unable to connect to the server: net/http: TLS handshake timeout"

Possible causes are:
  • Proxies are defined in the environment and the no_proxy" environment variable does not include the cluster nodes. To resolve the issue the cluster node IPs or hostnames must be added to the no_proxy environment variable.
  • The kube config file ~/.kube/config or /etc/kubernetes/admin.conf is not valid.
console 서버에서 다음과 같이 명령했더니 되긴 함..
근데 정확한 해결 방법인지는 잘 모르겠음. 추가적으로 연구가 필요.

unset http_proxy
unset https_proxy
unset no_proxy