Q1. This lab tests your skills on upgrading a kubernetes cluster. We have a production cluster with applications running on it. Let us explore the setup first. What is the current version of the cluster?
A1. v1.26.0
Q2. How many nodes are part of this cluster? Including controlplane and worker nodes
A2. 2
Q3. How many nodes can host workloads in this cluster? Inspect the applications and taints set on the nodes.
A3. 2
>> kubectl describe nodes controlplane | grep -i taint
>> kubectl describe nodes node01 | grep -i taint
Q4. How many applications are hosted on the cluster? Count the number of deployments in the default namespace.
A4. 1
Q5. What nodes are the pods hosted on?
A5. controlplane, node01
>> k get pods -o wide
Q6. You are tasked to upgrade the cluster. Users accessing the applications must not be impacted, and you cannot provision new VMs. What strategy would you use to upgrade the cluster?
A6. Upgrade one node at a time while moving the workloads to the other
다운타임 최소화를 위해 워크로드를 다른 노드로 이동하면서 클러스터 한번에 하나씩 업그레이드
Q6. 업그레이드 타겟
A6. v1.28.0
Q7. what is the stable version of kubeadm?
A7. v1.26.8
[upgrade/versions] Latest version in the v1.26 series: v1.26.8
kubeadm upgrade plan : 현재 사용하는 cluster의 버전, 최신버전 그리고 Target(stable) 버전의 정보
Q8. We will be upgrading the controlplane node first. Drain the controlplane node of workloads and mark it UnSchedulable
A8. kubectl drain controlplane --ignore-daemonsets
To ignore these objects and drain the node
Q9. << CKA에 매번 나오는 문제이며, 이번 연습문제에서 가장 중요한 문제
Upgrade the controlplane components to exact version v1.24.0
Upgrade the kubeadm tool (if not already), then the controlplane components, and finally the kubelet. Practice referring to the Kubernetes documentation page.
Note: While upgrading kubelet, if you hit dependency issues while running the apt-get upgrade kubelet command, use the apt install kubelet=1.24.0-00 command instead.
-
Controlplane Node Upgraded to v1.24.0
-
Controlplane Kubelet Upgraded to v1.24.0
A9.
- kubectl drain controlplane --ignore-daemonset=true
- kubeadm upgrade plan
- apt-get install kubeadm=1.24.0-00
- kubeadm upgrade apply v1.24.0
- apt-get install kubelet=1.24.0-00
'STUDY > Data Engineering' 카테고리의 다른 글
[k8s] The connection to the server localhost:8080 was refused 해결방법 (0) | 2023.09.09 |
---|---|
[K8S] Context ? (0) | 2023.09.09 |
[인프런] 왕초보도 따라하는 도커 기초 (2) (0) | 2023.03.30 |
[인프런] 왕초보도 따라하는 도커 기초 (1) (0) | 2023.03.30 |
[인프런] 쿠버네티스 (도커와 쿠버네티스 시작하기) (0) | 2023.03.22 |