CKAD — Practice Questions

6 minute read

About These Practice Questions

These questions test your understanding of the CKAD exam fundamentals covered in the Introduction chapter — exam format, domains, kubectl skills, and overall readiness. They are designed to warm you up before the technical chapters.

Each question includes:

  • A scenario or task
  • A detailed answer with commands and expected output
  • A common mistake to watch out for

Questions

Q1: CKAD Exam Domains

What are the five CKAD exam domains and their weights?

Show Answer
  1. Application Design and Build — 20%
  2. Application Deployment — 20%
  3. Application Observability and Maintenance — 15%
  4. Application Environment, Configuration and Security — 25%
  5. Services and Networking — 20%

The largest domain is Environment, Configuration and Security at 25%.

Common mistake: Many candidates underestimate Domain 4 and spend too much time on Design & Build topics. Prioritize by weight.


Q2: CKAD vs CKA

How does the CKAD differ from the CKA exam? Name at least 5 specific differences.

Show Answer
Topic CKA CKAD
Cluster setup (kubeadm) ✅ Yes ❌ No
etcd backup/restore ✅ Yes ❌ No
Node troubleshooting ✅ Yes ❌ Minimal
Container image builds ❌ Minimal ✅ Yes
Pod design patterns ✅ Basic ✅ Deep focus
CRDs & Operators ❌ No ✅ Yes
Helm & Kustomize ✅ Basic ✅ More emphasis

The CKAD focuses on application development — working with Pods, Deployments, Services, ConfigMaps, and Secrets from a developer’s perspective. The CKA focuses on cluster administration — setting up clusters with kubeadm, managing etcd, troubleshooting nodes, and cluster-level security. CKAD does not test cluster setup, etcd backup/restore, or node-level troubleshooting.

Common mistake: Studying cluster admin topics (kubeadm, etcd) when preparing for CKAD. These are CKA topics.


Q3: Create a Pod Imperatively

Create a Pod named dev-pod with image nginx:1.27 using an imperative command, then generate its YAML without creating it.

Show Answer
# Create the Pod
kubectl run dev-pod --image=nginx:1.27

# Generate YAML without creating (dry run)
kubectl run dev-pod --image=nginx:1.27 --dry-run=client -o yaml

Expected YAML output:

apiVersion: v1
kind: Pod
metadata:
  labels:
    run: dev-pod
  name: dev-pod
spec:
  containers:
  - image: nginx:1.27
    name: dev-pod

Common mistake: Forgetting to use --dry-run=client (not --dry-run=server). The client flag doesn’t contact the API server, making it faster and usable even when a Pod with that name already exists.


Q4: Context and Namespace Switching

You need to quickly switch to a cluster named ckad-cluster2 and set the default namespace to staging. Write the commands and verify.

Show Answer
# Switch to the cluster
kubectl config use-context ckad-cluster2

# Set the default namespace
kubectl config set-context --current --namespace=staging

Verify:

kubectl config current-context
# Output: ckad-cluster2

kubectl config view --minify | grep namespace
# Output:   namespace: staging

Common mistake: Forgetting to switch context before working on a question. This is the #1 reason candidates lose easy points.


Q5: Allowed Resources

What resources are you allowed to access during the CKAD exam?

Show Answer

You can access:

  • https://kubernetes.io/docs/
  • https://kubernetes.io/blog/
  • https://github.com/kubernetes/

No other websites, bookmarks, or personal notes are allowed. You can also use kubectl explain and kubectl --help within the terminal.

Common mistake: Trying to access Stack Overflow, Medium articles, or personal bookmarks during the exam. This will be flagged by the proctor.


Q6: Create and Expose a Deployment

Create a Deployment named api-server with 3 replicas using the node:18-alpine image, then expose it as a ClusterIP Service on port 3000.

Show Answer
kubectl create deployment api-server --image=node:18-alpine --replicas=3
kubectl expose deployment api-server --port=3000 --target-port=3000 --type=ClusterIP

Verify:

kubectl get deployment api-server
# NAME         READY   UP-TO-DATE   AVAILABLE   AGE
# api-server   3/3     3            3           30s

kubectl get svc api-server
# NAME         TYPE        CLUSTER-IP     EXTERNAL-IP   PORT(S)    AGE
# api-server   ClusterIP   10.96.x.x      <none>        3000/TCP   10s

