Skip to main content
Updated Feb 10, 2026

Chapter 50: Kubernetes for AI Services

You build the kubernetes-deployment skill first, then refine it through core and optional lessons. The FastAPI agent from Part 6 is the running example you deploy and harden on Kubernetes.


Goals

  • Understand Kubernetes architecture (control plane, nodes, declarative model)
  • Deploy and operate workloads: Pods, Deployments, Services, Jobs, CronJobs
  • Configure apps with ConfigMaps/Secrets and namespace isolation
  • Manage resources and scaling: requests/limits, HPA, rolling updates
  • Secure clusters with RBAC, health probes, and best practices
  • Use kubectl-ai to generate/evaluate manifests
  • Produce a reusable Kubernetes deployment skill

Lesson Progression

#LessonFocus
0Build Your Kubernetes SkillScaffold from docs
1-5FundamentalsArchitecture, Pods, Deployments, Services
6-12Production EssentialsNamespaces, config, resources, HPA, RBAC, probes, batch
13AI Collaborationkubectl-ai for manifests and ops
14Capstone: Deploy AgentProduction deployment of the Part 6 API
15Test and Refine SkillValidate cross-application transferability
16-22 (Optional)Advanced PatternsInit/sidecars, ingress, discovery, stateful workloads, storage, deep security

Each lesson ends with a reflection to test, find gaps, and improve the skill.


Outcome & Method

You finish with your Part 6 FastAPI agent running on Kubernetes—secured, health-checked, and autoscaled—plus a Kubernetes deployment skill. The 4-Layer progression moves from fundamentals to AI-assisted manifests to a spec-driven capstone, with optional deep dives for advanced scenarios.


Prerequisites

  • Chapter 49 container image pushed to a registry
  • Docker Desktop with Kubernetes enabled (or equivalent local cluster)
  • Terminal familiarity; Kubernetes experience not required (Lesson 1 covers basics)