> ## Documentation Index
> Fetch the complete documentation index at: https://docs.e6data.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Use an existing AKS cluster

> Install e6data into an AKS cluster you already run, and share that cluster safely with your other teams' workloads.

How-to guideApplies to: CloudPrem on Azure

You can install e6data into an AKS cluster you already run. Check the list below first, then follow the standard install and skip the steps that create the network and cluster.

## Requirements

* A Kubernetes version in the supported range ([Component versions and operations](https://docs.e6data.com/platform/deploy/azure-cloudprem/component-versions-and-operations.md)).
* OIDC issuer and workload identity turned on. If either is off, the install fails without a clear error. Check these first.
* Outbound access to the hostnames in [Hostnames and ports](https://docs.e6data.com/platform/deploy/azure-cloudprem/hostnames-and-ports.md).
* Enough free IPs in your subnets ([IP address sizing](https://docs.e6data.com/platform/deploy/azure-cloudprem/ip-address-sizing.md)) and enough vCPU quota ([Sizing and cost](https://docs.e6data.com/platform/deploy/azure-cloudprem/sizing-and-cost.md)).
* Agreement on reusing cert-manager or a node scaler if your cluster already runs one.
* AKS and operator upgrades affect every workspace in the cluster. If that matters, use separate clusters for production and pre-production.

## Checklist: existing AKS cluster

| Item | Expected | If not met |
| - | - | - |
| Kubernetes version | 1.31 to 1.36 (up to 1.35 with e6data's Karpenter; up to 1.34 with the upstream Karpenter 1.7.1 the install steps use) | Upgrade the cluster |
| OIDC issuer and Workload Identity | Both `true` | `az aks update -g <RG> -n <CLUSTER> --enable-oidc-issuer --enable-workload-identity` |
| Network plugin | Azure CNI overlay (Cilium recommended), or bring-your-own Cilium | Plan it before install. According to Microsoft, moving an existing cluster to Azure CNI overlay with Cilium is possible in place, but it is disruptive and one-way. A bring-your-own CNI cluster can't be changed |
| Load balancer | Standard SKU | Azure retired the Basic load balancer for AKS. Move to Standard with `az aks update -g <RG> -n <CLUSTER> --load-balancer-sku standard` before you install e6data: the move causes downtime, can't be rolled back, and isn't allowed while custom admission webhooks exist. A cluster with an internal Basic load balancer must be recreated |
| Node scaling | NAP or e6data's Karpenter. AKS node pools with the cluster autoscaler are coming later | See [Node provisioning](https://docs.e6data.com/platform/deploy/azure-cloudprem/node-provisioning.md) |
| Image pull | AcrPull on the kubelet identity (same Microsoft Entra tenant as e6data's registry), or a pull secret from e6data (any tenant) | Set up during install |
| Installer rights | Role-assignment rights, or identities pre-created by your identity team. For the Kubernetes steps with local accounts off: Azure Kubernetes Service RBAC Cluster Admin on the cluster (Owner or Contributor alone give no Kubernetes access) | See [Organization policies](https://docs.e6data.com/platform/deploy/azure-cloudprem/organization-policies.md) |
| cert-manager, Karpenter, KEDA, VPA | Not installed, or agreed to reuse. e6data's install adds KEDA and VPA (included in the In-VPC install) | `kubectl get pods -A \| grep -iE 'cert-manager\|karpenter\|keda\|vpa'` |
| Default StorageClass | e6data's install adds `managed-csi-e6` and makes it the cluster default, demoting your current default | `kubectl get storageclass` |
| Host ports 4317 and 4318 | Free on every node. With cluster monitoring on (the default in e6data's install), the collector runs on all nodes and tolerates all taints | Free the ports, or turn cluster monitoring off |

## Choices made at cluster creation

> [!NOTE]
>
> Some of these can't be changed on an existing cluster. If a fixed one doesn't match, you need a new cluster.

| Choice | Azure |
| - | - |
| Network plugin and pod IP mode | Plan at creation. According to Microsoft, moving to Azure CNI overlay with Cilium in place is disruptive and one-way. A bring-your-own CNI can't be changed |
| Service CIDR | Fixed at creation. From Kubernetes 1.33 the range can be extended, not replaced |
| Disk encryption with your key on node disks | Disk Encryption Set must be set when the cluster is created |
| Outbound type with NAP | With NAP on, you can't change the outbound type later |
| Private API server | Supported. Making an existing cluster private (API Server VNet Integration) is one-way, needs a restart and changes the API server IP |
| Authentication mode | Local accounts can be turned off later |

## Steps

1. Run the checks in [Preflight check](#preflight-check) below and fix any failure.
2. Agree with e6data on the node scaler and whether to reuse cert-manager.
3. Follow the standard install ([Configure registry, Kubernetes, and networking](https://docs.e6data.com/platform/deploy/azure-cloudprem/configure-registry-kubernetes-networking.md), then [Deploy workspace and e6data](https://docs.e6data.com/platform/deploy/azure-cloudprem/deploy-workspace.md)), choosing the **Use an existing AKS cluster** tab in Part 1, and skip:

   * creating the VNet, subnets and NAT;
   * creating the AKS cluster and its system node pool;
   * the Karpenter steps if you use NAP ([Node provisioning](https://docs.e6data.com/platform/deploy/azure-cloudprem/node-provisioning.md));
   * cert-manager if you reuse yours.

   If you install with Terraform, Helm or GitOps instead, see [Install with your own tooling](https://docs.e6data.com/platform/deploy/azure-cloudprem/install-with-your-own-tooling.md).
4. Create the roles or identities from [Permissions reference](https://docs.e6data.com/platform/deploy/azure-cloudprem/permissions-reference.md) (or have your identity team create them).

## Preflight check

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
az aks show -g <RG> -n <CLUSTER> \
  --query "{k8s:kubernetesVersion, oidc:oidcIssuerProfile.enabled, wi:securityProfile.workloadIdentity.enabled, \
            network:networkProfile.networkPlugin, outbound:networkProfile.outboundType}" -o yaml
# Add-ons
kubectl get pods -A | grep -iE 'cert-manager|karpenter|keda|vpa'
kubectl get storageclass
```

Expected: version in range, OIDC issuer present, workload identity on, required add-ons listed.

## Verify

1. All workspace pods are `Running`: `kubectl get pods -n <WORKSPACE_NAME> -o wide`.
2. Resume a cluster from the e6data console. It reaches **Running**.
3. Run a query and check it appears in **Query History**.

## Troubleshooting

| Symptom | Cause | Fix |
| - | - | - |
| Workspace pods can't read cloud storage | OIDC issuer or workload identity off | Turn on both, then restart the pods |
| Two cert-manager installs conflict | Existing cert-manager not reused | Remove the second install and reuse yours |
| e6data pods `Pending` | No node pool or NodePool matches the e6data taints and labels | See [Node provisioning](https://docs.e6data.com/platform/deploy/azure-cloudprem/node-provisioning.md) |

## Share the cluster with other teams

Other teams can run workloads in the same AKS cluster. e6data keeps its engines on its own tainted nodes and its pods in its own namespaces. Your cluster-wide security agents, quotas, policy engines and network policies work alongside it, with the settings below.

### Requirements for sharing

* e6data runs in its own namespaces: `e6operator` and one namespace per workspace.
* e6data engine nodes carry a taint (`workspace-name=<ws>:NoSchedule`, or the taint you set on your own node group). Your workloads don't land there unless they tolerate it.
* Your DaemonSets that must run on every node (security agents, log shippers) must tolerate the e6data taints: `workspace-name` on engine nodes and `e6data-node-type=platform` on workspace platform nodes (or tolerate all taints).
* Your cluster-wide admission policies must admit e6data pods ([Pod security](https://docs.e6data.com/platform/deploy/azure-cloudprem/pod-security.md)).

### What is supported

| Shared-cluster need | Supported? | What you do |
| - | - | - |
| Your workloads in other namespaces | Yes | Nothing |
| Keep your workloads off e6data nodes | Yes | Nothing; the taint does it |
| Policy engines (Kyverno, Gatekeeper, Azure Policy) in Enforce mode | Yes, with exceptions | See [Pod security](https://docs.e6data.com/platform/deploy/azure-cloudprem/pod-security.md) |
| Default-deny network policies (Cilium) | Yes, with e6data's allow-list. Verified for install, cluster create, suspend and resume, and Postgres login | Apply e6data's allow-list per workspace |
| Service mesh (Istio, mesh-wide STRICT mTLS) | Yes, with e6data namespaces excluded or in PERMISSIVE mode (verified through install). STRICT mTLS inside the namespace breaks 443 and 5432 | Exclude the e6data namespaces or use PERMISSIVE. Cilium WireGuard encryption (Advanced Container Networking Services) works with no change |
| Policy that every workload has a PodDisruptionBudget | Yes, with your own PDBs | e6data ships PDBs for the operator, Envoy and xDS. Add your own for the others; the operator keeps them |
| Operator rights limited to e6data namespaces (namespace-only mode) | Not supported today | The operator isn't bound to cluster-admin, but its default ClusterRole is broad. See [Kubernetes permissions](https://docs.e6data.com/platform/deploy/azure-cloudprem/kubernetes-permissions.md) |
| Separate workspaces per business unit | Yes, with separate storage | Each workspace has its own identity. Give each its own storage account, or container-level access |
| GitOps tools managing e6data-created objects | Partly | The operator owns the objects it creates and reverts direct changes (a replica change was reverted in about 7 seconds). Additive labels are kept. Don't let your GitOps tool prune e6data namespaces |

### Things that affect other teams

* The e6data operator's default mode has namespaced rights (including Secrets) in every namespace. A namespace-only mode is not supported today ([Kubernetes permissions](https://docs.e6data.com/platform/deploy/azure-cloudprem/kubernetes-permissions.md)).
* Each workspace's console ClusterRole can create and delete any WarmNodePool in the cluster.
* The cluster log and metrics collector (on by default in e6data's install) runs on every node and tolerates all taints, so host ports 4317 and 4318 must be free on every node, including yours. Otherwise turn cluster monitoring off.
* e6data's install adds KEDA and VPA (included in the In-VPC install) and the `managed-csi-e6` StorageClass, which becomes the cluster default and demotes any existing default.
* e6data adds cluster-wide objects: CRDs, admission webhooks, PriorityClasses and ClusterRoles ([Architecture](https://docs.e6data.com/platform/deploy/azure-cloudprem/architecture.md)).
* The e6data admission webhook listens on port 9443. If an NSG or network policy blocks the API server from reaching it, every e6data resource update fails after 10 seconds; your other workloads are not affected.
* Agents on e6data nodes take capacity from executors. On a node sized exactly for one executor, a large agent can leave the executor `Pending`.

### Steps to share the cluster

1. Give e6data its namespaces: `kubectl create namespace e6operator` and `kubectl create namespace <WORKSPACE_NAME>`.
2. Add a toleration for the e6data taint to your node-wide DaemonSets, and add the agent's requests to your node sizing:

   ```yaml theme={"theme":{"light":"github-light","dark":"github-dark"}}
   tolerations:
     - key: workspace-name          # engine nodes, or the taint on your own e6data node group
       operator: Exists
       effect: NoSchedule
     - key: e6data-node-type        # workspace platform nodes
       operator: Exists
       effect: NoSchedule
   ```
3. If you use ResourceQuota, size it for every cluster you run at once, plus one extra executor set during updates. A LimitRange `max` must be at least the executor's size. Sizes are in [Sizing and cost](https://docs.e6data.com/platform/deploy/azure-cloudprem/sizing-and-cost.md).
4. If you run a mesh, exclude `e6operator` and the workspace namespaces.
5. If you run default-deny network policies, apply e6data's allow-list. It covers DNS, traffic inside a workspace, the operator, the Kubernetes API, webhooks (9443 for the operator), and the query endpoint. Hostnames are in [Hostnames and ports](https://docs.e6data.com/platform/deploy/azure-cloudprem/hostnames-and-ports.md).
6. Run a server-side dry run of e6data pod specs against your policies before go-live ([Pod security](https://docs.e6data.com/platform/deploy/azure-cloudprem/pod-security.md)).

### Preflight check for sharing

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
kubectl get ds -A -o custom-columns=NS:.metadata.namespace,NAME:.metadata.name,TOL:.spec.template.spec.tolerations
kubectl get resourcequota,limitrange -n <WORKSPACE_NAME>
kubectl get networkpolicy -A; kubectl get ciliumnetworkpolicy -A 2>/dev/null
```

Check each node-wide DaemonSet tolerates the e6data taint, and quotas fit the sizes in [Sizing and cost](https://docs.e6data.com/platform/deploy/azure-cloudprem/sizing-and-cost.md).

### Verify sharing

1. Your agents run on e6data nodes: `kubectl get pods -A -o wide --field-selector spec.nodeName=<e6data-node>`.
2. Resume a cluster from the e6data console. It reaches **Running**.
3. Run a query and check it appears in **Query History**.

### Troubleshooting a shared cluster

| Symptom | Cause | Fix |
| - | - | - |
| Executor `Pending` after adding an agent | Agent requests leave too little room | Lower the agent's requests or use larger engine machines |
| Your agent missing on engine nodes | It doesn't tolerate the e6data taint | Add the toleration |
| Resume rejected with a quota error | ResourceQuota too small for clusters plus the update copy | Raise the quota |
| Every e6data change fails after 10 seconds with `failed calling webhook` | API server can't reach the operator on 9443 | Allow 9443 from the control plane to the operator pods |
| Endpoint unreachable inside a mesh | Workspace namespace meshed in STRICT mode | Exclude the e6data namespaces from the mesh |

### Limitations

* Namespace-only operator mode: Not supported today.
* Warm pools in namespace-only mode: Not supported.
* Network policies: open-source Cilium is supported.
* Putting e6data namespaces inside a service mesh with STRICT mTLS: Not supported today.

## See also

* [Architecture](https://docs.e6data.com/platform/deploy/azure-cloudprem/architecture.md)
* [Node provisioning](https://docs.e6data.com/platform/deploy/azure-cloudprem/node-provisioning.md)
* [Kubernetes permissions](https://docs.e6data.com/platform/deploy/azure-cloudprem/kubernetes-permissions.md)
* [Pod security](https://docs.e6data.com/platform/deploy/azure-cloudprem/pod-security.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.