Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
Tags
- OSPF
- stp
- Chrony
- ipv6
- eigrp
- 명령어
- ripng
- 헤더
- OSI 7 layer
- Inter VLAN
- crontab
- DHCP
- Etherchannel
- ACL
- 라우터
- rip
- Vlan
- 장비
- 스위치
- eigrpv2
- Redistribute
- ospfv3
- NAT
- tunneling
- vrrp
- GLBP
- CKA
Archives
- Today
- Total
Net Eng
[CKA] - Kubernetes Upgrade 본문
[선수 지식]
Kubernetes Cluster Upgrade
* Master Node(Controlplane) -> Upgrade(v1.
* Worker Node -> Upgrade
Kubernetes Cluster Component
* Controlplane(apiserver, etcd, scheduler, controller, ..)
* Worker node(kubelet, kube-proxy, container runtime, ..)
[선수 작업]
kubectl config set-context k8s-master --user=kubernetes-admin --cluster=kubernetes
[문제]
- 작업 클러스터: k8s-master
- Given an existing Kubernetes cluster running version 1.22.4, upgrade all of the Kubernetes control plane and node components on the master node only to version 1.23.3. Be sure to drain the master node before upgrading it and uncordon it after the upgrade.
- [주의] 실습에서는 v1.28.4 → v1.28.6 업그레이드 하는 과정을 진행한다.
- [주의] 실습에서는 k8s-master가 아니라 controlplane으로 작업을 진행한다.
[풀이]
kubectl config use-context k8s-master
* k8s-master 클러스터 사용
kubectl get nodes
* 버전 확인
apt update
apt-cache madison kubeadm
* 업데이트 가능 목록 확인
apt-mark unhold kubeadm && \
> apt-get update && apt-get install -y kubeadm=1.28.6-00 && \
> apt-mark hold kubeadm
* kubeadm 업데이트
kubeadm version
* 버전 확인
kubeadm upgrade plan 1.28.6
* 업그레이드 계획 확인
kubeadm upgrade apply 1.28.6
* 업그레이드 실행
kubectl drain controlplane --ignore-daemonsets
* controlplane 드레인
apt-mark unhold kubelet kubectl && \
apt-get update && apt-get install -y kubelet=1.28.6-1.1 kubectl=1.28.6-1.1 && \
apt-mark hold kubelet kubectl
* kubelet과 kubectl 업그레이드
sudo systemctl daemon-reload
sudo systemctl restart kubelet
* kubelet 재실행
kubectl uncordon controlplane
* uncordon 명령어로 다시 스케줄링
kubectl get nodes
* 업그레이된 버전 확인
* 주의사항 *
- 실제 테스트에서는master노드에 접속하여 위 과정을 실행해야 하며 drain과 uncordon은 exit로 빠져 나와 작업을 진행해야 한다.
[참고]
'Cloud > Kubernetes' 카테고리의 다른 글
[CKA] - Kubernetes Troubleshooting (2) (0) | 2024.01.23 |
---|---|
[CKA] - Kubernetes Troubleshooting (1) (0) | 2024.01.23 |
[CKA] - Ingress 구성 (0) | 2024.01.23 |
[CKA] - Check Resource Information (1) | 2024.01.23 |
[CKA] - Persistent Volume Claim 사용하는 Pod 운영 (0) | 2024.01.22 |