Skip to main content

Chapter 51: Helm Charts for AI Services

Chapter 50 introduced Helm as "the package manager for Kubernetes" in a 45-minute lesson. You learned to install charts, create basic templates, and manage releases. That was enough to deploy—but not enough to architect.

This chapter transforms you from a Helm user into a Helm chart architect. You'll master advanced Go templating, compose multi-chart dependencies, orchestrate deployment lifecycles with hooks, distribute charts via OCI registries, and create organizational standards with library charts. By the end, you'll build production-grade charts that deploy your AI agent with a single command across any environment.

Prerequisites

Required from Chapter 50:

  • Kubernetes architecture (control plane, workers, declarative model)
  • Core primitives: Pods, Deployments, Services, ConfigMaps, Secrets
  • Advanced patterns: Init containers, sidecars, StatefulSets
  • Security: RBAC, SecurityContext, NetworkPolicy
  • Resource management: Requests/limits, HPA
  • Basic Helm: Chart structure, values.yaml, helm install/upgrade/rollback
  • Minikube cluster setup and kubectl operations

Proficiency Level: B1-B2 (Intermediate to Upper-Intermediate)

What You'll Learn

By the end of this chapter, you'll be able to:

  • Master Advanced Templating: Variables, pipelines, flow control, and named templates
  • Design Multi-Environment Charts: Values hierarchy, schema validation, environment-specific configs
  • Compose Chart Dependencies: Integrate PostgreSQL, Redis, and other subcharts
  • Orchestrate with Hooks: Pre-install migrations, post-upgrade notifications, test hooks
  • Validate Charts: Linting, template debugging, and integration testing
  • Distribute via OCI: Push, pull, and install from OCI-compliant registries
  • Create Library Charts: Organizational standards that enforce consistency
  • Build Reusable Intelligence: A Helm Chart Architect skill for AI-native development

Chapter Structure

Foundation Phase (Lessons 1-3): Templating Vocabulary

LessonTitleFocus
1Advanced Go TemplatingVariables, pipelines, conditionals, ranges
2Named Templates and Helpers_helpers.tpl, include vs template, scope rules
3Values Deep DiveHierarchy, schema validation, multi-environment configs

Application Phase (Lessons 4-6): Real-World Patterns

LessonTitleFocus
4Chart DependenciesSubcharts, conditions, tags, import-values
5Helm Hooks and Lifecycle9 hook types, weights, delete policies
6Testing Your Chartshelm lint, helm test, template debugging

Distribution Phase (Lessons 7-8): Enterprise Scaling

LessonTitleFocus
7OCI Registries and Distributionhelm push, helm pull, OCI URLs
8Library Charts and Standardizationtype: library, organizational patterns

Synthesis Phase (Lessons 9-11): Intelligence and Mastery

LessonTitleLayer
9AI-Assisted Chart DevelopmentLayer 2: AI Collaboration
10Capstone: Production AI Agent ChartLayer 4: Spec-Driven
11Building a Helm Chart SkillLayer 3: Intelligence Design

Differentiation from Chapter 50

Chapter 50 Lesson 20 covered:

  • Why Helm exists (repetitive YAML problem)
  • Basic chart structure (Chart.yaml, values.yaml, templates/)
  • Installing public charts (Bitnami Redis example)
  • Creating simple custom charts (helm create scaffold)
  • Basic release management (install, upgrade, rollback, uninstall)
  • Environment-specific values files (dev vs prod)

This chapter adds (not covered in Lesson 20):

  • Advanced Go templating (variables, with, range, named templates)
  • Chart dependencies and subchart composition
  • Helm hooks and lifecycle management
  • Chart testing strategies
  • OCI registry distribution
  • Library charts for organizational standards
  • Production patterns (umbrella charts, GitOps integration points)
  • AI-assisted chart development (Layer 2)
  • Reusable Helm skill creation (Layer 3)

Looking Ahead

After mastering Helm, you'll use your charts in:

  • Chapter 52 (Kafka): Event-driven architecture with Helm-deployed message brokers
  • Chapter 55 (CI/CD): GitOps pipelines that automatically deploy your Helm charts
  • Chapter 56 (Observability): Monitoring charts with Prometheus and Grafana dependencies