v1.0

v1.0

/

/

How to deploy AI agents on Kubernetes: Helm, persistence, ingress and production best practices

How to deploy AI agents on Kubernetes: Helm, persistence, ingress and production best practices

How to deploy AI agents on Kubernetes: Helm, persistence, ingress and production best practices

A Helm chart can install an AI agent platform in one command, but production deployment still depends on storage, secrets, ingress, TLS, DNS, durable state, probes, observability and recovery. This guide shows the complete Kubernetes path without hiding the infrastructure around the command.

Aucun heading trouvé dans #cible

Anis Meziani

The Helm install can be one command. The deployment is not.

Running AI agents on Kubernetes means operating a stateful, tool-using application whose usefulness depends on databases, secrets, external APIs, storage, ingress, TLS, observability and failure recovery. The container is only one piece.

This guide is a production-oriented deployment model for AI agents on Kubernetes. It keeps the central lesson from our original DEV.to field note “the honest one-command version” but expands it into a reusable architecture that applies beyond one chart or one cluster.

Should you deploy AI agents on Kubernetes?

Kubernetes is a good fit when you already have platform engineering capability and need self-hosted deployment, standardized identity and network policy, multiple runtime services, stateful dependencies, horizontal scaling, GitOps or portable infrastructure.

It is usually not the fastest first deployment for a small stateless agent. If a managed runtime or simple container service satisfies your reliability and compliance requirements, extra cluster complexity may not create value.

The complete Kubernetes deployment path


container image → namespace → secrets → database/storage → runtime deployment → service → ingress → TLS → DNS → health checks → observability → backup → rollout policy


Helm can package many of those resources. It cannot magically provide every cluster capability they depend on.

1. Containerize the agent runtime correctly

The runtime image should be immutable, versioned and able to start without local state assumptions.

  • pin application dependencies;

  • run as a non-root user when possible;

  • expose readiness and liveness endpoints;

  • handle termination signals gracefully;

  • do not persist business state only to the container filesystem;

  • make model/provider configuration external.

2. Create an isolated namespace and service identity

Use a dedicated namespace for the agent platform or workload. Give workloads explicit service accounts and the minimum RBAC required.

An agent that can use business tools should not inherit broad Kubernetes permissions merely because it happens to run in the cluster.

3. Handle secrets as infrastructure

API keys, database credentials and signing secrets need a production secret-management path. Kubernetes Secrets are an interface, not by themselves a complete secret-management strategy.

Depending on the environment, secret material may be synchronized from a cloud KMS/secret manager or managed through an operator. Rotation and auditability matter more than whether the value ultimately appears as an environment variable.

4. Decide where durable state lives

AI agents often need more persistence than a typical stateless API:

  • sessions and conversation events;

  • workflow/run records;

  • long-term memory;

  • documents or artifacts;

  • queue/event state;

  • vector or relational data.

Do not confuse Kubernetes restartability with application durability. A pod restarting cleanly does not help if the agent’s state existed only inside the pod.

For the recovery model itself, see AI agent state management.

5. Storage classes and persistent volumes are cluster-specific

A Helm chart may request a PersistentVolumeClaim. Whether that claim can actually bind depends on the cluster’s storage class and provisioner.

  • verify that a default or explicit StorageClass exists;

  • confirm access modes;

  • check capacity and volume expansion;

  • verify snapshot/backup support;

  • define restore procedures for stateful components.


Kubernetes deployment architecture for an open-source AI agent platform with runtime, database, storage, ingress and external model providers.

6. Install the runtime with Helm but inspect the values first

A production install should use a versioned values file rather than a long command copied from a tutorial.

helm upgrade --install apowerb oci://REGISTRY/apowerb-chart \
  --namespace apowerb \
  --create-namespace \
  -f values.production.yaml
helm upgrade --install apowerb oci://REGISTRY/apowerb-chart \
  --namespace apowerb \
  --create-namespace \
  -f values.production.yaml

The command is intentionally illustrative: use the current ApowerB chart registry, chart version and documented values when you deploy.

A useful production values file should make explicit image version, replicas, resource requests/limits, database topology, storage, ingress host, TLS, secret references, autoscaling and observability endpoints.

7. Ingress, TLS and DNS are three separate things

An Ingress object does not create an ingress controller. A TLS block does not install cert-manager. A hostname in YAML does not create a DNS record.


DNS → load balancer / ingress controller → Ingress rule → Kubernetes Service → runtime pod

8. Readiness matters more than “the pod is running”

A runtime can be alive while still unable to serve useful agent traffic because its database is unavailable, migrations are incomplete or required dependencies cannot be reached.

  • liveness: should Kubernetes restart the process?

  • readiness: should this pod receive traffic?

  • startup: does this service need extra initialization time?

9. Treat model APIs and tools as dependencies with failure modes

