By Sagar Shankaran, Founder of CallSphere
Build Helm charts for AI agent deployments — including chart structure, values files, Go templates, dependencies, and chart repositories for reusable, parameterized Kubernetes manifests.
Key takeaways
Deploying an AI agent to Kubernetes requires multiple resources: a Deployment, Service, ConfigMap, Secret, HPA, NetworkPolicy, and possibly PVCs and Ingress. Managing these as individual YAML files across development, staging, and production environments creates duplication and drift. Helm packages all resources into a single chart with parameterized values, making deployments repeatable and environment-specific configuration simple.
Create a new Helm chart:
flowchart LR
GIT(["Git push"])
CI["GitHub Actions<br/>build plus test"]
REG[("Container registry<br/>GHCR or ECR")]
HELM["Helm chart<br/>values per env"]
K8S{"Kubernetes cluster"}
DEP["Deployment<br/>rolling update"]
SVC["Service plus Ingress"]
HPA["HPA<br/>CPU and queue depth"]
POD[("Inference pods<br/>GPU node pool")]
USERS(["Production traffic"])
GIT --> CI --> REG --> HELM --> K8S
K8S --> DEP --> POD
K8S --> SVC --> POD
K8S --> HPA --> POD
SVC --> USERS
style CI fill:#4f46e5,stroke:#4338ca,color:#fff
style POD fill:#ede9fe,stroke:#7c3aed,color:#1e1b4b
style USERS fill:#059669,stroke:#047857,color:#fff
helm create ai-agent
This generates the following structure:
Hear it before you finish reading
Talk to a live CallSphere AI voice agent for IT support in your browser — 60 seconds, no signup.
ai-agent/
Chart.yaml # Chart metadata
values.yaml # Default configuration values
templates/
deployment.yaml # Deployment template
service.yaml # Service template
hpa.yaml # Autoscaler template
configmap.yaml # ConfigMap template
_helpers.tpl # Reusable template helpers
NOTES.txt # Post-install instructions
# Chart.yaml
apiVersion: v2
name: ai-agent
description: Helm chart for deploying AI agents to Kubernetes
type: application
version: 0.1.0
appVersion: "1.0.0"
keywords:
- ai
- agent
- llm
maintainers:
- name: AI Platform Team
email: platform@example.com
# values.yaml
replicaCount: 2
image:
repository: myregistry/ai-agent
tag: "1.0.0"
pullPolicy: IfNotPresent
agent:
modelName: "gpt-4o"
temperature: 0.7
maxTokens: 4096
logLevel: "INFO"
systemPrompt: |
You are a helpful AI assistant.
Answer questions accurately and concisely.
resources:
requests:
memory: "512Mi"
cpu: "250m"
limits:
memory: "2Gi"
cpu: "1000m"
autoscaling:
enabled: true
minReplicas: 2
maxReplicas: 20
targetCPUUtilization: 60
service:
type: ClusterIP
port: 80
targetPort: 8000
ingress:
enabled: false
hostname: agent.example.com
tls: true
persistence:
enabled: false
storageClass: "fast-ssd"
size: "50Gi"
# templates/deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "ai-agent.fullname" . }}
labels:
{{- include "ai-agent.labels" . | nindent 4 }}
spec:
{{- if not .Values.autoscaling.enabled }}
replicas: {{ .Values.replicaCount }}
{{- end }}
selector:
matchLabels:
{{- include "ai-agent.selectorLabels" . | nindent 6 }}
template:
metadata:
labels:
{{- include "ai-agent.selectorLabels" . | nindent 8 }}
annotations:
checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
spec:
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
- containerPort: {{ .Values.service.targetPort }}
envFrom:
- configMapRef:
name: {{ include "ai-agent.fullname" . }}-config
- secretRef:
name: {{ include "ai-agent.fullname" . }}-secrets
resources:
{{- toYaml .Values.resources | nindent 12 }}
{{- if .Values.persistence.enabled }}
volumeMounts:
- name: agent-data
mountPath: /data
{{- end }}
{{- if .Values.persistence.enabled }}
volumes:
- name: agent-data
persistentVolumeClaim:
claimName: {{ include "ai-agent.fullname" . }}-data
{{- end }}
The checksum/config annotation triggers a rolling restart whenever the ConfigMap changes, ensuring Pods always use the latest configuration.
# templates/_helpers.tpl
{{- define "ai-agent.fullname" -}}
{{- printf "%s-%s" .Release.Name .Chart.Name | trunc 63 | trimSuffix "-" }}
{{- end }}
{{- define "ai-agent.labels" -}}
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version }}
app.kubernetes.io/name: {{ .Chart.Name }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/version: {{ .Chart.AppVersion }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }}
{{- define "ai-agent.selectorLabels" -}}
app.kubernetes.io/name: {{ .Chart.Name }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}
Create override files for each environment:
# values-production.yaml
replicaCount: 5
image:
tag: "1.2.0"
agent:
modelName: "gpt-4o"
logLevel: "WARNING"
resources:
requests:
memory: "1Gi"
cpu: "500m"
limits:
memory: "4Gi"
cpu: "2000m"
autoscaling:
enabled: true
minReplicas: 5
maxReplicas: 50
ingress:
enabled: true
hostname: agent.prod.example.com
Deploy with environment-specific values:
# Development
helm install agent-dev ./ai-agent -n ai-dev -f values-dev.yaml
# Production
helm install agent-prod ./ai-agent -n ai-prod -f values-production.yaml
# Upgrade with new image tag
helm upgrade agent-prod ./ai-agent -n ai-prod \
-f values-production.yaml \
--set image.tag="1.3.0"
Include sub-charts for common infrastructure:
Still reading? Stop comparing — try CallSphere live.
See the IT support AI agent handle a real call — complete, industry-specific, and live in your browser. No signup.
# Chart.yaml
dependencies:
- name: redis
version: "18.x.x"
repository: "https://charts.bitnami.com/bitnami"
condition: redis.enabled
- name: postgresql
version: "13.x.x"
repository: "https://charts.bitnami.com/bitnami"
condition: postgresql.enabled
helm dependency update ./ai-agent
Never put actual secret values in values.yaml. Use helm-secrets with SOPS encryption, which encrypts values files at rest and decrypts them during deployment. Alternatively, create Secrets separately via a secrets manager and reference them by name in your Helm templates. For CI/CD pipelines, inject secrets as environment variables and use --set flags.
Helm maintains release history. Run helm rollback agent-prod 1 to revert to revision 1. Kubernetes performs a rolling update back to the previous Pod spec. Always test with helm upgrade --dry-run before applying changes to production. Set --history-max to control how many revisions Helm retains.
Yes. Install the same chart multiple times with different release names and values files. For example, deploy a triage agent and a specialist agent from the same base chart by overriding image.tag, agent.systemPrompt, and agent.modelName in separate values files. This reduces maintenance since infrastructure logic is defined once and parameterized per agent.
#Helm #Kubernetes #AIDeployment #InfrastructureAsCode #DevOps #AgenticAI #LearnAI #AIEngineering

Written by
Sagar Shankaran· Founder, CallSphere
LinkedInSagar Shankaran is the founder of CallSphere, where he builds production AI voice and chat agents deployed across healthcare, hospitality, real estate, and home services. He writes about agentic AI, LLM engineering, and shipping voice agents that handle real calls in production.
See how AI voice agents work for your industry. Live demo available -- no signup required.
See how Circini's automated incident management pipeline turns alert emails into triaged Jira tickets using Snowflake Cortex AI, GPT-4.1, Airflow & MS Teams.
How we built a fault-tolerant HVAC emergency triage and tech-dispatch platform on Kubernetes — three-tier CQRS, 11 micro-agents on the OpenAI Agents SDK + LangGraph, NATS JetStream, DTMF/SMS/WebSocket acceptance, circuit breakers, and an evaluation pipeline that catches regressions before they wake a tech at 3 AM.
k3s + hostPath volumes give CallSphere agent hot-reload without redeploys. Vapi customers ship through their pipeline. Engineering velocity matters.
AI agents now participate at every SDLC stage. What changes in requirements, design, review, and deploy when agents are first-class collaborators.
Treating evals as the test suite for agents finally clicks in 2026. The CI/CD pattern with PromptFoo, Braintrust, and GitHub Actions that catches regressions before production.
How to scale a voice AI platform to 100+ concurrent calls. K8s HPA, OpenAI Realtime pooling, Twilio media streams. CallSphere vs Vapi capacity tradeoffs.
© 2026 CallSphere Inc. All rights reserved.
Made within San Francisco
Watch how CallSphere handles real customer calls, schedules appointments, and processes payments — live.
Try Live DemoBook a DemoCalculate Your ROI