litellm/litellm/deploy/helm/litellm
2026-11-17 14:10:01 -08:00
..
ci chore: move deployment sources under litellm/deploy (#50981) 2026-11-12 04:19:56 +00:00
templates feat(helm): allow labels and annotations on the gateway ConfigMap (#44061) 2026-11-17 14:10:01 -08:00
tests feat(helm): allow labels and annotations on the gateway ConfigMap (#44061) 2026-11-17 14:10:01 -08:00
.helmignore chore: move deployment sources under litellm/deploy (#50981) 2026-11-12 04:19:56 +00:00
Chart.yaml chore: move deployment sources under litellm/deploy (#50981) 2026-11-12 04:19:56 +00:00
README.md feat(control-plane): runtime dataplane and role writes via redis stream and postgres (#51762) 2026-11-16 17:36:25 +00:00
values.schema.json chore: move deployment sources under litellm/deploy (#50981) 2026-11-12 04:19:56 +00:00
values.yaml feat(helm): allow labels and annotations on the gateway ConfigMap (#44061) 2026-11-17 14:10:01 -08:00

litellm Helm chart

Deploys LiteLLM from one image, ghcr.io/berriai/litellm (mirrored at docker.litellm.ai/berriai/litellm), in one of two layouts:

  • componentized (default): the gateway (LLM data plane, port 4000), the backend (management API, port 4001) and the ui (static dashboard, port 3000) each get their own Deployment, Service, HPA and PDB so they scale independently
  • monolith: monolith.enabled: true renders one Deployment and Service running the full proxy (args: [proxy, ...]), which serves the gateway routes, the management routes and the Admin UI from a single process

Both layouts run the same image. The image entrypoint dispatches on the first container argument (proxy, gateway, backend, ui, migrations, metrics, collector), so the chart only ever sets args and never command

Requirements

Kubernetes 1.25+ and Helm 3.8+. Bring your own PostgreSQL (database.writer.*) and, optionally, Redis (redis.*). The proxy also needs a master key, either an existing Secret named by masterKey.secretName or one the chart generates with masterKey.generate: true and masterKey.secretName: ""

Install

kubectl create secret generic litellm-master-key-secret --from-literal=master-key=sk-change-me
helm install litellm litellm/deploy/helm/litellm \
  --set database.writer.host=postgres.example.com \
  --set database.writer.dbname=litellm \
  --set database.writer.passwordSecret.name=litellm-db-secret

The image tag defaults to the chart's appVersion. Override it with image.tag, or pin the bytes with image.digest, which renders as repository:tag@digest

Monolith quickstart

helm install litellm litellm/deploy/helm/litellm \
  --set monolith.enabled=true \
  --set masterKey.secretName="" \
  --set masterKey.generate=true \
  --set database.writer.host=postgres.example.com \
  --set database.writer.dbname=litellm \
  --set database.writer.passwordSecret.name=litellm-db-secret
kubectl port-forward svc/litellm-litellm 4000:4000

With monolith.enabled: true:

  • one Deployment and one Service named <release>-litellm render, running args: [proxy, --port, 4000, --config, /app/config/config.yaml] plus monolith.extraArgs
  • the gateway, backend and ui Deployments, Services, HPAs, PDBs and ServiceMonitors are not rendered, whatever gateway.enabled, backend.enabled and ui.enabled say
  • every gateway.* value configures the monolith pod: config, numWorkers, resources, probes, securityContext, hpa, keda, pdb, metricsServer, collector, volumes, extraEnv, scheduling. The monolith runs as serviceAccounts.gateway
  • every backend.* and ui.* value is ignored
  • the Ingress sends every path, built in or from ingress.extraPaths, to the monolith Service
  • the migrations Job renders exactly as in componentized mode

Lens

This chart does not deploy Lens. Deploy Lens from its own chart, then set lens.enabled: true, lens.url, lens.publicUrl, lens.gatewaySecret.name and lens.serviceTokenSecret.name. The secret keys default to gateway-secret and service-token. Set lens.service.name when that Lens runs in this release's namespace and the chart ingress should route /lens-ingest to it. The old lensWorker values are no longer read, and enabling them fails the render

For an ingress with separate component hostnames, set all three ingress.componentHosts values, leave ingress.host and ingress.extraPaths empty, configure ui.backendUrl as the backend's public origin and backend.gatewayUrl as the gateway's public origin, and set ui.publicUrl to the browser-facing UI origin. The UI Deployment receives LITELLM_BACKEND_URL from ui.backendUrl only when ingress.componentHosts is configured.

ingress:
  enabled: true
  host: ""
  componentHosts:
    ui: ui.example.com
    backend: backend.example.com
    gateway: gateway.example.com
  extraPaths: []
ui:
  publicUrl: https://ui.example.com
  backendUrl: https://backend.example.com
backend:
  gatewayUrl: https://gateway.example.com

Control plane migrations

Set migrationJob.mode to control-plane to migrate the control plane's PostgreSQL database. The default data-plane mode runs Prisma migrations for the gateway and backend. The control plane mode runs litellm --control-plane --skip_server_startup through the shared image's entrypoint.

migrationJob:
  mode: control-plane
  controlPlane:
    databaseSecret:
      name: control-plane-migrations
      key: database-url

Create this Secret before installation. Its key must contain a direct PostgreSQL URL for the control plane database. The Job needs at least two database connections. Control plane migrations use this Secret and migrationJob.extraEnv, without the data plane's database or Redis settings.

Helm runs the Job before install and upgrade by default. For Argo CD, select its PreSync hook:

migrationJob:
  hooks:
    helm:
      enabled: false
    argocd:
      enabled: true

Argo CD deletes successful Jobs and recreates the named hook on the next sync. Failed Jobs remain until the next sync. The chart omits ttlSecondsAfterFinished when the Argo CD hook is enabled so the TTL controller cannot delete the Job before Argo CD records its result. Helm hooks retain the configured TTL. Run a full application sync because selective syncs skip hooks.

migrationJob.command and migrationJob.args override either mode's command. Setting only command clears the default arguments.

Testing

helm lint litellm/deploy/helm/litellm
helm unittest -f 'tests/*.yaml' litellm/deploy/helm/litellm
helm test <release> --logs

Migrating from the litellm-helm chart

The litellm-helm chart (oci://ghcr.io/berriai/litellm-helm) is retired; its published packages stay available for a grace period. Its flat values described one monolith Deployment, so the equivalent install here is monolith.enabled: true with the values moved under gateway.*. The per-component gateway.image, backend.image, ui.image and migrations.image blocks of earlier litellm/deploy/helm/litellm versions are gone too: the chart is a major bump to 1.0.0 and every container uses the top-level image

litellm-helm value litellm value
(implicit single Deployment) monolith.enabled: true
image.repository / image.tag / image.pullPolicy image.repository / image.tag / image.pullPolicy (image.digest is new)
replicaCount gateway.replicaCount
args monolith.extraArgs (appended after the chart's proxy arguments). Drop any --port argument and its value so the proxy keeps listening on port 4000, matching the container port and health checks. Set gateway.service.port to change the external Service port
command removed: the image entrypoint dispatcher must stay in place
proxy_config gateway.config.proxy_config
proxyConfigMap.create: false + proxyConfigMap.name Set gateway.config.create: false, mount your ConfigMap with gateway.volumes / gateway.volumeMounts, and pass --config followed by the mounted file path in monolith.extraArgs
masterkeySecretName / masterkeySecretKey masterKey.secretName / masterKey.secretKey. The default Secret field changes from masterkey to master-key. When reusing a Secret with the old default field, explicitly set masterKey.secretKey: masterkey
masterkeySecretName: "" (auto generated Secret) masterKey.generate: true with masterKey.secretName: "" (creates a new key; copy the old key first, see below, to keep existing credentials valid)
db.useExisting, db.endpoint, db.database database.writer.host, database.writer.port, database.writer.dbname
db.useIAMAuth / db.useAzureEntraAuth database.writer.useIAMAuth / database.writer.useAzureEntraAuth (mutually exclusive). Both token-auth modes still require a username in the Secret referenced by database.writer.passwordSecret.name and usernameKey
db.schema database.writer.schema
db.username Store the username in the Secret referenced by database.writer.passwordSecret.name, under its usernameKey. There is no literal username value in the new chart
db.secret.name / db.secret.usernameKey / db.secret.passwordKey database.writer.passwordSecret.name / usernameKey / passwordKey
db.secret.endpointKey (writer host read from a Secret) database.writer.passwordSecret.hostKey with database.writer.host left empty
db.url (custom URL template) database.writer.passwordSecret.urlKey pointing at a Secret key that holds the complete writer URL, with the other database.writer.* connection values left empty
db.readReplicaUrl (credential-less reader URL) database.reader.host, database.reader.port, database.reader.dbname, with database.reader.passwordSecret.* for its credentials (or database.reader.useIAMAuth: true)
db.secret.readReplicaEndpointKey (reader host read from a Secret) database.reader.passwordSecret.hostKey with database.reader.host left empty
db.secret.readReplicaUrlKey (full reader URL in a Secret) database.reader.passwordSecret.urlKey with the other database.reader.* connection values left empty
db.connectionPool.* database.connectionPool.*
db.deployStandalone: true / postgresql.* removed: the chart ships no PostgreSQL, point database.writer.* at your own
redis.enabled: true (bundled) removed: the chart ships no Redis, point redis.host at your own
external Redis via envVars redis.host, redis.port, redis.passwordSecret.*, redis.cluster
envVars / extraEnvVars gateway.extraEnv (list of name / value or valueFrom entries). The retired chart also passed these to the migration Job, so copy any it needs, such as the AWS region and credentials for IAM database auth, into migrationJob.extraEnv too
environmentSecrets gateway.envSecrets
environmentConfigMaps gateway.envConfigMaps
logLevel gateway.logLevel
resources gateway.resources
livenessProbe / readinessProbe / startupProbe gateway.livenessProbe / gateway.readinessProbe / gateway.startupProbe, written as full Kubernetes probes: the old path: /health/readiness becomes httpGet: { path: /health/readiness, port: http }, the timing fields (initialDelaySeconds, periodSeconds, timeoutSeconds, successThreshold, failureThreshold) carry over unchanged
securityContext / podSecurityContext gateway.securityContext / gateway.podSecurityContext. With readOnlyRootFilesystem: true the retired chart added emptyDir mounts at /tmp, /.cache and /.npm; this chart does not, so add them through gateway.volumes / gateway.volumeMounts. The retired chart applied both to the migration Job as well; set migrationJob.securityContext / migrationJob.podSecurityContext to keep the Job under the same policy
service.* gateway.service.*
ingress.className, ingress.annotations, ingress.tls same keys (routes to the monolith Service in monolith mode)
ingress.hosts[].host ingress.host, one host per release; the built-in paths are rendered for that host, so ingress.hosts[].paths has no equivalent. For more than one hostname, add a second Ingress through extraResources or point a DNS alias at the one host
autoscaling.* gateway.hpa.*. Defaults change from 100 to 10 maximum replicas and from 60% to 70% CPU utilization, with an 80% memory target now enabled. To keep the old scaling behavior, set gateway.hpa.maxReplicas: 100, gateway.hpa.targetCPUUtilizationPercentage: 60 and gateway.hpa.targetMemoryUtilizationPercentage: 0
keda.* gateway.keda.* with these renames: minReplicas / maxReplicas are minReplicaCount / maxReplicaCount (the new default maximum is 10, the old one was 100), behavior moves to advanced.horizontalPodAutoscalerConfig.behavior, restoreToOriginalReplicaCount moves to advanced.restoreToOriginalReplicaCount, and keda.prometheus.requestsPerSecond / tokensPerSecond are gateway.keda.prometheus.targetRequestsPerSecond / targetTokensPerSecond. pollingInterval, cooldownPeriod, fallback, triggers and scaledObject.annotations (for example KEDA's pause annotations) keep their names
numWorkers gateway.numWorkers
pdb.* gateway.pdb.*, except labels and annotations are no longer supported. To retain custom PDB metadata, set gateway.pdb.enabled: false and define the PDB through extraResources
metricsServer.* gateway.metricsServer.*
serviceMonitor.* gateway.serviceMonitor.* (labels, annotations, interval, scrapeTimeout, relabelings, namespaceSelector.matchNames); it now requires gateway.metricsServer.enabled
collector.* gateway.collector.*, except command is no longer supported and scaleOnProxyContainerCpu becomes scaleOnGatewayContainerCpu. Its default changes from false to true. Set gateway.collector.scaleOnGatewayContainerCpu: false to keep pod-wide CPU scaling. For a custom collector command, disable the built-in sidecar with gateway.collector.enabled: false and define it through gateway.extraContainers, with its environment, volumes and volume mounts configured explicitly
billingMetrics.* billingMetrics.*
migrationJob.* migrationJob.*
volumes / volumeMounts gateway.volumes / gateway.volumeMounts. The retired chart also mounted these in the migration Job; copy any mounts the Job needs, such as a database CA certificate, to migrationJob.volumes / migrationJob.volumeMounts too
extraContainers / extraInitContainers gateway.extraContainers / gateway.extraInitContainers
lifecycle gateway.lifecycle
strategy gateway.strategy
deploymentAnnotations / deploymentLabels / deploymentMinReadySeconds gateway.deploymentAnnotations / gateway.deploymentLabels / gateway.minReadySeconds
podAnnotations / podLabels gateway.podAnnotations / gateway.podLabels. The retired chart ran podAnnotations through tpl; this chart renders them verbatim, so a copied template such as checksum/config: {{ ... }} stays literal text. Resolve it before install instead, e.g. --set-string gateway.podAnnotations.checksum/config=$(kubectl get configmap my-config -o yaml | sha256sum | cut -d' ' -f1). The chart's own proxy ConfigMap already rolls the pods when gateway.config changes. The retired chart also put podLabels on the migration Job pod; copy any the Job needs, such as a network-policy selector, to migrationJob.podLabels
nodeSelector / tolerations / affinity / topologySpreadConstraints gateway.nodeSelector / gateway.tolerations / gateway.affinity / gateway.topologySpreadConstraints. The retired chart also applied nodeSelector, tolerations and affinity to the migration Job; copy them to migrationJob.nodeSelector / migrationJob.tolerations / migrationJob.affinity too, or a Job that needs tainted or zoned nodes to reach the database stays Pending and blocks the install
terminationGracePeriodSeconds gateway.terminationGracePeriodSeconds
serviceAccount.* serviceAccounts.gateway.*. The retired chart also shared an existing ServiceAccount with migrations; set migrationJob.serviceAccountName to that existing account too when the Job needs its permissions, such as for IAM database auth
lens.* lens.*. Deploy Lens from its own chart. The removed lensWorker.* values fail the render when enabled
extraResources extraResources
nameOverride: "litellm" nameOverride: "" (the chart name is already litellm)
fullnameOverride fullnameOverride. The new default always includes the chart-name suffix, even when the release name already contains it. Set this to the existing Service name to retain its DNS name

A minimal migration:

monolith:
  enabled: true
masterKey:
  secretName: litellm-master-key-secret
database:
  writer:
    host: postgres.example.com
    dbname: litellm
    passwordSecret:
      name: litellm-db-secret
      usernameKey: username
      passwordKey: password
gateway:
  replicaCount: 2
  config:
    proxy_config:
      model_list:
        - model_name: gpt-6.1-sol
          litellm_params:
            model: openai/gpt-6.1-sol
            api_key: os.environ/OPENAI_API_KEY
  envSecrets:
    - litellm-provider-keys

The monolith Service is named <release>-litellm. To retain a different old Service name, set fullnameOverride to that existing name. The generated Secret in this chart has helm.sh/resource-policy: keep and is reused across upgrades of this chart. The retired chart stored its generated key under a different Secret and data key, and helm uninstall deletes that Secret, so copy it into a Secret you own before uninstalling the old release to keep existing credentials valid. Run the following in the old release's namespace, replacing OLD_MASTER_KEY_SECRET with the actual existing Secret name. For a release named litellm without a fullnameOverride, that name is litellm-masterkey:

set -euo pipefail
OLD_MASTER_KEY_SECRET=litellm-masterkey
old_master_key="$(kubectl get secret "$OLD_MASTER_KEY_SECRET" -o jsonpath='{.data.masterkey}' | base64 -d)"
test -n "$old_master_key"
kubectl create secret generic litellm-master-key-secret \
  --from-literal=master-key="$old_master_key"
unset old_master_key

Then set masterKey.secretName: litellm-master-key-secret, as in the minimal example above. Releases that set masterkeySecretName already point masterKey.secretName and masterKey.secretKey at that Secret