The cluster can be healthy while a model provider returns 429s or a business API times out. Runtime-level timeouts, backoff and tool-aware retry policy belong above Kubernetes.

This is the key boundary: Kubernetes restarts processes; the agent runtime decides whether repeating an agent action is safe.

10. Observability needs agent semantics

CPU and memory graphs are necessary but insufficient. Production agent operations also need run IDs, user/tenant attribution, model calls, tool calls, token/cost signals, state transitions, approval events and replay status.

See AI observability for the application-level layer.

11. Scaling AI agents is not only replica scaling

HTTP request volume may be only one pressure signal. Long-running work can be limited by worker concurrency, model-provider quotas, queue depth, tool latency, database connections and token spend.

Scale the bottleneck you can measure. Adding pods does not fix an external 429 limit.

12. Backups and upgrades need state-aware procedures

Before a production upgrade, know which data must survive, how schema migrations run, whether writes need to pause, how rollback interacts with the database schema, and how backups are restored—not merely created.


Deploy the open-source runtime on infrastructure you control

ApowerB is designed for self-hosted agent workloads and includes deployment artifacts for the runtime stack.


The honest “one-command” checklist

Capability

Can Helm define it?

Does the cluster still need it?

Deployments / Services

Yes

Kubernetes API and nodes

PersistentVolumeClaims

Yes

StorageClass/provisioner

Ingress resource

Yes

Ingress controller / load balancer

TLS configuration

Yes

Certificate issuer or existing cert

Hostname

Yes

DNS record

Secret references

Yes

Secure secret lifecycle

Resource limits

Yes

Actual cluster capacity

Backups

Partly

Storage/database backup strategy

Production deployment sequence

  1. Choose the cluster and namespace.

  2. Verify StorageClass and capacity.

  3. Verify ingress controller.

  4. Verify certificate management.

  5. Prepare DNS and hostname.

  6. Provision secrets.

  7. Decide database topology and backups.

  8. Review Helm values and pin versions.

  9. Install into staging first.

  10. Verify migrations, readiness and tool connectivity.

  11. Enable metrics, traces and logs.

  12. Test pod restart and node disruption.

  13. Test backup restore.

  14. Promote with a controlled rollout.

Security controls specific to agent workloads

Kubernetes gives you strong infrastructure primitives, but agent workloads introduce an extra trust problem: untrusted content can influence tool selection.

  • workload identity and least-privilege RBAC;

  • network policies and egress controls;

  • separate credentials per integration;

  • tool-level authorization inside the runtime;

  • human approval for high-impact writes;

  • audit logs for tool actions;

  • sandboxing for code execution.

Where ApowerB fits

ApowerB provides the application/runtime layer that Kubernetes does not: agent execution, application state, model/tool integration and the wider agent platform. Kubernetes supplies the infrastructure control plane underneath it.

The original deployment field note contains the concise chart-oriented walkthrough and practical traps we encountered: read it on DEV.to.

For the broader runtime architecture, see production-ready AI agents.


Production Kubernetes architecture for ApowerB with ingress, runtime pods, durable state, external model APIs and observability.

The practical takeaway

The command that creates Kubernetes objects can be one line. Production readiness is everything that makes those objects useful after the command finishes.

Kubernetes should recover the infrastructure. The agent runtime should recover the work.

Frequently asked questions

How do you deploy AI agents on Kubernetes?

Containerize the runtime, provision durable state and secrets, deploy with versioned manifests or Helm, expose it through ingress/TLS/DNS, then add readiness, observability, backups and controlled rollout procedures.

Do AI agents need persistent storage on Kubernetes?

Agent applications need durable state, but it can live in external databases or object storage rather than pod-mounted volumes. The essential requirement is survival across pod replacement.

Is Helm enough to deploy an AI agent platform?

No. Helm can define Kubernetes resources, but the cluster still needs compatible storage, ingress, certificates, DNS, secrets, capacity and operational controls.

Should model inference run inside the Kubernetes cluster?

Not necessarily. Agents can call external model APIs or self-host inference depending on privacy, latency, cost, hardware and operations requirements.

Why use Kubernetes for AI agents?

Kubernetes is useful for self-hosting, workload isolation, existing GitOps and RBAC practices, multi-service applications and portable infrastructure control.

An open-source foundation for building your own agents.

ApowerB is the open-source agentic framework developed by thaink² to build, orchestrate, and operate AI agents on your own stack, using your models, tools, and data.

What if your next analysis were ready before your next meeting?

Show us your environment and a use case. See how thaink² can query, monitor, and act on your data.

Our mission
Our vision

Move from data you look at to data that works continuously for your business.

We believe the next generation of Data platforms will do more than show what happened. They will monitor, explain, anticipate, and prepare decisions before some questions even need to be asked.

Image

