Skip to content

Part 2 Cumulative Quiz: Workloads & Scheduling

Lab Progress 0/9 completed

Purpose: Test your retention across all Part 2 modules before moving to Part 3.

Target Score: 80% (22/28) to proceed confidently

Time Limit: 20 minutes


Answer all 28 questions without referring to the modules. This quiz covers 15% of the CKA exam content.


  1. What’s the fastest way to create a Pod YAML template without applying it?

    Answer `kubectl run --image= --dry-run=client -o yaml`
  2. What container type runs to completion before main containers start?

    Answer Init containers
  3. What probe type determines if a container should receive traffic?

    Answer Readiness probe
  4. How do containers in the same Pod communicate?

    Answer Via localhost (they share the same network namespace)
  1. What command creates a Deployment with 3 replicas?

    Answer `kubectl create deployment --image= --replicas=3`
  2. What command updates a Deployment’s image?

    Answer `kubectl set image deployment/ =`
  3. What command shows rollout history for a Deployment?

    Answer `kubectl rollout history deployment/`
  4. What’s the default rolling update strategy parameter maxUnavailable?

    Answer 25%
  1. What workload type ensures one Pod per node?

    Answer DaemonSet
  2. What type of Service is required for StatefulSets?

    Answer Headless Service (clusterIP: None)
  3. In a StatefulSet named “web” with 3 replicas, what is the hostname of the first Pod?

    Answer web-0
  4. What StatefulSet field creates per-Pod PVCs?

    Answer volumeClaimTemplates
  1. What field makes a Job run 5 tasks in parallel?

    Answer `parallelism: 5`
  2. What CronJob schedule means “every day at midnight”?

    Answer `0 0 * * *`
  3. What Job field controls how many times a failed Pod is retried?

    Answer `backoffLimit`
  4. What restartPolicy must be used for Job Pods?

    Answer `Never` or `OnFailure` (not `Always`)
  1. What’s the difference between resource requests and limits?

    Answer Requests: guaranteed minimum (used for scheduling). Limits: maximum allowed (enforced at runtime).
  2. What QoS class does a Pod get when requests equal limits for all containers?

    Answer Guaranteed
  3. What resource sets namespace-wide quotas for CPU/memory?

    Answer ResourceQuota
  4. What happens when a container exceeds its memory limit?

    Answer The container is OOMKilled (terminated)
  1. What Pod field assigns a Pod to a node with a specific label?

    Answer `nodeSelector`
  2. What command adds a taint to a node?

    Answer `kubectl taint nodes key=value:effect` (e.g., `kubectl taint nodes node1 dedicated=gpu:NoSchedule`)
  3. What tolerations effect allows scheduling but prefers other nodes?

    Answer `PreferNoSchedule`
  4. What’s the difference between requiredDuringScheduling and preferredDuringScheduling?

    Answer Required: hard constraint (Pod won't schedule if unmet). Preferred: soft constraint (scheduler tries but will schedule elsewhere if needed).
  1. What command creates a ConfigMap from literal values?

    Answer `kubectl create configmap --from-literal=key=value`
  2. What happens to environment variables when you update a ConfigMap?

    Answer They don't update - the Pod must be restarted
  3. How do you decode a base64-encoded Secret value?

    Answer `kubectl get secret -o jsonpath='{.data.}' | base64 -d`
  4. What’s wrong with echo 'password' | base64 for creating Secrets?

    Answer It includes a newline character. Use `echo -n 'password' | base64` instead.

Count your correct answers:

ScoreAssessmentAction
25-28ExcellentReady for Part 3
20-24GoodReview missed topics, then proceed
15-19FairRe-read relevant modules, repeat quiz
<15Needs workComplete all module exercises again

If you missed questions, review these specific sections:

  • Q1-4: Module 2.1 - Pods Deep-Dive
  • Q5-8: Module 2.2 - Deployments & ReplicaSets
  • Q9-12: Module 2.3 - DaemonSets & StatefulSets
  • Q13-16: Module 2.4 - Jobs & CronJobs
  • Q17-20: Module 2.5 - Resource Management
  • Q21-24: Module 2.6 - Scheduling
  • Q25-28: Module 2.7 - ConfigMaps & Secrets

Before proceeding, ensure you can do these without help:

  • Create a multi-container Pod with shared volume in under 3 minutes
  • Deploy and scale a Deployment, then rollback to a previous revision
  • Create a Job that runs 5 parallel tasks with 10 total completions
  • Configure a Pod with resource requests, limits, and a readiness probe
  • Schedule a Pod to a specific node using nodeSelector
  • Taint a node and create a Pod with matching toleration
  • Create ConfigMaps and Secrets, inject both as env vars and volume mounts
  • Decode a Secret value from the command line

Time yourself on these common exam tasks:

TaskTarget Time
Create Pod with specific image15 seconds
Create Deployment with 3 replicas20 seconds
Update Deployment image15 seconds
Create ConfigMap from literals20 seconds
Create Secret and mount in Pod90 seconds
Add resource limits to existing Pod60 seconds
Create CronJob that runs hourly45 seconds

If you can’t meet these times, practice the drill sections in each module.


When you score 20/28 or higher and complete the practical assessment:

→ Continue to Part 3: Services & Networking

This covers 20% of the exam and teaches how Pods communicate within and outside the cluster.


Terminal window
# Pods
k run <name> --image=<img> $do # Generate Pod YAML
k run <name> --image=<img> --restart=Never # Create Job-like Pod
# Deployments
k create deploy <name> --image=<img> --replicas=N
k set image deploy/<name> <container>=<new-image>
k rollout status/history/undo deploy/<name>
k scale deploy/<name> --replicas=N
# Jobs
k create job <name> --image=<img> -- <command>
k create cronjob <name> --image=<img> --schedule="*/5 * * * *" -- <cmd>
# Config
k create configmap <name> --from-literal=k=v --from-file=path
k create secret generic <name> --from-literal=k=v
k get secret <name> -o jsonpath='{.data.<key>}' | base64 -d
# Scheduling
k taint nodes <node> key=value:NoSchedule
k taint nodes <node> key=value:NoSchedule- # Remove taint
k label nodes <node> key=value
# Resource Management
resources:
requests:
memory: "128Mi"
cpu: "250m"
limits:
memory: "256Mi"
cpu: "500m"
# Probes
readinessProbe:
httpGet:
path: /health
port: 8080
initialDelaySeconds: 5
periodSeconds: 10
# Node Selection
nodeSelector:
disk: ssd
# Tolerations
tolerations:
- key: "dedicated"
operator: "Equal"
value: "gpu"
effect: "NoSchedule"
# ConfigMap as env
envFrom:
- configMapRef:
name: app-config
# Secret as volume
volumes:
- name: secret-vol
secret:
secretName: app-secret