Set Up OpenShell on Kubernetes
The OpenShell Helm chart is experimental and under active development. Templates, values, and defaults can change between releases. Do not use it in production.
Use the Kubernetes deployment when the gateway should run on a shared cluster, in a cloud environment, or as part of team infrastructure. The Helm chart handles PKI bootstrap, RBAC, sandbox namespace setup, and the gateway workload. It uses a StatefulSet by default for the SQLite database, and can render a Deployment when server.externalDbSecret points at an external database.
Prerequisites
Make sure the following are in place before you install.
Install Agent Sandbox
OpenShell uses the Agent Sandbox Kubernetes SIG project to provision sandbox pods. Install the Agent Sandbox controller and its CRDs on your cluster before installing the OpenShell Helm chart.
Apply the latest release manifest:
This creates the agent-sandbox-system namespace, installs the sandboxes.agents.x-k8s.io CRD, and starts the controller.
Air-gapped clusters: mirror the manifest above and the registry.k8s.io/agent-sandbox/agent-sandbox-controller image referenced inside it to your internal registry, then point the manifest’s image reference at your mirror before applying. You will also need to mirror the OpenShell gateway and sandbox images — see the chart’s image.repository value for the gateway and server.sandboxImage / server.supervisorImage for the sandbox runtime.
Confirm the controller pod is running before proceeding:
The controller pod should reach Running status within a few seconds. For cluster-specific setup instructions, including KinD and GKE walkthroughs, refer to the Agent Sandbox getting started guide.
Install OpenShell
Install the chart
Install from the OCI registry on GHCR. Replace <version> with the chart version you want to install.
To use the latest development build instead of a stable release:
The chart automatically generates PKI secrets on first install using pre-install Helm hooks. No manual secret creation is required.
Wait for the gateway to be ready
If you set workload.kind=deployment, wait on the Deployment instead:
Connect to the gateway
For local evaluation, use a port-forward:
The port-forward is for local evaluation only. For shared environments, expose the gateway through your ingress controller or access proxy. Refer to Ingress for an external access option.
Install the TLS client bundle
The chart generates an mTLS bundle for transport security. Kubernetes deployments do not use that bundle as user authentication; configure OIDC or a trusted access proxy as described in Access Control. For local port-forwarded access, copy the generated bundle so the CLI can verify the gateway certificate:
The server certificate SANs include localhost and 127.0.0.1, so hostname verification passes over the port-forward without extra flags.
Configure Chart Values
The most commonly changed values are:
Use a values file for repeatable deployments:
The chart defaults server.appArmorProfile to Unconfined because
runtime/default AppArmor profiles can block the supervisor’s network namespace
mount setup on AppArmor-enabled nodes. Set server.appArmorProfile to an empty
string to omit the field, RuntimeDefault to force the runtime default, or
Localhost/<profile-name> when you load and manage a localhost profile on each
node.
To use private sandbox images, create a kubernetes.io/dockerconfigjson Secret
in the sandbox namespace and reference its name:
RBAC
The chart creates the following RBAC resources in the release namespace:
The namespaced Role covers sandbox lifecycle and identity:
The ClusterRole grants node inspection and token validation:
To use an existing ServiceAccount instead of creating one, set serviceAccount.create=false and supply its name:
The ServiceAccount must already have the Role and ClusterRole bindings described above.
Probes
The gateway exposes /healthz for process liveness and /readyz for dependency-aware readiness on the health port. The Helm chart wires both into Kubernetes probes:
startupProbeandlivenessProbeuse/healthz.readinessProbeuses/readyz, which reflects the latest result of an in-process background database check.
Next Steps
- To enable automatic certificate rotation with cert-manager, refer to Managing Certificates.
- To expose the gateway externally without port-forwarding, refer to Ingress.
- To configure OIDC or reverse-proxy authentication, refer to Access Control.
- To create your first sandbox, refer to Manage Sandboxes.