100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
Certified Kubernetes Administrator (CKA). £6.29   Add to cart

Exam (elaborations)

Certified Kubernetes Administrator (CKA).

 0 view  0 purchase

Certified Kubernetes Administrator (CKA).

Preview 3 out of 21  pages

  • June 10, 2024
  • 21
  • 2023/2024
  • Exam (elaborations)
  • Questions & answers
All documents for this subject (467)
avatar-seller
modockochieng06
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}'\

The benefits of buying summaries with Stuvia:

Guaranteed quality through customer reviews

Guaranteed quality through customer reviews

Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.

Quick and easy check-out

Quick and easy check-out

You can quickly pay through credit card for the summaries. There is no membership needed.

Focus on what matters

Focus on what matters

Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!

Frequently asked questions

What do I get when I buy this document?

You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.

Satisfaction guarantee: how does it work?

Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.

Who am I buying these notes from?

Stuvia is a marketplace, so you are not buying this document from us, but from seller modockochieng06. Stuvia facilitates payment to the seller.

Will I be stuck with a subscription?

No, you only buy these notes for £6.29. You're not tied to anything after your purchase.

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

78834 documents were sold in the last 30 days

Founded in 2010, the go-to place to buy revision notes and other study material for 14 years now

Start selling
£6.29
  • (0)
  Add to cart