
Module 13 Exercises: Mastering the Clouds
Take the flight. Practice designing cloud-native architectures, comparing managed services, and implementing disaster recovery.
Module 13 Exercises: Mastering the Clouds
In Module 13, we explored how Kubernetes behaves in the "Real World" of Amazon, Google, and Microsoft. These exercises will help you think like a Cloud Architect, making the right trade-offs between cost, performance, and reliability.
Exercise 1: The EKS IP Audit
- Scenario: You are deploying a large AI agent on AWS EKS using the VPC CNI.
- Your subnet has 200 free IP addresses.
- You want to run 5 nodes, and each node can hold 40 pods.
- Calculation: How many IP addresses will your pods consume in total?
- The Problem: If you suddenly need to scale to 10 nodes, what will happen to your cluster?
- Solution: Name two ways (from Lesson 1) to solve the IP exhaustion problem in EKS.
Exercise 2: GKE Price Comparison
- Scenario: You have an AI model that needs 8 vCPUs and 32GB of RAM. It runs for exactly 1 hour a day to process a batch.
- Standard Mode: You have a pre-provisioned node group with an
e2-standard-8instance ($0.26/hour). You pay for the whole hour even if the pod takes 10 minutes. - Autopilot Mode: GKE Autopilot charges $0.0445 per vCPU/hour and $0.0049 per GB/hour.
- Task: Calculate the cost of running your 1-hour job on both.
- Thinking Task: If your workload is "Spiky" and unpredictable, which mode is safer for your cloud budget?
Exercise 3: Azure Arc Visualization
- Scenario: Your company has an on-premises data center with a physical Kubernetes cluster and an EKS cluster in AWS.
- Task: Design an Azure Arc architecture in text.
- Where does the "Azure Arc Agent" get installed?
- If you apply an "Azure Policy" to block
rootusers, which clusters are affected?
- Benefit: What is the "Single Pane of Glass" advantage of this setup?
Exercise 4: The Velero Rescue
- Preparation: Your
ai-productionnamespace contains 50 Secrets and 10 Persistent Volumes (PVs). - The Command: Write the
velerocommand to back up ONLY theai-productionnamespace and name itpre-migration-backup. - The Drill: You want to restore this into a different cluster. Write the restore command.
- Analysis: If the new cluster has different storage (e.g.
gp3on AWS vsstandardon GCP), how does Velero handle the conversion? (Hint: See Lesson 5).
Solutions (Self-Check)
Exercise 1 Answer:
- Calculation: 5 nodes * 40 pods = 200 IPs. You have exactly zero IPs left for your nodes to communicate or for other AWS services.
- Solution:
- Use Custom Networking (mapping pods to a larger subnet).
- Use Prefix Delegation (assigning multiple IPs to each Network Interface).
Exercise 2 Solution:
- Standard: $0.26 per day.
- Autopilot: (8 * 0.0445) + (32 * 0.0049) = $0.356 + $0.1568 = $0.512.
- Insight: Standard is cheaper for a constant load, but Autopilot is cheaper if the pod only runs for a few minutes because you don't pay for the "Idle" time of the VM.
Exercise 3 Hint:
The agent gets installed on both the on-prem and the EKS cluster. The Azure Policy affects all connected clusters. The advantage is that you manage security from one single dashboard.
Exercise 4 Logic:
- Backup:
velero backup create pre-migration-backup --include-namespaces ai-production. - Restore:
velero restore create --from-backup pre-migration-backup. - Conversion: You use StorageClass Mapping or a
ConfigMapto tell Velero: "When you see storage type A, replace it with storage type B."
Summary of Module 13
Congratulations! You have crossed the "Cloud Divide."
- You mastered EKS, GKE, and AKS.
- You know how to manage global, hybrid fleets with Anthos and Arc.
- You have built a reliable disaster recovery plan with Velero.
In Module 14: Real-World Projects, you will take the "Ultimate Test." You will put all these skills together to build a complete, production-grade AI platform.