Overview
This challenge set contains 10 practical tasks focused on core Kubernetes concepts including scheduling, workloads, services, RBAC, and storage. These tasks are essential for CKA exam preparation.Complete these challenges in order. Each builds on fundamental Kubernetes skills you’ll need in the exam.
Task 1: Scheduling - Guaranteed QoS
Task Requirements
Task Requirements
Objective:Deploy and modify a pod with Guaranteed Quality of Service.Skills Tested:
Create pod with Guaranteed QoS
Deploy pod named
heavy-pod:- CPU request:
50m - CPU limit:
50m - Memory request:
50Mi - Memory limit:
50Mi
- QoS class configuration
- Resource requests and limits
- Pod editing and recreation
Task 2: Workload & Scheduling - Deployment Revisions
Task Requirements
Task Requirements
Objective:Analyze deployment revision history to extract specific information.Scenario:
The deployment Skills Tested:
video-app has undergone several rolling updates and rollbacks.Tasks:- Find the total number of revisions
- Extract the image name used in the 3rd revision
- Record the information in file
app-file.txtusing format:
- Deployment revision history
- Rollout commands
- File output formatting
Task 3: Pod & Service Web App
Task Requirements
Task Requirements
Objective:Create a complete web application with pod, service, and test connectivity.Pod:
app-pod- Container name:
app-container - Image:
httpd:latest - Port:
80 - Label:
app=app-lab
app-svc- Type:
ClusterIP - Port:
80 - Selector: Matches
app-pod
- Use
kubectl port-forwardto map local port to the Pod - Use
curlto verify the app returns:It works!
- Pod creation with labels
- Service configuration and selectors
- Port forwarding
- Service connectivity testing
Task 4: ConfigMap - Basic Creation
Task Requirements
Task Requirements
Objective:Create a ConfigMap with literal key-value data.ConfigMap:
creds- Key:
username - Value:
batman
- ConfigMap creation from literal values
- Imperative command usage
Task 5: ConfigMap & Deployment Integration
Task Requirements
Task Requirements
Objective:Integrate a ConfigMap as environment variables in an existing deployment.Scenario:
Deployment
webapp-deployment needs dynamic environment variable control.Skills Tested:
- ConfigMap creation
- Environment variable injection
- Deployment modification
- ConfigMap references
Task 6: Complete Application Stack with HPA
Task Requirements
Task Requirements
Objective:Create a complete namespace with deployment, service, and autoscaling configured.Namespace:
testDeployment: testing-app- Namespace:
test - Replicas:
3 - Labels:
app=testing-app - Node selector:
cpu=i5 - QoS:
Burstable(set requests lower than limits) - Image:
nginx:latest - Container port:
80/tcp
testing-app-svc- Type:
ClusterIP - Port:
80 - Selector:
app=testing-app
testing-app-hpa- Min pods:
3 - Max pods:
10 - CPU utilization target:
20% - Scale-down behavior:
- Stabilization window:
30s - Max pods removed per interval: 1 pod per 20s
- Stabilization window:
- Scale-up behavior:
- Stabilization window:
20s - Max pods added per interval: 1 pod per 30s
- Stabilization window:
- Namespace creation
- Deployment with node selectors
- QoS configuration (Burstable)
- Service creation
- HPA with custom scaling policies
This is a comprehensive task. Break it down into steps: namespace → deployment → service → HPA. Verify each component before proceeding.
Task 7: Priority Classes
Task Requirements
Task Requirements
Objective:Create a PriorityClass and use it in a deployment.Skills Tested:
Create PriorityClass
Name:
high-valueValue: 2 less than maximum allowed (typically 1000000000 - 2 = 999999998)- PriorityClass creation
- Priority value configuration
- Deployment with priority class assignment
- Pod scheduling priority
Task 8: ConfigMap with HTML Template
Task Requirements
Task Requirements
Objective:Mount a ConfigMap as a file volume and update it dynamically.Namespace: Deployment: to:Verify the changes are reflected in the application.Skills Tested:
prodConfigMap: welcomewelcome-app- Image:
lovelearnlinux/webserver:v1 - Label:
app=welcome - QoS:
Burstable - Mount ConfigMap to
/var/www/html
welcome-app-svc- Type:
ClusterIP - Port:
80
- ConfigMap creation from file/data
- Volume mounting of ConfigMaps
- ConfigMap updates
- Application configuration management
Task 9: Affinity & Anti-Affinity
Task Requirements
Task Requirements
Objective:Practice pod affinity and anti-affinity for co-location and separation.Skills Tested:
Deploy dbapp with affinity
Pod name:
dbapp (deploy on the same node as webapp)- Image:
redis - Label:
name=dbapp - Use pod affinity with
topologyKey: kubernetes.io/hostname
- Pod affinity configuration
- Pod anti-affinity configuration
- Topology keys
- Scheduling constraints
Task 10: RBAC & Service Account
Task Requirements
Task Requirements
Objective:Create complete RBAC configuration with ServiceAccount, Role, and RoleBinding.Namespace:
nsoneExpected Results:
create pods: yesdelete pods: nolist configmaps: yes
- ServiceAccount creation
- Role definition with specific verbs
- RoleBinding configuration
- Permission testing with
auth can-i
RBAC is namespace-scoped when using Role and RoleBinding. For cluster-wide permissions, use ClusterRole and ClusterRoleBinding.
Practice Tips
Verify everything
After each task, verify resources are created and functioning:
kubectl getfor resource existencekubectl describefor detailed statuskubectl logsfor pod issues
Use imperative commands
Generate YAML with
--dry-run=client -o yaml and edit as needed rather than writing from scratch.Clean up between tasks
Delete resources from previous tasks to avoid confusion and resource conflicts.