Skip to content

dhadkara/CKAD-exam-notes

Repository files navigation

CKAD-exam-notes

CKAD Exam Notes and Tips

Time saving tips

alias k=kubectl
complete -F __start_kubectl k (auto completes k)
  • Set context for env
kubectl config set-context <context of qn> --namespace <namespace of qn>
kubectl config set-context $(kubectl config current-context) --namespace abc (switching context to ns abc)
kubectl config view | grep namespace (verify namespace context)
  • Kubectl explain command
k explain pod.spec
k explain pod.spec.containers --recursive
k explain pod.spec | grep -i nodeselector (to confirm the attribute)
k explain pod.spec.nodeselector
  • Kubectl help command
k annotate --help | head -30
  • Grep from output
k describe pod <pod-name> | grep -i events -A 10
k describe pod <pod-name> | grep -i events -A 10 > events.txt (output it to file)
k describe pod <pod-name> | grep --context=10 Events: (output 10 lines above and below) 

The -A option essentially means 'after,' so you're saying give me the search results that start with 'events' and then the next 10 lines too.

k describe pods | grep -C 10 "author=John Doe" (grep surrounding 10 line of annotation)
k get pods -o yaml | grep -C 5 labels: (Print labels of all the pods in yaml output)
  • Get root privileges if need to login into another node
sudo -i
  • Bookmark kubernetes.io documentation important pages

  • bash commands

Curriculam

  • Core Concepts - 13%
    • API Primitives
    • Basic Pods
    • Replica Sets
    • Deployments
    • Namespaces
  • Configuration - 18%
    • Command and Arguments
    • ConfigMaps
    • Secrets
    • SecurityContexts
    • Resource Requirements
    • Service Accounts
    • Taints and Tolerations
  • Multi-Container Pods - 10%
    • Design Patterns: Ambassador, Adapter, Sidecar
  • Pod Design - 20%
    • Labels, Selectors, and Annotations
    • Deployments and Rolling Updates
    • Jobs and CronJobs
  • - State Persistence - 8%
    • Volumes and Mounts
    • Persistent Volume and Claims
  • Observability - 18%
    • Liveness and Readiness Probes
    • Container Logging and Debugging
  • Services and Networking - 13%
    • Services
    • Ingress
    • Networking Policies

Notes

Releases

No releases published

Packages

No packages published