Common mistake: Forgetting --target-port. If your container listens on 3000, the targetPort must also be 3000. The --port flag sets the Service port; --target-port sets the container port.


Q7: kubectl explain Usage

Use kubectl explain to find the correct field path for setting a Pod’s restart policy. Then create a Pod with restartPolicy: Never.

Show Answer
# Find the field
kubectl explain pod.spec.restartPolicy
# KIND:     Pod
# VERSION:  v1
# FIELD:    restartPolicy <string>
# DESCRIPTION:
#   Restart policy for all containers within the pod.
#   One of Always, OnFailure, Never. Default to Always.

# Create a Pod with restartPolicy: Never
kubectl run one-shot --image=busybox --restart=Never -- /bin/sh -c "echo done"

Verify:

kubectl get pod one-shot -o jsonpath='{.spec.restartPolicy}'
# Output: Never

Common mistake: Not knowing that kubectl explain can drill into nested fields. Use dots to navigate: pod.spec.containers.resources.limits.


Q8: Generate and Modify YAML

Generate a Deployment YAML for web-app with image nginx:1.27 and 2 replicas. Without applying it, modify the YAML to add a container port of 80. Then apply it.

Show Answer
# Generate the YAML
kubectl create deployment web-app --image=nginx:1.27 --replicas=2 \
  --dry-run=client -o yaml > web-app.yaml

Edit the file to add the port:

apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: web-app
  name: web-app
spec:
  replicas: 2
  selector:
    matchLabels:
      app: web-app
  template:
    metadata:
      labels:
        app: web-app
    spec:
      containers:
      - image: nginx:1.27
        name: nginx
        ports:               # Add this
        - containerPort: 80  # Add this

Apply:

kubectl apply -f web-app.yaml

Verify:

kubectl get deployment web-app
kubectl describe deployment web-app | grep -A2 "Port"

Common mistake: Writing the YAML from scratch instead of generating it with --dry-run=client -o yaml. The hybrid approach (generate + edit) is always faster and less error-prone.


Q9: Time Management Scenario

You are 90 minutes into the exam with 6 questions remaining. Two are easy (2% each), two are medium (4% each), and two are hard (6% each). Your current score is estimated at 55%. What should you do?

Show Answer

Strategy:

  1. Solve the 2 easy questions first (estimated 2–3 min each) → +4% → ~59%
  2. Solve the 2 medium questions (estimated 5–7 min each) → +8% → ~67% ✅ Pass!
  3. Attempt the hard questions with remaining time → bonus points

Key insight: You need 66% to pass. With 55% + 4% (easy) + 8% (medium) = 67%, you pass even without touching the hard questions. Always prioritize guaranteed points over risky high-value questions.

Common mistake: Spending all remaining time on one hard question worth 6% when two easy questions worth 4% total can be solved in 5 minutes.


Q10: Setup Verification

Write a sequence of commands to verify your exam environment is working correctly at the start of the exam.

Show Answer
# 1. Set up aliases
alias k=kubectl
complete -o default -F __start_kubectl k
export do="--dry-run=client -o yaml"
export now="--force --grace-period 0"

# 2. Verify kubectl works
k version --short

# 3. Check available contexts
k config get-contexts

# 4. Check current context
k config current-context

# 5. Verify cluster access
k get nodes

# 6. Test dry run
k run test --image=nginx $do

# 7. Set up vi for YAML editing
echo 'set number tabstop=2 shiftwidth=2 expandtab' >> ~/.vimrc

This takes about 1–2 minutes and confirms everything is working before you start answering questions.

Common mistake: Jumping straight into questions without setting up aliases. Every kubectl typed instead of k wastes 6 characters × hundreds of commands = significant time.


Scoring Yourself

Score Readiness
10/10 You understand the exam format perfectly — move on to technical chapters
7–9/10 Good understanding — review the topics you missed
4–6/10 Re-read the Introduction sub-topics before proceeding
Below 4 Consider starting with the Kubernetes Foundation Tutorial first

What’s Next

Now that you understand the CKAD exam format, domains, environment, and strategies, you are ready to dive into the technical content. Start with the first exam domain topic:

Next chapter: Container Images & Builds — Learn how to build, manage, and optimize container images for Kubernetes.

Updated: