Home/For responders/Containers on AKS and OKE
Containers on AKS and OKE
AKS and OKE run the same Kubernetes as GKE and EKS. The differences that matter in an incident are what the cluster records, what a pod can reach on its node, and what can remove the node before you have its disks.
Side by side
| AKS | OKE | |
|---|---|---|
| Cluster audit log | Nothing kept until you add a diagnostic setting. kube-audit (table AKSAudit) has every request; kube-audit-admin (AKSAuditAdmin) leaves out get and list | Changes are in the OCI Audit service, under OKE API Server Admin Access, for 365 days. Oracle does not say whether reads are recorded |
kubectl exec | In AKSAudit on the exec subresource. kubectl 1.31 and later opens exec as a get over a WebSocket, which kube-audit-admin leaves out | Not documented. Exec into a test pod and search Audit before you rely on it |
| A pod's cloud identity | Workload ID: a federated credential whose subject is system:serviceaccount:<namespace>:<name>. Sign-ins carry FederatedCredentialId. The pod-managed identity add-on has been out of support since September 2025 | Workload identity, on enhanced clusters, through the OCI SDK: policies match request.principal.type = 'workload' with the namespace, service account, and cluster |
| The node's own identity | Every pod can reach the instance metadata endpoint by default. IMDS restriction, in preview, blocks pods that are not on the host network | Every pod can reach the node's instance principal certificates by default. Oracle's fix is a default-deny network policy |
| Node operating system | Ubuntu by default on Standard, or Azure Linux. kubectl debug node/<node> starts a privileged pod with the host at /host; SSH is as azureuser | Oracle Linux, with CRI-O and crictl. SSH as opc only if a key was set when the node pool was created, usually through the Bastion service |
| What removes a node | The cluster autoscaler, node auto-provisioning, auto-repair, node image upgrades (weekly by default), and Spot eviction | The cluster autoscaler, node cycling, scaling the pool down, preemptible capacity being reclaimed, and a manual reboot or boot volume replacement through the OKE or Kubernetes API. No automatic repair is documented |
| Keeping a node | The autoscaler annotation, karpenter.sh/do-not-disrupt for node auto-provisioning, and a cordon. AKS does not support changes in the node resource group, so there is no protection on the VM itself | The autoscaler annotation and a cordon. OCI has no termination protection, so ask the platform team to pause node pool changes |
| The node's disks | OS disks are ephemeral by default where the VM size allows it, and cannot be snapshotted. Managed data disks, persistent volumes included, can | Boot and block volume backups, crash-consistent while the node runs. Persistent volumes from oci-bv are deleted with their claim by default |
| Managed runtime detection | Defender for Containers, with a sensor on each node. Defender XDR adds Isolate pod, Restrict pod access, and Terminate pod, in preview | Cloud Guard's container checks cover configuration on enhanced clusters. No runtime detection inside containers is documented; Falco fills the gap |
Responding on AKS
- Record the pod and its logs. Annotate the node for the cluster autoscaler and,
if the cluster uses node auto-provisioning, with
karpenter.sh/do-not-disrupt. - Cordon the node. Do not cut the node itself off the network: a node that stops reporting Ready for about 10 minutes is rebooted, then reimaged, which erases an ephemeral OS disk.
- Snapshot every managed disk on the node into a resource group of your own. A snapshot left in the node resource group is deleted with the cluster.
- Label the pod for quarantine. If the node's OS disk was ephemeral, anything
the attacker wrote outside a volume survives only as long as the node. Investigate
on it now with
kubectl debug node, knowing that the debugging pod is itself a change.
Switch on kube-audit before an incident. kube-audit-admin
is cheaper, and it misses exec from current kubectl and every read of a
secret.
Responding on OKE
- Record the pod and its logs, annotate the node for the autoscaler, and cordon it.
- Tell whoever manages the node pool to pause every change, including node reboots. Node cycling and boot volume replacement both remove the evidence.
- Back up the boot volume and every attached block volume, persistent volumes included, with the incident in a tag.
- Label the pod for quarantine. The quarantine policy denies all egress, which also stops the pod reaching the metadata endpoint and its node's instance principal.
Every pod on an OKE node can act as that node unless you block it. Look for the node's instance OCID in Audit calls made after the compromise.
When you cannot reach the node
| Mode | What you lose | What to rely on |
|---|---|---|
| AKS virtual nodes | The node. Pods run in Azure Container Instances, with no VM or disk of yours | The pod's record and logs, the audit log, and logs the application ships |
| AKS Automatic | SSH to nodes through Entra ID, which Automatic does not support, and changes in the node resource group, which a deny assignment locks. Deployment safeguards enforce the baseline Pod Security Standard, which refuses the privileged, host-namespace pods node debugging uses, outside excluded namespaces | The pod's record and logs, Container insights, which is on by default, and Defender for Containers |
| OKE virtual nodes | The node, exec, ephemeral containers, and follow-mode logs. Persistent volumes can only be File Storage | kubectl logs and kubectl logs -p, the pod's record, and Audit |
Templates for this
- Evidence from a compromised container, on AKS and OKE as well as GKE and EKS
- Evidence that survives termination: quarantine policy and responder role for any cluster
- Runtime detection with Falco
- Clearing an attacker out of a cluster, once the evidence is safe