Part 2 Cumulative Quiz: Workloads & Scheduling
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
Instructions
Section titled “Instructions”Answer all 28 questions without referring to the modules. This quiz covers 15% of the CKA exam content.
Questions
Section titled “Questions”Pods Deep-Dive (Module 2.1)
Section titled “Pods Deep-Dive (Module 2.1)”-
What’s the fastest way to create a Pod YAML template without applying it?
Answer
`kubectl run--image= --dry-run=client -o yaml`
-
What container type runs to completion before main containers start?
Answer
Init containers -
What probe type determines if a container should receive traffic?
Answer
Readiness probe -
How do containers in the same Pod communicate?
Answer
Via localhost (they share the same network namespace)
Deployments & ReplicaSets (Module 2.2)
Section titled “Deployments & ReplicaSets (Module 2.2)”-
What command creates a Deployment with 3 replicas?
Answer
`kubectl create deployment--image= --replicas=3`
-
What command updates a Deployment’s image?
Answer
`kubectl set image deployment/= ` -
What command shows rollout history for a Deployment?
Answer
`kubectl rollout history deployment/` -
What’s the default rolling update strategy parameter maxUnavailable?
Answer
25%
DaemonSets & StatefulSets (Module 2.3)
Section titled “DaemonSets & StatefulSets (Module 2.3)”-
What workload type ensures one Pod per node?
Answer
DaemonSet -
What type of Service is required for StatefulSets?
Answer
Headless Service (clusterIP: None) -
In a StatefulSet named “web” with 3 replicas, what is the hostname of the first Pod?
Answer
web-0 -
What StatefulSet field creates per-Pod PVCs?
Answer
volumeClaimTemplates
Jobs & CronJobs (Module 2.4)
Section titled “Jobs & CronJobs (Module 2.4)”-
What field makes a Job run 5 tasks in parallel?
Answer
`parallelism: 5` -
What CronJob schedule means “every day at midnight”?
Answer
`0 0 * * *` -
What Job field controls how many times a failed Pod is retried?
Answer
`backoffLimit` -
What restartPolicy must be used for Job Pods?
Answer
`Never` or `OnFailure` (not `Always`)
Resource Management (Module 2.5)
Section titled “Resource Management (Module 2.5)”-
What’s the difference between resource requests and limits?
Answer
Requests: guaranteed minimum (used for scheduling). Limits: maximum allowed (enforced at runtime). -
What QoS class does a Pod get when requests equal limits for all containers?
Answer
Guaranteed -
What resource sets namespace-wide quotas for CPU/memory?
Answer
ResourceQuota -
What happens when a container exceeds its memory limit?
Answer
The container is OOMKilled (terminated)
Scheduling (Module 2.6)
Section titled “Scheduling (Module 2.6)”-
What Pod field assigns a Pod to a node with a specific label?
Answer
`nodeSelector` -
What command adds a taint to a node?
Answer
`kubectl taint nodeskey=value:effect` (e.g., `kubectl taint nodes node1 dedicated=gpu:NoSchedule`) -
What tolerations effect allows scheduling but prefers other nodes?
Answer
`PreferNoSchedule` -
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).
ConfigMaps & Secrets (Module 2.7)
Section titled “ConfigMaps & Secrets (Module 2.7)”-
What command creates a ConfigMap from literal values?
Answer
`kubectl create configmap--from-literal=key=value` -
What happens to environment variables when you update a ConfigMap?
Answer
They don't update - the Pod must be restarted -
How do you decode a base64-encoded Secret value?
Answer
`kubectl get secret-o jsonpath='{.data. }' | base64 -d` -
What’s wrong with
echo 'password' | base64for creating Secrets?Answer
It includes a newline character. Use `echo -n 'password' | base64` instead.
Scoring
Section titled “Scoring”Count your correct answers:
| Score | Assessment | Action |
|---|---|---|
| 25-28 | Excellent | Ready for Part 3 |
| 20-24 | Good | Review missed topics, then proceed |
| 15-19 | Fair | Re-read relevant modules, repeat quiz |
| <15 | Needs work | Complete all module exercises again |
Weak Area Review
Section titled “Weak Area Review”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
Practical Assessment
Section titled “Practical Assessment”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
Speed Drill Challenge
Section titled “Speed Drill Challenge”Time yourself on these common exam tasks:
| Task | Target Time |
|---|---|
| Create Pod with specific image | 15 seconds |
| Create Deployment with 3 replicas | 20 seconds |
| Update Deployment image | 15 seconds |
| Create ConfigMap from literals | 20 seconds |
| Create Secret and mount in Pod | 90 seconds |
| Add resource limits to existing Pod | 60 seconds |
| Create CronJob that runs hourly | 45 seconds |
If you can’t meet these times, practice the drill sections in each module.
Next Steps
Section titled “Next Steps”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.
Part 2 Quick Reference
Section titled “Part 2 Quick Reference”Essential Commands
Section titled “Essential Commands”# Podsk run <name> --image=<img> $do # Generate Pod YAMLk run <name> --image=<img> --restart=Never # Create Job-like Pod
# Deploymentsk create deploy <name> --image=<img> --replicas=Nk set image deploy/<name> <container>=<new-image>k rollout status/history/undo deploy/<name>k scale deploy/<name> --replicas=N
# Jobsk create job <name> --image=<img> -- <command>k create cronjob <name> --image=<img> --schedule="*/5 * * * *" -- <cmd>
# Configk create configmap <name> --from-literal=k=v --from-file=pathk create secret generic <name> --from-literal=k=vk get secret <name> -o jsonpath='{.data.<key>}' | base64 -d
# Schedulingk taint nodes <node> key=value:NoSchedulek taint nodes <node> key=value:NoSchedule- # Remove taintk label nodes <node> key=valueKey YAML Patterns
Section titled “Key YAML Patterns”# Resource Managementresources: requests: memory: "128Mi" cpu: "250m" limits: memory: "256Mi" cpu: "500m"
# ProbesreadinessProbe: httpGet: path: /health port: 8080 initialDelaySeconds: 5 periodSeconds: 10
# Node SelectionnodeSelector: disk: ssd
# Tolerationstolerations:- key: "dedicated" operator: "Equal" value: "gpu" effect: "NoSchedule"
# ConfigMap as envenvFrom:- configMapRef: name: app-config
# Secret as volumevolumes:- name: secret-vol secret: secretName: app-secret