What is an Agentic Data Platform?

An Agentic Data Platform uses specialized AI agents to work with enterprise data. Unlike a static dashboard or a simple chatbot, agents can explore multiple sources, run analyses, generate visualizations, produce deliverables, and execute recurring missions.

What’s the difference between Proactive Mode and Exploratory Mode?

In Exploratory Mode, the user asks a question and thaink² runs the analysis on demand. In Proactive Mode, a mission is defined in advance: agents monitor the data based on a set schedule or specific conditions and automatically deliver the relevant results.

Do I need to know SQL to use thaink²?

Not for business use cases. Users can ask questions in natural language and get analyses, tables, charts, and dashboards without writing SQL queries themselves.

What data sources can thaink² connect to?

The platform is designed to work with the systems already in place across your organization: databases, data warehouses, ERP, CRM, APIs, files, and document repositories. Available connectors depend on your environment and use case.

What types of outputs can the agents produce?

Depending on the agent and use case, outputs can include analyses, tables, charts, dashboards, forecasts, alerts, summaries, and reports. The goal is to deliver an actionable result, not just a text response.

Can thaink² be deployed on our own infrastructure?

thaink² supports deployment options designed around enterprise requirements, including organizations that need greater control over their infrastructure, models, and data. Our teams help define the architecture that best fits the project.

Which part of the thaink² ecosystem is open source?

ApowerB is the open-source agentic framework developed by thaink². It enables technical teams to build and operate their own agents, with support for RAG, Text-to-SQL, multi-LLM setups, and APIs.

How do I get started with thaink²?

The easiest way to start is with a concrete use case: reporting, analysis, forecasting, document search, or monitoring. An initial session helps define the available data, expected outcomes, and the most suitable deployment approach.

Join our Discord community

Connect with builders, Data teams, and AI practitioners. Share ideas, get technical help, discuss agentic architectures, and follow the latest developments around ApowerB.

Our newsletter (Soon)

Data that takes action, straight to your inbox.

Field insights, agentic architectures, benchmarks, use cases, and the latest from ApowerB. Only what’s worth reading.

© 2026 thaink² SAS — All rights reserved

An open-source foundation for building your own agents.

ApowerB is the open-source agentic framework developed by thaink² to build, orchestrate, and operate AI agents on your own stack, using your models, tools, and data.

What if your next analysis were ready before your next meeting?

Show us your environment and a use case. See how thaink² can query, monitor, and act on your data.

Our mission
Our vision

Put the power of data in the hands of decision-makers.

Today, too many business questions still depend on an export, a dashboard, or the availability of a Data team. thaink² changes that by letting teams query their data directly, while agents handle the analysis and recurring work.

Image

What is an Agentic Data Platform?

An Agentic Data Platform uses specialized AI agents to work with enterprise data. Unlike a static dashboard or a simple chatbot, agents can explore multiple sources, run analyses, generate visualizations, produce deliverables, and execute recurring missions.

What’s the difference between Proactive Mode and Exploratory Mode?

In Exploratory Mode, the user asks a question and thaink² runs the analysis on demand. In Proactive Mode, a mission is defined in advance: agents monitor the data based on a set schedule or specific conditions and automatically deliver the relevant results.

Do I need to know SQL to use thaink²?

Not for business use cases. Users can ask questions in natural language and get analyses, tables, charts, and dashboards without writing SQL queries themselves.

What data sources can thaink² connect to?

The platform is designed to work with the systems already in place across your organization: databases, data warehouses, ERP, CRM, APIs, files, and document repositories. Available connectors depend on your environment and use case.

What types of outputs can the agents produce?

Depending on the agent and use case, outputs can include analyses, tables, charts, dashboards, forecasts, alerts, summaries, and reports. The goal is to deliver an actionable result, not just a text response.

Can thaink² be deployed on our own infrastructure?

thaink² supports deployment options designed around enterprise requirements, including organizations that need greater control over their infrastructure, models, and data. Our teams help define the architecture that best fits the project.

Which part of the thaink² ecosystem is open source?

ApowerB is the open-source agentic framework developed by thaink². It enables technical teams to build and operate their own agents, with support for RAG, Text-to-SQL, multi-LLM setups, and APIs.

How do I get started with thaink²?

The easiest way to start is with a concrete use case: reporting, analysis, forecasting, document search, or monitoring. An initial session helps define the available data, expected outcomes, and the most suitable deployment approach.

Join our Discord community

Connect with builders, Data teams, and AI practitioners. Share ideas, get technical help, discuss agentic architectures, and follow the latest developments around aPowerB.

Our newsletter (Soon)

Data that takes action, straight to your inbox.

Field insights, agentic architectures, benchmarks, use cases, and the latest from ApowerB. Only what’s worth reading.

© 2026 thaink² SAS — All rights reserved