akeyless-gateway
by akeyless.io
A Helm chart for Kubernetes that deploys akeyless-gateway
About this chart
Akeyless Gateway
This repository contains the official Akeyless Gateway Helm chart for installing and configuring the Gateway on Kubernetes.
For full documentation on this Helm chart please see the official docs
Prerequisites
To use the charts here, Helm must be configured for your Kubernetes cluster. Setting up Kubernetes and Helm is outside the scope of this README. Please refer to the Kubernetes and Helm documentation.
Horizontal Autoscaling
The Kubernetes metrics server must be configured in your cluster.
Add Akeyless Repository
To install the latest version of this chart, add the Akeyless Helm repository
helm repo add akeyless https://akeylesslabs.github.io/helm-charts
helm repo update
Installing the Chart
Please see all supported options directly on the Akeyless Docs website along with more detailed installation instructions.
To install the chart run the following:
helm install gateway akeyless/akeyless-gateway
Upgrade Notes
3.14.0: Claude Workload Identity Federation
Two new values, both off by default, so the upgrade changes nothing unless you enable one. See Claude Workload Identity Federation.
gateway.anthropicWorkloadIdentity.enabledmounts an Anthropic-audience token for the Claude target's File token source.gateway.anthropicWorkloadIdentity.tokenRequest.enabledcreates a Role and RoleBinding named<release>-akeyless-gateway-token-requestfor the Kubernetes token source. They let the Gateway's dedicated service account request tokens for itself only. On thedefaultservice account the render fails.
Kubernetes only lets a user create a Role that grants permissions the user already holds. So before you enable tokenRequest, the user that runs helm upgrade needs, in the namespace, permission to create Roles and RoleBindings, and also create on serviceaccounts/token for the Gateway's service account. Ask the cluster administrator for that narrow permission rather than escalate or bind.
3.13.0: custom CA extends the trust store
From 3.13.0 gateway.customCA and sra.customCA default to mode: extend: the bundle is added to the image trust store. Before 3.13.0 the bundle replaced /etc/ssl/certs/ca-certificates.crt.
| Release before the upgrade | Effect of the upgrade to 3.13.0 or later |
|---|---|
customCA.enabled: false | None. |
customCA.enabled: true, bundle holds only your CAs | Public roots are trusted again, beside your CAs. The pods restart with the new init container. |
customCA.enabled: true, bundle holds public roots and your CAs | No change in trust. The pods restart with the new init container. |
| You need the earlier behaviour | Set mode: replace. The pod spec stays as before the upgrade. |
3.12.1: SRA SSH replicas
From 3.12.1 the SRA SSH deployment sets spec.replicas from sra.sshConfig.replicaCount only when sra.sshConfig.hpa.enabled is false, the same as the SRA web and Gateway deployments. Earlier versions did the opposite.
| Release before the upgrade | Effect of the first upgrade to 3.12.1 or later |
|---|---|
| SSH HPA off, default values | None. The deployment keeps 1 replica. |
SSH HPA off, sra.sshConfig.replicaCount set | The deployment scales to replicaCount. Before 3.12.1 the value was ignored. |
| SSH HPA off, scaled by hand | The deployment scales to replicaCount. Set replicaCount to the count you run before the upgrade. |
| SSH HPA on | Helm removes spec.replicas from the deployment, so it scales to 1 and the HPA scales it back. SSH sessions on the removed pods end. |
With the SSH HPA on, run the first upgrade to 3.12.1 or later in a maintenance window:
- Before the upgrade, record the current count:
kubectl get hpa -n <namespace>. - Run
helm upgrade. - Confirm the HPA restored the count and the SSH pods are ready:
kubectl get hpa,deployment -n <namespace>.
Later upgrades do not change spec.replicas, and the HPA stays in control.
Cluster DNS Domain
Clusters whose DNS search domain is not the default svc.cluster.local (for example svc.custom.local) must set clusterDomain so SRA internal service URLs resolve correctly:
clusterDomain: custom.local
Extra Volumes and Volume Mounts
To add custom Kubernetes volumes to the Gateway pod and mount them into the Gateway container, configure gateway.deployment.extraVolumes and gateway.deployment.extraVolumeMounts:
gateway:
deployment:
extraVolumes:
- name: custom-secret
secret:
secretName: custom-secret
extraVolumeMounts:
- name: custom-secret
mountPath: /etc/custom-secret
readOnly: true
Claude Workload Identity Federation
A Claude target that uses Gateway Cloud Identity presents a Kubernetes service account token to Anthropic. The default token at /var/run/secrets/kubernetes.io/serviceaccount/token cannot be sent: its audience is the Kubernetes API server. Pick one of two Token Sources on the target, then set up the Claude Console.
Run the Gateway as a dedicated service account (globalConfig.serviceAccount.create: true or globalConfig.serviceAccount.serviceAccountName). On default, every pod in the namespace that runs as default can get the same Anthropic-audience token and pass the rule.
In the Claude Console (Settings → Workload identity), for both sources:
- Register the cluster's service account issuer (
kubectl get --raw /.well-known/openid-configurationprints it). Anthropic must reach its discovery document and JWKS; on AKS, enable the OIDC issuer first. A cluster whose issuer is not public can use inline keys instead, which must be updated after every signing key rotation. - Create a federation rule with subject
system:serviceaccount:<namespace>:<service account>, audiencehttps://api.anthropic.com, andtoken_lifetime_secondsof 1200 or more. The service account comes fromglobalConfig.serviceAccount:serviceAccountNamewhen set, otherwise<release>-akeyless-gatewaywithcreate: true, ordefaultwithcreate: false. Read it from the Deployment, named<gateway.namePrefix>-<fullname>:unified-<release>-akeyless-gatewayby default, orunified-<release>when the release name already containsakeyless-gateway. Use the actual name if you setgateway.namePrefix,nameOverrideorfullnameOverride:kubectl -n <namespace> get deploy unified-<release>-akeyless-gateway -o jsonpath='{.spec.template.spec.serviceAccountName}'
Token Source = Kubernetes (no volume)
With Token Source Kubernetes (wif_identity_token_source: kubernetes), the Gateway requests a 10-minute token for its own service account, with audience https://api.anthropic.com, from the Kubernetes API before every exchange. No volume is mounted. Enable the Role that allows it:
globalConfig:
serviceAccount:
create: true # service account <release>-akeyless-gateway
gateway:
anthropicWorkloadIdentity:
tokenRequest:
enabled: true
See the 3.14.0 upgrade note for the permission the helm upgrade user needs. Requires the first Gateway release after 5.7.1 that lists the Kubernetes token source for the Claude target in its release notes. Without the Role, saving the target fails with "may not request tokens".
Token Source = File (mounted token)
The Gateway reads its identity token from /var/run/secrets/anthropic.com/token. Enable gateway.anthropicWorkloadIdentity to mount a token for Anthropic. This also works on Gateways released before the Kubernetes source:
gateway:
anthropicWorkloadIdentity:
enabled: true
# audience: https://api.anthropic.com
# expirationSeconds: 600
Requires Gateway 5.7.0 or later (Claude target with Gateway Cloud Identity). Scanning Anthropic with an org:admin rule needs the first Gateway release after 5.7.1. On an older Gateway the value only adds an unused file.
If you already mount a token at /var/run/secrets/anthropic.com through gateway.deployment.extraVolumes and extraVolumeMounts, remove that volume and mount before you enable the value. The chart fails the render otherwise, because the API server rejects two mounts at one path.
Keep expirationSeconds at 600. Anthropic accepts each token (jti) once, and Kubernetes rotates the token after 80% of its lifetime, so a longer lifetime makes refreshes fail until the token rotates. One Gateway token serves one set of Claude federation IDs. After the Gateway process restarts inside the same pod (for example an auto-update), the token in the file was already exchanged, so Anthropic refuses it (jti_reused) until the kubelet rotates the file, about 8 minutes with 600 s. A new pod gets a new token and is not affected.
Custom CA
Environments that re-sign outbound TLS with an internal CA (a TLS-intercepting proxy), or that reach internal services signed by a private CA, must trust that CA from the first outbound connection. The Gateway uses gateway.customCA. The SRA web and SSH deployments use sra.customCA. The two are independent: set both when both components need the CA.
gateway:
customCA:
enabled: true
mode: "extend" # or "replace"
volumeName: "ca-certificates"
volumeType: "configMap" # or "secret"
volumeSourceName: "<configmap-or-secret-name>"
sra:
customCA:
enabled: true
mode: "extend"
volumeName: "ca-certificates"
volumeType: "configMap"
volumeSourceName: "<configmap-or-secret-name>"
| Value | Default | Meaning |
|---|---|---|
enabled | false | Off renders nothing for the component. |
mode | extend | How the bundle reaches the container trust store. See Modes. |
resources | {} | Requests and limits for the custom-ca-trust init container in extend mode. Empty gives it the same resources as the component container (gateway.resources, sra.webConfig.resources, sra.sshConfig.resources, with the strictSecurityPolicy defaults), so a namespace quota or limit range admits it as it admits that container. An init container does not add to the pod's scheduled requests. |
volumeName | ca-certificates | Name of the pod volume that holds the bundle. |
volumeType | configMap | configMap or secret, case-insensitive. Any other value fails the render. |
volumeSourceName | "" | Name of the ConfigMap or Secret. Required when enabled is true. It must have the key ca-certificates.crt, which holds one or more PEM certificates. |
Modes
extend (default) | replace | |
|---|---|---|
| What the bundle holds | Only your CAs: the proxy CA, internal roots, intermediates. | Every CA the container trusts, public roots included. |
| Effect on the image trust store | Your CAs are added. The public roots in the image stay trusted. | The bundle is mounted over /etc/ssl/certs/ca-certificates.crt and hides the image's file. |
| Pod changes | An init container, custom-ca-trust, runs the same image. It copies /etc/ssl/certs and /usr/local/share/ca-certificates into emptyDir volumes, appends the bundle to ca-certificates.crt, and adds it as custom-ca.crt for update-ca-certificates. The container mounts both volumes. | One subPath mount. No init container. |
| Gateway CA Certificate Store | Works. Certificates added at runtime are added beside your CAs. | update-ca-certificates cannot replace the mounted file, so certificates added at runtime do not reach the system trust store. |
With gateway.deployment.readOnlyRootFilesystem | Supported. The init container fills the same trust volumes, and the image's startup seed does not overwrite the bundle. | Not recommended. The bundle must hold every CA. |
extend accepts a full bundle too: roots that are already in the image are trusted twice, which has no effect.
When the Gateway release already uses /etc/ssl/certs or /usr/local/share/ca-certificates, gateway.customCA renders as replace, so the pod spec stays as it was. That is the case for a gateway.deployment.extraVolumeMounts, gateway.persistence.mountPath or gateway.secretsStore.mountPath on either path, or a gateway.deployment.extraVolumes entry named etc-ssl-certs or usr-local-ca-certificates without readOnlyRootFilesystem. Remove that mount to get extend.
In extend the init container parses each certificate in the bundle. When a certificate does not parse, it logs a warning and the pod starts as before: kubectl logs <pod> -c custom-ca-trust shows customCA: warning: ... holds N PEM certificates and M parse. TLS clients skip a certificate that does not parse, so that CA is not trusted. The usual cause is a bundle written on one line, for example with kubectl create secret --from-literal: create it with --from-file instead, so each -----BEGIN CERTIFICATE----- and -----END CERTIFICATE----- marker sits on its own line.
custom-ca-trust runs the component's own image, so extend needs /bin/sh, cp, cat and printf in that image, as the Gateway and SRA images have. The check also uses awk, tr and openssl, and is skipped when the image lacks awk or openssl. With a custom image that has no shell, the init container fails and the pod does not start: use mode: replace.
Build a bundle for replace mode
Start from the bundle in the image you run, then add your CAs:
docker run --rm --entrypoint cat akeyless/gateway:<tag> /etc/ssl/certs/ca-certificates.crt > ca-certificates.crt
cat private-root.crt private-intermediate.crt >> ca-certificates.crt
kubectl -n <namespace> create configmap <name> --from-file=ca-certificates.crt
Use akeyless/zero-trust-bastion:<tag> for the SRA bundle.
Verify
From a running Gate
Deploy akeyless-gateway with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has akeyless-gateway on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartakeyless-gateway is pinned at v3.14.1 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below opentenant validate opentenant.yaml terraform init && terraform apply