Bemærk
Adgang til denne side kræver godkendelse. Du kan prøve at logge på eller ændre mapper.
Adgang til denne side kræver godkendelse. Du kan prøve at ændre mapper.
Microsoft Defender for Containers uses multiple connectivity paths to collect security signals and provide protection across container registries and Kubernetes environments. The required connectivity depends on the enabled features and the environment in which your containers run.
Implementation details vary between Azure Kubernetes Service (AKS), Amazon Elastic Kubernetes Service (EKS), Google Kubernetes Engine (GKE), and Arc-enabled Kubernetes clusters.
Learn more about network requirements, permissions, and supported configurations in Network access and permissions reference for Defender for Containers.
Capability model overview
The following table shows how key Defender for Containers capabilities are implemented and whether they require in-cluster components:
| Capability | Agentless | Requires in-cluster components |
|---|---|---|
| Image vulnerability assessment | Yes | No |
| Kubernetes posture assessment | Yes | No |
| Runtime threat detection | No | Yes |
| Control plane threat detection | Yes | No |
Connection to container registries
Image vulnerability assessment is triggered when images are pushed to supported registries and periodically based on registry configuration. Defender for Cloud analyzes image metadata and layers required for vulnerability assessment. In supported scenarios, vulnerability assessment results can be published back to the registry without modifying the original container image. These capabilities don’t require any components to be deployed in your Kubernetes clusters.
Connection to Kubernetes clusters
Microsoft Defender for Cloud connects to the Kubernetes API endpoint to discover clusters, collect configuration data, and perform posture and risk analysis. Depending on the enabled features and environment, this connectivity can require read access to cluster metadata and, in some scenarios, limited write operations to configure required access bindings or extensions.
Runtime data sent from Kubernetes clusters
Kubernetes clusters send runtime security data from worker nodes to the Microsoft Defender for Cloud backend. This data is collected by Defender for Containers components running in the cluster and sent outbound for analysis. This connectivity path supports runtime threat detection and other sensor-based capabilities.
Connection to cloud provider APIs
Microsoft Defender for Cloud connects to cloud provider APIs to discover resources and perform security analysis as part of the cloud environment connection process. This connectivity path is established when you connect your cloud environment to Microsoft Defender for Cloud.
Kubernetes audit logs sent from cloud infrastructure
Cloud infrastructure sends Kubernetes audit logs to Microsoft Defender for Cloud for control plane threat detection and security analysis. The method used to collect and send audit logs depends on the cloud provider and environment in which the Kubernetes clusters run.
Proxy and private connectivity support
Defender for Containers components support outbound connectivity through configured proxies and private connectivity configurations.
Architecture for each Kubernetes environment
- Azure Kubernetes Service (AKS)
- Amazon Elastic Kubernetes Service (EKS)
- Google Kubernetes Engine (GKE)
- Azure Arc-enabled Kubernetes
Architecture components
When Defender for Cloud protects a cluster hosted in Azure Kubernetes Service, it collects Kubernetes audit log data natively through Azure infrastructure without requiring additional agents or configuration. To get the full protection offered by Microsoft Defender for Containers, you need these components:
- Defender sensor: A lightweight DaemonSet deployed on AKS nodes that collects runtime telemetry (Kubernetes events, process, and network data) by using eBPF technology. It sends the telemetry securely to Defender for Cloud for runtime threat protection. The sensor registers with a Log Analytics workspace and acts as a data pipeline. However, the audit log data isn't stored in the Log Analytics workspace. The Defender sensor is deployed as an AKS Security profile, natively integrated into AKS Resource Provider (RP).
Note
When you configure the Defender sensor on an AKS cluster, it triggers a reconciliation process. This process happens as part of the Defender for Containers plan and is expected behavior.
- Azure Policy for Kubernetes: A pod that extends the open-source Gatekeeper v3 and registers as a web hook to Kubernetes admission control. With this pod, you can apply at-scale enforcements and safeguards on your clusters in a centralized, consistent manner. The Azure Policy for Kubernetes pod is deployed as an AKS add-on and you only need to install it on one node in the cluster. It provides the option to enforce configuration rules. Learn more about Kubernetes workload protection and Azure Policy for Kubernetes.
- ACR integration: Push-triggered and periodic image scanning for Azure Container Registry, providing vulnerability assessment without requiring extra components.
- Agentless discovery: Provides visibility into your Kubernetes clusters without requiring any agents, by using Azure native capabilities to discover and assess cluster configurations.
- Agentless scanning for machines: Periodic disk snapshots of Kubernetes nodes for an out-of-band, deep analysis of the operating system configuration and file system. This feature doesn't need any installed agents or network connectivity, and it doesn't affect machine performance.
- Microsoft XDR integration: Integrates with Microsoft’s extended detection and response platform for unified security operations and incident response.
Note
These components require no inbound connections to your clusters and use Azure's native security infrastructure. All components use outbound-only connectivity (no inbound access required).
Defender sensor component details
| Pod name | Namespace | Kind | Short description | Capabilities | Resource limits | Egress required |
|---|---|---|---|---|---|---|
| microsoft-defender-collector-ds-* | kube-system | DaemonSet | Collects runtime telemetry (Kubernetes events, process, and network data) from nodes by using eBPF technology and sends it securely to Defender for Cloud. | SYS_ADMIN, SYS_RESOURCE, SYS_PTRACE |
memory: 296Mi cpu: 360m |
No |
| microsoft-defender-collector-misc-* | kube-system | Deployment | Collects cluster-level inventory and security events that aren't bound to specific nodes. | N/A | memory: 64Mi CPU: 60m |
No |
| microsoft-defender-publisher-ds-* | kube-system | DaemonSet | Publishes collected telemetry to Microsoft Defender for Containers backend service for processing and analysis. | N/A | memory: 200Mi CPU: 60m |
Https 443 Learn more about the outbound access prerequisites |
* You can't configure resource limits. Learn more about Kubernetes resources limits.
How does agentless discovery for Kubernetes in Azure work?
The discovery process uses snapshots taken at intervals:
When you enable the agentless discovery for Kubernetes extension, the following process occurs:
- Create:
- If you enable the extension from Defender CSPM, Defender for Cloud creates an identity in your environment called
CloudPosture/securityOperator/DefenderCSPMSecurityOperator. - If you enable the extension from Defender for Containers, Defender for Cloud creates an identity in your environment called
CloudPosture/securityOperator/DefenderForContainersSecurityOperator.
- If you enable the extension from Defender CSPM, Defender for Cloud creates an identity in your environment called
- Assign: Defender for Cloud assigns a built-in role called Kubernetes Agentless Operator to that identity on subscription scope. The role contains the following permissions:
- AKS read (Microsoft.ContainerService/managedClusters/read)
- AKS Trusted Access with the following permissions:
- Microsoft.ContainerService/managedClusters/trustedAccessRoleBindings/write
- Microsoft.ContainerService/managedClusters/trustedAccessRoleBindings/read
- Microsoft.ContainerService/managedClusters/trustedAccessRoleBindings/delete Learn more about AKS Trusted Access.
- Discover: Using the system assigned identity, Defender for Cloud discovers the AKS clusters in your environment by making API calls to the API server of AKS.
- Bind: After discovering an AKS cluster, Defender for Cloud performs an AKS bind operation by creating a
ClusterRoleBindingbetween the created identity and the KubernetesClusterRoleaks:trustedaccessrole:defender-containers:microsoft-defender-operator. TheClusterRoleis visible through the API and gives Defender for Cloud data plane read permission inside the cluster.
Note
The copied snapshot stays in the same region as the cluster.