AI Intermediate: Infrastructure & Agentic SystemsDay 13 of 30 · Week 2: Kubernetes Foundation for MLOps
Course outline▾

Week 3 · High-Performance Networking & Security Mesh

  1. Day 15AI Network Bottlenecks: Transitioning from iptables to eBPF
  2. Day 16Cilium & eBPF: Sub-Millisecond Routing for Heavy AI Microservices
  3. Day 17Service Mesh 101: Installing Istio over Your Local Cluster
  4. Day 18Envoy Proxy as an AI Gateway: Load Balancing and Terminating LLM Prompts
  5. Day 19Zero-Trust mTLS: Encrypting Traffic Between Autonomous Agents
  6. Day 20API Rate Limiting & Egress Control: Preventing Agents from Exfiltrating Data
  7. Day 21Distributed Tracing: Debugging Agent Workflows with Jaeger and OpenTelemetry

Week 4 · Enterprise Agents & CI/CD Workflows

  1. Day 22Introduction to MLOps: Bridging AI Development with Continuous Integration
  2. Day 23GitOps with ArgoCD: Automated, Self-Healing AI Deployments
  3. Day 24Building Ephemeral AI Sandboxes: Secure Execution Environments for Agent Code
  4. Day 25Multi-Agent Orchestration Frameworks: Exploring Mastra, LangGraph, and CrewAI
  5. Day 26Tool-Calling in Production: Connecting Agents Securely to Internal Databases
  6. Day 27MLOps Guardrails: Evaluating Agents and Preventing Hallucinations in Real-Time
  7. Day 28Continuous Training Pipelines: Connecting Data Ingestion to Automated Model Retraining
  8. Day 29Managing Technical Debt and Infrastructure Drift in Enterprise AI
  9. Day 30The AI-Native Platform: Scaling from a Sandbox Environment to Global Cloud Architecture
Open the course page →

Day 13: Helm Charts — Packaging, Versioning and Updating AI Deployments

2026-11-19 · 7 min read

A real AI stack has dozens of manifests across development, staging and production. Copied by hand, they drift: someone fixes staging, forgets production, and nobody knows which version is the truth. Helm bundles the manifests into a versioned, parameterised chart, so you roll out and roll back with a single command.

MANIFESTS DRIFT ACROSS ENVIRONMENTSCopy-pasted YAMLOne Helm chart + values filesdevv1 ... v7?stagingedited by handprodv1 ... v7?which one is the truth?chart v1.2.0templates + defaultsvalues-devvalues-stagingvalues-prodOne versioned package. Environment differences live in small values files.
FIG 1 · Copy-pasted manifests drift apart. A Helm chart is one versioned, parameterised package, and each environment supplies only its own values.

Chart layout

A CHART ON DISKhelm-ai-stack/├─ Chart.yamlname, version v1.2.0 (SemVer)├─ values.yamldefaults for every setting├─ values-staging.yamllower RAM├─ values-prod.yamlmulti-node, high RAM├─ templates/├─ deployment-llm.yamlthe vLLM Deployment├─ statefulset-db.yamlQdrant├─ service.yaml├─ hpa.yamlautoscaling
FIG 2 · A chart holds metadata, default values, one values file per environment and a templates folder with the Kubernetes manifests.
  • Chart.yaml holds the chart name and a SemVer version.
  • values.yaml holds defaults for every setting.
  • values-staging.yaml and values-prod.yaml override only what differs, such as RAM or replica counts.
  • templates/ holds the Kubernetes manifests, written as templates.

Values and templates

# values.yaml
global:
  environment: production
  namespace: ai-platform

inferenceEngine:
  modelName: gemma-2-2b-it-awq
  image: vllm/vllm-openai:v0.5.0
  replicas: 2
  quantization: awq
  contextLength: 4096
  gpuMemoryUtilization: 0.85
  resources:
    requests: { cpu: "2", memory: 4Gi }
    limits:   { cpu: "4", memory: 8Gi }

vectorDatabase:
  image: qdrant/qdrant:v1.9.0
  replicas: 3
  storageSize: 20Gi
  storageClass: local-storage

