Running NeMo Guardrails on Kubernetes

Running the self-built NeMo Guardrails server on Kubernetes means mounting configurations, probing health, splitting actions and detectors into their own workloads, and placing safety models on GPU nodes. This page explains the decisions and checks to confirm.

On this page

Running NeMo Guardrails on Kubernetes for production traffic

Running NeMo Guardrails on Kubernetes means packaging the guardrails server as your own container image and deploying it into a cluster you operate, so that your LLM application calls a central policy service inside your network. This is the right target when several applications or teams need the same guardrail configurations, when your platform team already runs and monitors workloads on Kubernetes, and when safety checks must stay inside infrastructure you control. The library is open source under the Apache 2.0 license, and the server loads configurations from a folder and exposes an HTTP API. The repository provides a Dockerfile for building the server image, and the library requires Python 3.11, 3.12 or 3.13, so your build base image and CI runners must match one of those versions. Verify the release you pin against the NeMo Guardrails releases page before you build.

No official Kubernetes manifest is supplied with the project, so your team writes or adapts its own Deployment, Service and supporting objects. Treat that as a design task, not a copy-paste step. Decide early which parts of the configuration are baked into the image and which are mounted from a volume at runtime, because that choice determines how you roll out a new policy without rebuilding. Keep provider credentials out of the image and out of the configuration folder, and plan how they reach the pod. Decide whether the actions server and any detector services run in the same pod or as separate deployments, since that affects scaling, failure isolation and the network policies you need. Each of these choices should be written down before the first manifest is applied.

Confirm the details that your environment controls rather than assuming them: the cluster version and its support window under the Kubernetes releases page, the admission controls that will apply to the pod security profile, and whether your cluster has GPU nodes for self-hosted safety models. Ask your platform team to test the image on a non-production cluster that matches production networking and policy, then run a load test before you route real traffic. Plan who owns the configuration folder, who approves a change to a rail, and how a rollback is performed, because the server will enforce whatever configuration it loads.

Kubernetes deployment options and when each fits

This table compares the main Kubernetes layout choices for a self-built NeMo Guardrails server: pod topology, how configuration reaches the pod, where safety models run, and how replicas are set. Read each row for the condition that favors the option and the operational cost it adds. Most teams start with the simplest layout that meets their isolation and capacity needs, then split components once their scaling or ownership needs diverge.

DecisionOptionWhen it fitsOperational cost
Pod topologyOne combined pod with the guardrails server and actions serverSmall pilots with one configuration owner and light custom actions that scale togetherFewest objects to manage, but actions and server cannot be scaled or restarted separately
Pod topologySeparate guardrails server and actions server deploymentsCustom actions call internal APIs, need different permissions, or must scale independently of the HTTP layerTwo deployments, two services, and network policy between them to maintain
Pod topologySeparate detector deployments for jailbreak heuristics or AlignScoreDetectors are heavy, have different failure modes, or need their own monitoring and rollout cadenceExtra service endpoints in configuration, and detector outages must be watched because they change protection
Configuration deliveryConfigMaps or mounted volumes for config.yml, Colang and Python actionsTeams change policy without rebuilding the image and want configuration reviewed in version controlRequires a rollout step when files change, and pods may need a restart to pick up edits
Configuration deliveryConfiguration baked into the container imagePolicy is frozen per release and images are signed and promoted through environmentsEvery policy change needs an image build, scan and promotion, which slows emergency fixes
Safety model hardwareCPU-only nodes calling externally hosted or remote model endpointsThe rails call managed or existing model services and the guardrails server itself is the main loadLower node cost and simpler scheduling, but latency and data handling depend on the remote endpoint
Safety model hardwareDedicated GPU node pool for self-hosted safety modelsSafety models run in your cluster, for data residency or latency reasons, and the workload needs acceleratorsGPU node provisioning, driver and device plugin management, taints, and capacity planning for each model
Replica managementFixed replica count set in the deploymentTraffic is predictable, load tests show a stable replica count, and the team wants simple capacity controlSomeone must revisit replica counts after traffic or rail changes, and peaks may cause overload responses
Replica managementHorizontal autoscaling on CPU or custom metricsTraffic varies by hour or campaign and the team has metrics that track guardrail loadRequires metrics pipeline, tuned thresholds, and tests to confirm scale-up keeps pace with model calls

How to deploy the guardrails server on Kubernetes

This sequence takes the open-source NeMo Guardrails server from a repository build to a scaled, probed service on your cluster, with GPU-backed safety models running beside it. Each step ends with a check you can run before the next one starts.

  1. Build the server image from the repository

    A platform engineer clones the NVIDIA-NeMo/Guardrails repository at the release tag your team has tested, then builds the server image from the Dockerfile it provides. The library requires Python 3.11, 3.12 or 3.13, so the base image must match one of those versions. Push the image to your internal registry under a fixed tag. Verification: run the image locally with a sample configuration folder mounted and confirm the server starts and logs that it loaded the configuration.

  2. Store configuration in ConfigMap and Secret volumes

    Place the config.yml, Colang files and any Python actions in a folder that the server reads at startup. Keep non-sensitive policy in a ConfigMap and model provider credentials in a Secret, so neither is baked into the image. Mount both read-only at the path the server expects. Kubernetes Secrets are stored unencrypted in etcd by default, so confirm encryption at rest is enabled and that RBAC restricts list and watch access. Verification: exec into a running pod, list the mounted files, and check that the server log shows the expected configuration loaded.

  3. Define readiness and liveness probes

    Confirm the health endpoint for your server version in the NeMo Guardrails documentation, then point the readiness probe at it. Readiness keeps the pod out of the Service until the configuration has loaded, and liveness restarts a pod that stops responding. Set timeouts and thresholds after your first load test rather than copying defaults from another project. Verification: run kubectl describe on a new pod and confirm both probes report success, then delete a pod during a load test and confirm traffic stops reaching it until its replacement is ready.

  4. Deploy the actions server and detectors separately

    Run the custom actions server and any detector services, such as jailbreak heuristics or AlignScore, as their own Deployments and Services. Separate workloads can be scaled, restarted and monitored without touching the guardrails server. Reference each one from the configuration by its in-cluster Service name. Verification: from a guardrails pod, send a test request to each detector Service and confirm it returns a response. Also confirm that a detector outage produces the failure behavior your configuration intends.

  5. Schedule safety models onto GPU nodes

    Self-hosted safety models need GPU capacity, so deploy them to GPU node pools with a node selector, tolerations that match the GPU node taints, and resource requests for GPUs. Keep the CPU-bound guardrails server on general nodes. Confirm the GPU device plugin or operator your platform uses and the hardware requirements for each model in NVIDIA's documentation before you size the pool. Verification: check with kubectl get pods -o wide that model pods run on GPU nodes, and send a test request that returns a classification.

  6. Expose the service and set replica count

    Create a ClusterIP Service for the guardrails server and publish it through your ingress or gateway only to the callers that need it. Set the Deployment to run more than one replica so a single pod restart does not stop guardrail checks. Apply a Pod Security Standards profile to the namespace, using the most restrictive level the image supports. Verification: call the Service from inside the cluster, then scale the Deployment to two replicas and confirm both pods receive traffic and return the same guardrail decisions.

  7. Test configuration changes with a rolling restart

    Publish a configuration change by updating the ConfigMap or Secret, then trigger a rolling restart so each pod reads the new files at startup. Keep the previous ConfigMap version available so you can roll back. Run your evaluation set against the new configuration before it reaches production callers. Verification: check that kubectl rollout status completes, confirm the new configuration appears in the pod logs, and repeat the test requests that passed before the change to confirm the expected results.

How the guardrails pods, actions and detectors connect

The request starts at the client application and passes through the ingress and a Service into the guardrails server pods, which read their configuration from a mounted volume. The pods call the actions server and the detector services, and the detectors call safety model endpoints on the GPU node pool. Input rails must pass before the request reaches the LLM endpoint. The trust boundaries between the namespace, the GPU node pool and external model providers are where you should check network policy, credentials and data egress.

Request path through ingress, guardrails pods, detectors and GPU-hosted safety models, with trust boundaries marked.

Security controls for guardrails workloads on Kubernetes

A guardrails deployment touches Secrets holding model and provider credentials, a server that evaluates every prompt and response, and an actions server that runs custom code. The controls below cover the cluster layers that protect those components, and each one is a decision your platform team should make and record before the first production rollout.

Encrypt Secrets at rest

