A production-ready Certified Kubernetes Administrator (CKA) exam practice environment deployed on AWS using Terraform. This simulator includes all 16 common CKA exam scenarios pre-configured and ready to practice.
- Overview
- Features
- Architecture
- Prerequisites
- Cost Estimate
- Quick Start
- Practice Questions
- Cost Management
- Troubleshooting
- Cleanup
- Contributing
This project creates a complete Kubernetes cluster on AWS with all CKA exam scenarios pre-configured. Perfect for:
- CKA Exam Preparation: Practice all common exam scenarios
- Hands-on Learning: Real Kubernetes cluster (not minikube/kind)
- Repeatable Environment: Destroy and recreate anytime
- Cost-Effective: ~$0.17/hour, stop when not practicing
- ✅ Kubernetes v1.31.0 cluster (kubeadm)
- ✅ 1 Control Plane + 3 Worker Nodes (t3.medium)
- ✅ Calico CNI with NetworkPolicy support
- ✅ AWS VPC with public subnets across 2 AZs
- ✅ Auto-generated SSH keys
- ✅ Encrypted EBS volumes
- ✅ Metrics Server (for HPA)
- ✅ NGINX Ingress Controller
- ✅ Gateway API CRDs
- ✅ cert-manager
- ✅ Local Path Provisioner (default StorageClass)
- ✅ Helm 3
- ✅ Argo CD Helm repository
- HorizontalPodAutoscaler (HPA)
- Ingress
- System Preparation
- Resource Requests/Limits
- Sidecar Container
- CNI Installation
- StorageClass
- Service with NodePort
- PriorityClass
- Argo CD with Helm
- PersistentVolume/PVC
- Gateway API
- NetworkPolicy
- Broken Cluster Troubleshooting
- cert-manager CRDs
- Immutable ConfigMap
| Resource | Cost/Hour | Cost/Day |
|---|---|---|
| 4x t3.medium instances | $0.166 | ~$4.00 |
| Storage + Data Transfer | $0.004 | ~$0.10 |
| TOTAL | ~$0.17/hour | ~$4/day |
💡 Tip: Stop instances when not practicing to save ~70% of costs!
# 1. Clone repository
git clone https://github.com/Tuhinzman/cka-simulator.git
cd cka-simulator
# 2. Configure your IP
export MY_IP=$(curl -4 -s ifconfig.me)
cat > terraform/terraform.tfvars <<EOF
my_ip = "${MY_IP}/32"
aws_region = "us-east-1"
cluster_name = "cka-simulator"
worker_count = 3
EOF
# 3. Deploy infrastructure
cd terraform
terraform init
terraform apply
sleep 180
# 4. Copy setup scripts
export CONTROL_IP=$(terraform output -raw control_plane_public_ip)
cd ..
scp -i terraform/cka-simulator-key.pem scripts/*.sh ubuntu@${CONTROL_IP}:/home/ubuntu/
# 5. SSH and bootstrap
ssh -i terraform/cka-simulator-key.pem ubuntu@${CONTROL_IP}
chmod +x /home/ubuntu/*.sh
sudo /home/ubuntu/00-bootstrap-cluster.sh
# 6. Join workers (copy join command, run on each worker)
# sudo kubeadm join ...
# 7. Install addons and setup questions
sudo /home/ubuntu/01-install-addons.sh
sudo /home/ubuntu/02-setup-all-questions.sh
# 8. Start practicing!
cat ~/questions-checklist.txtTotal Setup Time: ~35-50 minutes
For complete setup guide, troubleshooting, and all 16 question solutions, see the detailed guides in the repository.
# Check cluster health
kubectl get nodes
kubectl get pods -A
# View questions
cat ~/questions-checklist.txt
# Test metrics
kubectl top nodescd ~/cka-simulator/terraform
terraform destroy -auto-approveMIT License - see LICENSE file for details.
- Kubernetes Documentation
- CKA Exam Curriculum
- Terraform AWS Provider
- Calico CNI Project
If this helped you, please give it a star! ⭐
Repository: https://github.com/Tuhinzman/cka-simulator
Made with ❤️ for CKA exam preparation
Tuhin Zaman
- 🔗 LinkedIn: linkedin.com/in/tuhinzaman
- 🐙 GitHub: @Tuhinzman
- 💼 Role: Cloud DevOps Engineer
- 🎯 Certifications: AWS Solutions Architect Associate, CKA (In Progress)
- LinkedIn: https://www.linkedin.com/in/tuhinzaman/
- Issues: https://github.com/Tuhinzman/cka-simulator/issues
- Discussions: https://github.com/Tuhinzman/cka-simulator/discussions
💬 Feel free to reach out for questions, feedback, or collaboration opportunities!
Having issues? Check the comprehensive Troubleshooting Guide for solutions to common problems including:
⚠️ SSH Connection Timeout (IP changed)- Instances stopped/started
- Lost SSH key
- Metrics Server not working
- High AWS costs
- And more...