autoscaling:
  enabled: true
  minReplicas: 1
  maxReplicas: 4
  targetQueueDepth: 10
# templates/deployment-llm.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ .Release.Name }}-llm
  namespace: {{ .Values.global.namespace }}
spec:
  replicas: {{ .Values.inferenceEngine.replicas }}
  selector:
    matchLabels: { app: {{ .Release.Name }}-llm }
  template:
    metadata:
      labels: { app: {{ .Release.Name }}-llm }
    spec:
      containers:
        - name: vllm
          image: {{ .Values.inferenceEngine.image }}
          args:
            - --model=/models/{{ .Values.inferenceEngine.modelName }}
            - --quantization={{ .Values.inferenceEngine.quantization }}
            - --max-model-len={{ .Values.inferenceEngine.contextLength }}
          resources:
            {{- toYaml .Values.inferenceEngine.resources | nindent 12 }}
VALUES + TEMPLATE = MANIFESTvalues.yamlinferenceEngine: replicas: 2 modelName: gemma-2-2b-it-awq contextLength: 4096templates/deployment-llm.yamlname: {{ .Release.Name }}-llmreplicas: {{ .Values. inferenceEngine.replicas }}resources: {{ toYaml ... | nindent 12 }}renderedname: local-ai-llmreplicas: 2resources: limits: ...Check the result before applying: helm template, or install --dry-run --debug.
FIG 3 · Helm merges your values into the templates to produce plain Kubernetes manifests. Always preview with helm template or a dry run.

Helm merges your values into the templates to produce plain Kubernetes YAML. Preview the result before you apply it with helm template, or --dry-run --debug.

Releases and rollbacks

helm lint ./helm-ai-stack
helm install local-ai ./helm-ai-stack --dry-run --debug
helm upgrade --install local-ai ./helm-ai-stack -f ./helm-ai-stack/values-staging.yaml
helm history local-ai
helm rollback local-ai 1
RELEASES ARE REVERSIBLErev 1installrev 2upgraderev 3upgrade (bad)rev 4rollback to 1helm lint ./helm-ai-stackhelm upgrade --install local-ai ./helm-ai-stack -f values-staging.yamlhelm history local-ai helm rollback local-ai 1Every change is a numbered revision, and a rollback is one command.
FIG 4 · Helm records each release as a numbered revision, so a bad upgrade can be undone with a single rollback command.

Each install or upgrade creates a numbered revision, and helm rollback returns to an earlier one in a single step. Version the chart in Git, keep image tags pinned and use one values file per environment, and your deployments become reviewable, repeatable and reversible.

Run it yourself

This is the exact example from the video. Real helm lint and helm template on a small chart. The template is trimmed from the lesson's version to fit.

apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ .Release.Name }}-llm
spec:
  replicas: {{ .Values.inferenceEngine.replicas }}
  selector:
    matchLabels: { app: {{ .Release.Name }}-llm }
  template:
    metadata:
      labels: { app: {{ .Release.Name }}-llm }
    spec:
      containers:
        - name: vllm
          image: {{ .Values.inferenceEngine.image }}
          args:
            - --quantization={{ .Values.inferenceEngine.quantization }}

Helper file Chart.yaml, used by the run:

apiVersion: v2
name: helm-ai-stack
version: 0.1.0

Helper file values.yaml, used by the run:

inferenceEngine:
  image: vllm/vllm-openai:v0.5.0
  replicas: 2
  quantization: awq

Helper file values-staging.yaml, used by the run:

inferenceEngine:
  replicas: 1

Run it:

helm template local-ai . -f values-staging.yaml

Output I got while recording the video:

1 chart(s) linted, 0 chart(s) failed
name: local-ai-llm
replicas: 1
image: vllm/vllm-openai:v0.5.0
- --quantization=awq

Coming Up Next

Day 14: Week 2 capstone: deploying a highly available local AI application on K3d.

#Helm #Kubernetes #InfrastructureAsCode #DevOps #CICD #PlatformEngineering #ReleaseManagement