Microsoft Defender for Endpoint’s runtime protection capabilities can be enabled on Azure Kubernetes Service (AKS) clusters to provide enhanced threat detection and response for your containerized workloads.

Let’s see this in action. Imagine you have an AKS cluster running a web application. Without Defender runtime protection, if a malicious process were to spawn within a pod, or if a container image contained known vulnerabilities being actively exploited, AKS wouldn’t inherently detect or alert you to this at the runtime level.

With Defender for Endpoint integrated, the AKS node’s operating system and the container runtime itself are monitored. This means that suspicious process behavior, like a web server process attempting to establish outbound connections to a known command-and-control server, or a container trying to access sensitive host system files, can be flagged.

Here’s how it works internally. Defender for Endpoint leverages a combination of kernel-level monitoring, file integrity monitoring, network traffic analysis, and behavioral analytics. On AKS, this is deployed as a DaemonSet. Each pod running the Defender agent on a node has privileged access to that node’s operating system and container runtime. This allows it to inspect system calls, monitor process trees, and analyze network flows originating from or destined for containers on that node. The agent then forwards security events and alerts to the Microsoft Defender portal for analysis and response.

The primary problem this solves is the blind spot in traditional container security. While image scanning catches vulnerabilities before deployment, runtime protection addresses threats that emerge after your containers are running, whether through zero-day exploits, misconfigurations, or insider threats. It bridges the gap between static vulnerability analysis and dynamic threat detection.

The exact levers you control are primarily through the Defender for Cloud integration. You enable the Defender for Containers plan, which then orchestrates the deployment of the Defender agent to your AKS nodes. Within the AKS cluster configuration itself, you don’t directly tweak Defender settings; instead, you ensure the necessary network policies and RBAC permissions are in place for the Defender agent to function.

You can enable runtime protection using Azure CLI:

az aks update \
    --resource-group <your-aks-resource-group> \
    --name <your-aks-cluster-name> \
    --enable-defender

This command activates the Defender for Containers plan for your AKS cluster, which automatically deploys and configures the necessary Defender runtime protection components.

The Defender agent, running as a DaemonSet on your AKS nodes, relies on specific Kubernetes RBAC roles and role bindings to gain the necessary permissions to monitor containerized workloads and the underlying host. Without these, the agent will fail to start or function correctly.

The next concept you’ll want to explore is how to effectively investigate and respond to the alerts generated by Defender for Endpoint within the Microsoft Defender portal, specifically using the advanced hunting capabilities.

Want structured learning?

Take the full Aks course →