Kubernetes stores Secrets unencrypted in etcd by default, and guardrails deployments usually hold model provider API keys and safety endpoint credentials in them. Configure encryption at rest for the API server, or send these credentials to an external store through the Secrets Store CSI Driver so they never sit in etcd. Confirm which option your distribution supports and who holds the key material.

Secrets good practices

Restrict Secret list and watch

Any identity that can list or watch Secrets in a namespace can read every credential in it, so RBAC rules that look narrow can still expose the guardrails configuration. Grant the guardrails service accounts only the named Secrets they mount, and keep list and watch limited to platform administrators. Audit role bindings after each change to the namespace.

Apply Pod Security Standards

Run the guardrails server, actions server and detector pods under the restricted Pod Security Standard where the workload allows it. Disable privilege escalation, drop unneeded Linux capabilities and avoid host networking and host paths. GPU pods for safety models may need documented exceptions, so record each one with its reason and an owner.

Pod Security Standards

Authenticate operators with supported methods

Kubernetes does not create user objects, so human access depends on the authentication method your cluster is configured for, such as X.509 client certificates, OpenID Connect tokens or an authenticating proxy. Use your identity provider for operators who change guardrails configurations or Secrets, and keep break-glass certificates in a controlled location. Confirm the method your distribution exposes before you write access policy.

Kubernetes authentication

Restrict network paths between pods

The guardrails server should accept traffic only from the applications that call it, and only the server should reach the actions server and safety model endpoints. Define network policies for each of these paths and deny the rest by default. Check that your network plugin enforces policies before you rely on them, because a policy object that is not enforced protects nothing.

Harden the actions server

The actions server runs Python actions that the guardrails configuration calls, so a flaw in an action or its dependencies is code execution inside your cluster. Give it its own namespace, service account and image, with no Secrets beyond those its actions need and egress limited to approved destinations. Review action code and pinned dependencies as you would any service that runs untrusted input.

How replicas, probes and GPU capacity interact

Adding guardrails server replicas does not add safety model capacity. The NeMo Guardrails server is CPU-bound: it parses configurations, runs Colang flows, executes actions and coordinates calls to model endpoints. The safety models it calls for content safety, topic control, jailbreak detection and similar checks are GPU-bound and run on their own endpoints, often as separate containers on GPU nodes. Scaling the server Deployment with more replicas therefore raises the number of requests the front end can accept, but every replica still sends its detector calls to the same pool of GPU-backed endpoints. Before you add replicas, confirm which rails in your configuration call local models, how many model calls each request triggers, and whether the GPU pool behind those calls has headroom. Keep the GPU workloads in their own Deployments with node selectors or taints that target GPU nodes, so server pods are not scheduled onto them.

Probes need to tell two situations apart. A server that is busy but working should stay in service, while a server whose detector endpoints are unreachable is not enforcing its rails and should be removed from the load balancer or flagged for alerting. A liveness probe that calls a detector will restart healthy pods during a detector outage and make the incident worse, so keep liveness limited to the server process itself. Use a readiness probe for traffic gating, and decide with your security team whether a detector failure should fail closed (return an error that blocks the request) or fail open (pass the request without the check). That decision belongs in the configuration and the runbook, not in the probe alone. Confirm the health endpoints your server image exposes in the release you deploy.

The open-source server does not provide high availability out of the box. Replicas, a load balancer, redundant safety model endpoints, overload responses and alerting on detector health are things your team builds and tests. Load test the complete path, including the GPU endpoints, at the request mix and concurrency you expect in production, and measure how latency and error rates change as each rail is added. Ask your platform team to confirm the GPU capacity available for scheduling and to agree how the Horizontal Pod Autoscaler will react to server load without masking a saturated detector pool. Treat the figures from your own load tests as the basis for replica counts and node pools, since no general sizing numbers should be assumed for your workload.

Limits to confirm in your environment

The guardrails server and its safety models depend on choices made outside the image: the Kubernetes version and distribution, the GPU stack, the Python runtime and the product path you follow. Confirm each of these against your own environment before you write manifests, because a mismatch in any one of them can block the rollout.

Kubernetes version and distribution

The Kubernetes project maintains the three most recent minor releases, which were 1.35, 1.36 and 1.37 as of September 2026. Confirm which minor version your distribution ships, and check whether your control plane sits within the supported range. Kubelets may run up to three minor versions behind the API server, but the control plane must be upgraded one minor version at a time, so plan that sequence before any cluster upgrade.

Version skew policy

CNCF conformance of the distribution

Ask whether your chosen distribution is listed as a CNCF Certified Kubernetes offering. Conformance checks that the required Kubernetes APIs are supported, which is what the server's probes, Deployments and Services depend on. A distribution that is not conformant may still run the workloads, but you will carry the burden of proving that the APIs behave as expected.

CNCF conformance program

GPU driver and device plugin support

Safety models that run on GPU nodes need a driver, a container runtime integration and a device plugin that exposes GPUs as schedulable resources. Confirm that your node operating system, driver version and device plugin are supported together, and that the GPU model is supported by the safety model container you intend to run. Verify this on a test node before you add GPU capacity to production pools.

Python version in the server image

NeMo Guardrails 0.25.0 requires Python 3.11, 3.12 or 3.13. Confirm that the base image your build uses ships one of these versions and that any LangChain provider packages you add install on it. A base image pinned to an older interpreter will fail at build time or, worse, install a mismatched dependency set that only fails when a rail runs.

NeMo Helix path or library server

The NeMo Guardrails microservice was sunset as of October 1, 2026, and NVIDIA directs new work to NeMo Platform. The NeMo Helix control plane runs guardrails as an inference gateway plugin, which is a different deployment model from the open-source library server described on this page. Decide which path your organization is on before writing manifests, and confirm the licensing and support terms with NVIDIA for any path that depends on a commercial product.

NeMo Helix repository

Colang 1.0 or 2.0 loading

Colang 1.0 is the default, and Colang 2.0 is also supported. Confirm which version your configuration folder uses, because the mounted volume must contain the files that version expects. Converted configurations need manual review after the migration tool runs, so test each one in a staging namespace and check the readiness probe reports a loaded configuration before you route traffic.

Colang 2 migration guide

Questions teams ask before running NeMo Guardrails on Kubernetes

What does running NeMo Guardrails on Kubernetes cost, and what drives it up?

The software itself is free under the Apache 2.0 license, so cost comes from people, infrastructure and ongoing operations. Infrastructure includes CPU nodes for the guardrails server, GPU nodes if you self-host safety models, and the cluster itself. The main cost drivers are the number of rails in each configuration, since every added rail can add model calls per request, the GPU capacity needed to serve safety models at your traffic level, the number of environments you run (development, staging, production), and the size of any Colang 1.0 to 2.x migration. Ask any partner for a quote built from a written scope that lists rails, environments, GPU needs and migration work separately.

How long does a first NeMo Guardrails deployment on Kubernetes take?

The duration depends on how many rails you need, whether your cluster and GPU nodes already exist, whether configurations are already written in Colang, and how many environments must pass review before production. A cluster with GPU nodes, identity and a CI pipeline already in place shortens the work. A new cluster, new GPU capacity or a Colang migration lengthens it. No fixed duration applies to every team, so ask for a timeline in the written scope, with each phase (cluster preparation, image build, configuration, safety model endpoints, load testing and handover) listed separately.

What must our internal team provide before a Kubernetes deployment starts?

Most of the dependencies sit with your platform team. You need a Kubernetes cluster you control, with namespace and RBAC access for the deployers, and a way to create secrets without storing them in plain manifests. You also need GPU nodes if safety models will run in the cluster, reachable model endpoints for the LLM your application uses, and a container registry that holds the built server image. A CI pipeline that builds, tests and promotes images and configuration is needed for repeatable releases. Confirm each item with your own platform team before the scope is signed.

Can our internal team deploy NeMo Guardrails on Kubernetes without a partner?

Yes, a team with solid Kubernetes, container and CI experience can deploy the open-source server without outside help, because the project is Apache 2.0 licensed and the server image is built from the repository. The harder parts are usually Colang configuration design, sizing the GPU-bound safety models, testing guardrail behavior, and building the operational runbooks for upgrades and etcd backups. Teams that lack a dedicated Kubernetes or GPU operator, or that must show evidence to auditors, often hire a partner for part of the work, such as a fixed-scope build with written handover.

Does the NGC sunset change how we should deploy NeMo Guardrails?

NVIDIA has sunset the NeMo Guardrails microservice container on NGC as of October 1, 2026, with no new releases or support for that artifact. The open-source library is still released, with 0.25.0 published on 19 November 2026 under Apache-2.0. Plan your deployment around building your own server image from the open-source repository, and do not base a new rollout on the NGC microservice image. NVIDIA's archived documentation directs existing NeMo Microservices users to their account team, so confirm any NVIDIA-side commitments in writing before you rely on them.

What does ongoing operation of NeMo Guardrails on Kubernetes require?

Operations are recurring work. Kubernetes releases about three times a year on a cycle of roughly 14 weeks, and the project maintains only the three most recent minor releases, so your cluster must be upgraded on that cadence. Upgrades follow the version skew policy: the API server moves one minor version at a time and kubelets may lag by up to three minor versions. Etcd needs a tested backup plan using snapshot saves and restores, and it should run with an odd member count. Add NeMo Guardrails version upgrades, safety model updates, certificate and secret rotation, and monitoring of detector endpoints to the recurring list.

What should we verify on the cluster to keep guardrail protection reliable?

Engineers should check that health probes point to endpoints that reflect whether the server can actually evaluate rails, not just whether the process runs. Configurations should be mounted as volumes from version-controlled sources so each replica loads the same policy. The actions server and safety model deployments should be separate, so each can scale and fail independently. Secrets must be encrypted at rest, since Kubernetes stores them unencrypted in etcd by default, and access should follow least-privilege RBAC. Pod security settings should follow the Pod Security Standards, and the cluster configuration should be reviewed against the CIS Kubernetes Benchmark.

Sources to read before you commit to a layout

Read the NeMo Guardrails documentation and the server and Dockerfile in the NVIDIA-NeMo/Guardrails repository before you choose a layout. They settle how the guardrails server loads configurations from a folder, which HTTP endpoints it exposes, and how the Dockerfile builds the server image, so you know what must be mounted as a volume and which paths the container reads at startup. They do not settle how your cluster should route traffic, how many replicas the server can carry, or whether the server reports readiness in a way your probes can use. Confirm the health behavior of the server build you pin by running it locally and calling each endpoint you plan to probe.

Read the NeMo Helix guardrail models page before you decide where safety models run. It describes how guardrail configurations attach to model endpoints in the NeMo Helix control plane, which is a different deployment path from running the guardrails server with its own configuration folder. Use it to decide whether your Kubernetes layout is a standalone guardrails server, an inference gateway integration, or both. Confirm with your NVIDIA account team how NeMo Helix relates to the sunset NeMo microservices before you build around either one.

Read the Kubernetes version skew policy and the Good practices for Kubernetes Secrets page before you fix node pool versions or store provider keys. The skew policy sets the upgrade order for the control plane and kubelets, which determines how you schedule GPU node pool upgrades without stranding safety model pods. The Secrets page explains that Secrets are stored unencrypted in etcd by default, so you must enable encryption at rest or use an external store such as the Secrets Store CSI Driver for model endpoint credentials. Neither page tests your GPU operator, your ingress, or your autoscaling, so run those checks on a staging cluster.

How DeployOpen scopes and delivers Kubernetes guardrails deployments

DeployOpen plans, builds, tests, documents and supports self-hosted open-source platforms inside your own infrastructure, including your cluster and network. For Running NeMo Guardrails on Kubernetes, we agree the scope in writing before work starts, then deliver the server, configuration, probes, detector deployments and handover material against that scope.

How we scope

  • Confirm which Kubernetes distribution, cluster topology and namespaces the guardrails server will run in.
  • Record which rails, configurations and safety model endpoints the written scope includes and excludes.
  • Agree GPU node pools, replica targets and load test criteria in writing before any build work begins.

How we build

  • Package the self-built guardrails server image with configuration delivered as mounted volumes, not baked in.
  • Deploy the actions server and detector services as separate workloads with their own probes and resources.
  • Wire secrets through your chosen store, with encryption at rest and least-privilege RBAC configured for the namespace.

How we hand over

  • Deliver manifests, Helm or Kustomize sources and a runbook covering probes, scaling and rollback steps.
  • Document each configuration version, image tag and dependency so your team can review and reproduce the deployment.
  • Walk your platform and security engineers through monitoring, alerting and the evidence trail for changes.

How we support

  • Offer ongoing support, upgrades and continuous testing as a retainer after the fixed-scope engagement closes.
  • Plan upgrades of NeMo Guardrails, Kubernetes and detector images as separate, tested change sets.
  • Confirm with your team which support hours, response paths and upgrade windows apply before the retainer starts.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.