100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
CKAD Study Exam Questions & Answers 2024/2025 $8.49   Add to cart

Exam (elaborations)

CKAD Study Exam Questions & Answers 2024/2025

 4 views  0 purchase
  • Course
  • CKAD
  • Institution
  • CKAD

CKAD Study Exam Questions & Answers 2024/2025 Command to start a pod - ANSWERSkubectl run nginx --image=nginx --restart=Never Command to change image of a pod - ANSWERSkubectl set image pod/nginx nginx=nginx:1.7.1 Sequence to ping a pod from busybox - ANSWERSkubectl run busybox --image=b...

[Show more]

Preview 2 out of 10  pages

  • August 26, 2024
  • 10
  • 2024/2025
  • Exam (elaborations)
  • Questions & answers
  • CKAD
  • CKAD
avatar-seller
Bensuda
CKAD Study Exam Questions & Answers
2024/2025

Command to start a pod - ANSWERSkubectl run nginx --image=nginx --restart=Never



Command to change image of a pod - ANSWERSkubectl set image pod/nginx nginx=nginx:1.7.1



Sequence to ping a pod from busybox - ANSWERSkubectl run busybox --image=busybox --restart=Never
--rm -it -- sh

# / wget -O- <pod_ip>:80

#/ exit



Output nice yaml from a resource - ANSWERSkubectl get pod nginx -o yaml --export



Get logs of a previous version of a pod - ANSWERSkubectl logs nginx -p



Attach a process to a running pod - ANSWERSkubectl exec -it nginx -- /bin/sh



Set an environment variable from command line - ANSWERSkubectl run nginx --image=nginx --
env=var1=val1



Multi-container pod - ANSWERSkubectl run busybox --image=busybox -o yaml --dry-run -- /bin/sh -c
'echo hello;' > pod.yaml

# vi pod.yaml, Copy + Paste container list and rename the container

kubectl create -f pod.yaml

kubectl exec -it busybox -c busybox2 -- /bin/bash # Connect to second container



Create a pod with labels - ANSWERSkubectl run --image... --restart=Never --labels=app=v1,label2=val2

, Show labels on pods / resource - ANSWERSkubectl get pods --show-labels



Label a running pod - ANSWERSkubectl label po nginx app=v2 --overwrite



Get all pods with a certain label - ANSWERSkubectl get po -lapp



Remove a label from a running pod - ANSWERSkubectl label nginx{1..3} app-



Get documentation for a pod spec - ANSWERSkubectl explain po.spec



Annotate a running pod - ANSWERSkubectl annotate po nginx description='test description'

kubectl annotate po nginx description- # Remove



Create pod with 2 replicas and open port 80 from yaml - ANSWERSkubectl create deploy nginx --
image=... --dry-run -oyaml > deploy.yaml

vi deploy.yaml

# Change replicas: 2

# Under containers list add following

ports:

- containerPort: 80



kubectl create -f deploy.yaml



Check status and history of a deployment - ANSWERSkubectl rollout status deploy nginx

kubectl rollout history deploy nginx



Up replicas of a deployment to 5 - ANSWERSkubectl scale deploy nginx --replicas=5

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 or Stuvia-credit 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 Bensuda. Stuvia facilitates payment to the seller.

Will I be stuck with a subscription?

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

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

64438 documents were sold in the last 30 days

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

Start selling
$8.49
  • (0)
  Add to cart