Deploying an Akeyless Gateway into an Azure Kubernetes Service (AKS) cluster using Azure Workload Identity allows the Gateway to authenticate using its own Azure AD Identity without storing long-lived credentials. This setup ensures secure, seamless authentication through Azure AD authentication methods.
Before proceeding, ensure you have:
- An AKS Cluster (running Kubernetes 1.21+)
- Azure CLI installed and authenticated (
az login) - Helm 3 installed
- kubectl configured for AKS
- Akeyless SaaS Account
- Azure Managed Identity created and assigned the necessary permissions
-
Create a Managed Identity:
az identity create --name AkeylessGatewayMI --resource-group <your-resource-group>
- Capture the client ID and principal ID.
-
Assign IAM Role to Managed Identity:
az role assignment create --assignee <principal-id> --role "Managed Identity Operator" --scope /subscriptions/<subscription-id>
This allows the AKS service account to use the Managed Identity.
-
Enable OIDC Issuer & Workload Identity:
az aks update --resource-group <your-resource-group> --name <your-aks-cluster> --enable-oidc-issuer --enable-workload-identity
- This ensures AKS supports Azure Workload Identity.
-
Get the AKS OIDC Issuer URL:
az aks show --resource-group <your-resource-group> --name <your-aks-cluster> --query "oidcIssuerProfile.issuerUrl" -o tsv
- Save this issuer URL for configuring Azure AD authentication.
- Create a Kubernetes Namespace for Akeyless:
kubectl create namespace akeyless
- Create a Kubernetes Service Account (SA):
Apply the manifest:
apiVersion: v1 kind: ServiceAccount metadata: name: akeyless-gateway-sa namespace: akeyless annotations: azure.workload.identity/client-id: "<client-id>"
kubectl apply -f akeyless-sa.yaml
- Add Akeyless Helm Repository:
helm repo add akeyless https://helm.akeyless.io helm repo update
- Create the Azure AD Authentication Method the Gateway will use
- Log into Akeyless Web Console (
https://console.akeyless.io). - Navigate to Authentication Methods → Add new authentication.
- Select Azure AD and configure it:
- Tenant ID:
<your-azure-tenant-id>
- Tenant ID:
- Copy the Access ID to be used in the next step
-
Install Akeyless Gateway with Workload Identity:
- Download the Helm values template and input the Access ID
- Set the Gateway Access ID and set the correct access type in the values file. Be sure to configure the kubernetes service account to use the one we created.
helm install akeyless-gateway akeyless/gateway --values values.yaml
- Check Akeyless Gateway Logs:
kubectl logs -n akeyless -l app.kubernetes.io/name=akeyless-gateway
This setup ensures that:
✅ Akeyless Gateway runs securely in AKS
✅ Uses Azure Workload Identity to authenticate with Akeyless
✅ Secrets are retrieved without storing long-lived credentials
For further configurations, visit Akeyless Docs. 🚀