Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Document preview thumbnail
Preview 3 out of 21 pages
Exam (elaborations)

Certified Kubernetes Administrator (CKA).

Document preview thumbnail
Preview 3 out of 21 pages

Certified Kubernetes Administrator (CKA).

Content preview

Certified Kubernetes Administrator
(CKA)
[student@node-1]$ kubectl config use-context-mk8s

Task:

Given an existing Kubernetes cluster running version 1.18.8, upgrade all of the Kubernetes
control plan and node components on the master node only to version 1.19.0.

You are also expected to upgrade kubelet and kubectl on the master node.

Be sure to drain the master node before upgrading it an uncordon it after the upgrade. Do
not upgrade the worker nodes, etcd, the container manager, the CNI plugin, the DNS service
or any other addons.

--------------------------------------------------------

A.)

kubectl drain <node-to-drain> --ignore-daemonsets

root@controlplane:~# apt update

apt-get update && \

apt-get install -y --allow-change-held-packages kubeadm=1.22.x-00

kubeadm version

kubeadm upgrade plan

kubeadm upgrade apply v1.20.0

apt-get update && \

apt-get install -y --allow-change-held-packages kubelet=1.22.x-00 kubectl=1.22.x-00

B.)

sudosystemctl daemon-reload

sudosystemctl restart kubelet

kubectluncordon<node-to-drain>

,C.

sudosystemctl system-reload

sudosystemctl uplooad-kubelet

kubectluncordon<note-to-drain>

B


Set configuration context:

[student@node-1]$ kubectl config use-context k8s

Task:

From the pod label name=cpu-user, find pods running high CPU workloads and write the
name of the pod consuming most CPU to the file /opt/KUTR00401/KUTR00401.txt (which
already exists).

--------------------------------------------------------

A.)

kubectl top -l name=cpu-utilizer –A echo 'pod name' >>/opt/KUT00401/KUT00401.txt

kubectl top pod --sort-by='cpu' --no-headers | head -1

or

kubectl top pods -l name=name-cpu-loader --sort-by=cpu

echo ‘top pod name' >>/opt/KUTR00401/KUTR00401.txt

or

kubectl top node --sort-by='cpu' --no-headers | head -1

kubectl top pod --sort-by='memory' --no-headers | head -1

kubectl top pod --sort-by='cpu' --no-headers | tail -1

B.)

kubectl top note-l name=name-cpu-loader --sort-by=cpu

, echo ‘top note name' >>/opt/KUTR00401/KUTR00401.txt

C.)

kubectl top node --sort-by='cpu' --no-footer| head -1

A




Previous
Play
Next
Rewind 10 seconds
Move forward 10 seconds
Unmute
0:00
/
0:15
Full screen
Brainpower
Read More
Set configuration context:

[student@node-1]$ kubectl config use-context k8s

Task:

Check to see how many nodes are ready (not including nodes tainted NoSchedule) and
write the number to /opt/KUSC00402/kusc00402.txt

--------------------------------------------------------

A.)

kubectl get nodes

kubectl get node | grep -i ready |wc -l

kubectl describe nodes | grep ready|wc -l

kubectl describe nodes | grep -i taint | grep -inoschedule | wc -l

echo 3 > /opt/KUSC00402/kusc00402.txt

JSONPATH='{range .items[*]}{@.metadata.name}:{range
@.status.conditions[*]}{@.type}={@.status};{end}{end}'\

Document information

Uploaded on
June 10, 2024
Number of pages
21
Written in
2023/2024
Type
Exam (elaborations)
Contains
Questions & answers
£6.53

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
Ace360PRO
4.7
(107)
Sold
260
Followers
2
Items
10570
Last sold
1 week ago


Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their exams and reviewed by others who've used these revision notes.

Didn't get what you expected? Choose another document

No problem! You can straightaway pick a different document that better suits what you're after.

Pay as you like, start learning straight away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and smashed it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions