Skip to content

Exam Tips & Cheatsheets

Overview

This section provides everything you need for the final stretch of your CKS exam preparation. From environment setup to command cheatsheets, these resources are designed to be reviewed in the days leading up to your exam and used as quick references during practice sessions.

How to Use This Section

  1. Read through all pages at least once during your study period
  2. Practice the environment setup steps until they are muscle memory
  3. Review the cheatsheets the night before your exam
  4. During the exam, recall the patterns -- do NOT open this guide (use kubernetes.io instead)

Exam Day Strategy

Time Management Strategy

The CKS exam is 120 minutes with approximately 15-20 questions. Every minute counts.

Time Budget

PhaseDurationActivity
Setup2-3 minConfigure shell, aliases, autocompletion
Scan3-5 minRead every question, categorize difficulty
Quick wins20 minComplete all easy questions (4-5% weight)
Medium50 minWork through medium difficulty questions
Hard35 minTackle complex, multi-step questions
Review10 minVerify work, revisit flagged questions

Per-Question Time Limits

Question WeightMax TimeAction if Exceeded
4%5 minutesFlag immediately, move on
5-6%7 minutesOne more minute, then flag
7-8%10 minutesFinish current step, then flag
9-13%14 minutesThese are worth fighting for

The #1 Reason People Fail

Running out of time. Candidates get stuck on a hard question, spend 20+ minutes on it, and then rush through 5 easy questions they could have aced. Always do easy questions first.

Environment Setup Tips

First 2-3 Minutes of the Exam

These commands should be muscle memory:

bash
# 1. Set up kubectl alias and autocompletion
alias k=kubectl
source <(kubectl completion bash)
complete -o default -F __start_kubectl k

# 2. Export common variables
export do="--dry-run=client -o yaml"
export now="--force --grace-period=0"

# 3. Set up vim for YAML editing
cat >> ~/.vimrc << 'EOF'
set tabstop=2
set shiftwidth=2
set expandtab
set number
set autoindent
EOF

# 4. Verify cluster access
k get nodes

tmux Quick Setup

If the exam environment supports tmux:

bash
# Start tmux
tmux

# Split pane horizontally (for reference)
# Ctrl+b then "   (horizontal split)
# Ctrl+b then %   (vertical split)
# Ctrl+b then arrow keys to switch panes

What to Do First

Context Switching

Always check which cluster context you are in before starting a question. The most common mistake is applying a resource to the wrong cluster. Run:

bash
kubectl config current-context

before every question.

Common Mistakes to Avoid

YAML Mistakes

  • Indentation errors: YAML uses spaces, not tabs. A single wrong indent breaks everything
  • Missing namespace: Forgetting to specify -n namespace when applying resources
  • apiVersion mismatch: Using v1beta1 when v1 is required (check your Kubernetes version)

Security Context Mistakes

  • Setting readOnlyRootFilesystem: true without emptyDir volumes for /tmp, /var/cache, etc.
  • Forgetting to set allowPrivilegeEscalation: false -- this is required by the restricted PSS
  • Setting runAsNonRoot: true but not providing a runAsUser (some images default to root)

NetworkPolicy Mistakes

  • Applying to the wrong namespace
  • Forgetting DNS egress rules when using deny-all egress
  • Confusing namespaceSelector AND podSelector vs OR logic (single from entry = AND; separate from entries = OR)

RBAC Mistakes

  • Confusing Role (namespaced) with ClusterRole (cluster-wide)
  • Forgetting apiGroups: [""] for core resources (pods, services, secrets)
  • Using apiGroups: ["apps"] for pods (pods are in the core group "")

Static Pod Manifest Mistakes

  • Not waiting for the API server to restart after editing /etc/kubernetes/manifests/
  • Missing volume mounts for new file paths referenced in flags
  • Syntax errors that prevent the API server from starting (always check with crictl ps)

Available Resources

ResourceDescription
kubectl Security CheatsheetSecurity-focused kubectl commands by category
YAML TemplatesCopy-paste ready YAML for all common CKS resources
Tools ReferenceQuick reference for trivy, falco, kube-bench, and more
Exam Day ChecklistPre-exam and during-exam checklists with setup scripts

Allowed Documentation During the Exam

You are allowed to access the following during the CKS exam:

Bookmark key pages before your exam. See the Exam Day Checklist for recommended bookmarks.

Released under the MIT License.