You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -3,23 +3,150 @@ title: Install Defender for Containers sensor Using Helm
3
3
description: Learn how to install and configure the Microsoft Defender for Containers sensor on AKS, EKS, and GKE clusters using Helm, including prerequisites, scripts, and troubleshooting steps.
4
4
author: Elazark
5
5
ms.topic: how-to
6
-
ms.date: 06/16/2025
6
+
ms.date: 12/11/2025
7
7
ms.author: elkrieger
8
8
ai-usage: ai-assisted
9
9
---
10
10
11
-
# Configure Defender for Containers sensor deployed with Helm
11
+
# Install Defender for Containers sensor using Helm
12
12
13
-
This article describes how to configure and manage the Microsoft Defender for Containers sensor after you've deployed it using Helm on your Kubernetes clusters.
13
+
This article describes how to install and configure the Microsoft Defender for Containers sensor on AKS, EKS, and GKE clusters using Helm. You'll learn about prerequisites, enabling Defender for Containers, and step-by-step deployment instructions for different environments.
14
14
15
-
## Prerequisites
15
+
## General prerequisites
16
16
17
-
- Defender for Containers plan enabled on your subscription
18
-
- Defender sensor already deployed via Helm on your clusters
19
-
- Helm version 3.8 or later installed
20
-
- Network requirements met as described in [Defender sensor network requirements](defender-for-containers-enable.md?tabs=aks-deploy-portal%2Ck8s-deploy-asc%2Ck8s-verify-asc%2Ck8s-remove-arc%2Caks-removeprofile-api&pivots=defender-for-container-aks%23network-requirements)
17
+
Make sure all prerequisite requirements for the Defender for Containers sensor are met, as described in the [Defender sensor network requirements](defender-for-containers-enable.md?tabs=aks-deploy-portal%2Ck8s-deploy-asc%2Ck8s-verify-asc%2Ck8s-remove-arc%2Caks-removeprofile-api&pivots=defender-for-container-aks%23network-requirements).
21
18
22
-
## Verify Helm deployment
19
+
## Step 1: Enable Defender for Containers
20
+
21
+
If your Defender for Containers plan isn't already enabled, follow these steps:
22
+
23
+
1. In the Azure portal, go to **Microsoft Defender for Cloud**, and select the subscription for the clusters where you want to install the Helm chart. In EKS and GKE, select the environment with those clusters (the security connector for the EKS or GKE account with the cluster).
24
+
25
+
1. Under **Cloud Workload Protection Platform (CWPP)**, find the **Containers** plan and set the toggle to **On**.
26
+
27
+
:::image type="content" source="media/deploy-helm/enable-containers-plan.png" alt-text="Screenshot showing how to enable the Containers plan." lightbox="media/deploy-helm/enable-containers-plan.png":::
28
+
29
+
1. Next to the **Containers** plan, select **Settings**.
30
+
31
+
:::image type="content" source="media/deploy-helm/navigate-to-settings.png" alt-text="Screenshot showing how to select the settings button." lightbox="media/deploy-helm/navigate-to-settings.png":::
32
+
33
+
1. In the **Settings & monitoring** pane, ensure the following toggles are set to **On**:
34
+
-**Defender sensor**
35
+
-**Security findings**
36
+
-**Registry access**
37
+
38
+
:::image type="content" source="media/deploy-helm/verify-correct-toggles.png" alt-text="Screenshot showing how to verify the correct toggles are enabled." lightbox="media/deploy-helm/verify-correct-toggles.png":::
39
+
40
+
Now you're ready to set up the Defender for Containers sensor with Helm.
41
+
42
+
## Step 2: Install the sensors Helm chart
43
+
44
+
### For AKS Automatic Only
45
+
46
+
Run the following command for AKS Automatic:
47
+
48
+
```bash
49
+
# Update Azure CLI to the latest version
50
+
az upgrade
51
+
52
+
# If you don't have the AKS preview extension installed yet
53
+
az extension add --name aks-preview
54
+
55
+
# Update the AKS extension specifically
56
+
az extension update --name aks-preview
57
+
```
58
+
59
+
### Installation prerequisites
60
+
61
+
- Helm >= 3.8 (OCI support is GA)
62
+
- Resource group owner role for the target cluster (AKS) or security connector (EKS or GKE)
63
+
- Azure resource ID for the target cluster
64
+
65
+
> [!NOTE]
66
+
> Use the following command to generate a list of your AKS clusters Azure resource IDs given a `<SUBSCRIPTION_ID>` and `<RESOURCE_GROUP>`:
67
+
>
68
+
>```bash
69
+
>az aks list \
70
+
>--subscription <SUBSCRIPTION_ID> \
71
+
>--resource-group <RESOURCE_GROUP> \
72
+
>--query "[].id" \
73
+
>-o tsv
74
+
>```
75
+
76
+
### AKS
77
+
78
+
Before you install the sensor, remove any **conflicting policies**. These policy assignments cause the GA version of the sensor to be deployed on your cluster. You can find the list of policy definitions for your subscription at [Policy - Microsoft Azure](https://ms.portal.azure.com/#view/Microsoft_Azure_Policy/PolicyMenuBlade/~/Definitions). The ID for the conflicting policy is 64def556-fbad-4622-930e-72d1d5589bf5.
79
+
80
+
Run the following script to remove them using Azure CLI:
> This script removes resource group and subscription level policies for setting up the GA version of Defender for Containers, which can affect clusters other than the one you're configuring.
92
+
93
+
The following script installs the Defender for Containers sensor (and removes any existing deployment, if one exists):
In the following command, replace the placeholder text `<CLUSTER_AZURE_RESOURCE_ID>`, `<RELEASE_TRAIN>`, and `<VERSION>` with your own values. Use 'public' for the public preview releases (0.9.x). For `<VERSION>`, use 'latest' or a specific semantic version.
104
+
105
+
> [!NOTE]
106
+
> This script sets a new kubeconfig context, and might create a Log Analytics workspace in your Azure account.
107
+
108
+
### EKS/GKE
109
+
110
+
The following script installs the Defender for Containers sensor (and removes any existing deployment, if one exists):
In the following command, replace the placeholder text `<SECURITY_CONNECTOR_AZURE_RESOURCE_ID>`, `<RELEASE_TRAIN>`, `<VERSION>`, `<DISTRIBUTION>`, and `<ARC_CLUSTER_RESOURCE_ID>` with your own values. Please note that ARC_CLUSTER_RESOURCE_ID is an optional parameter and only should be used for existing clusters who use the Defender for Containers arc extension and want to provision the sensor via Helm or use arc cluster and want to provision the sensor via Helm.
121
+
For `<SECURITY_CONNECTOR_AZURE_RESOURCE_ID>`:
122
+
123
+
- Set up a security connector for your AWS or GCP account
124
+
125
+
> [!NOTE]
126
+
> To install the Helm chart on an EKS or GKE cluster, make sure the cluster account is connected to Microsoft Defender for Cloud. See [Connect your AWS account](quickstart-onboard-aws.md) or [Connect your GCP project](quickstart-onboard-gcp.md).
127
+
128
+
- Get its Azure resource ID
129
+
130
+
> [!NOTE]
131
+
> To install the Helm chart on an EKS or GKE cluster, you need the security connector resource ID for the account your cluster belongs to. Run the [az resource show](/cli/azure/resource#az-resource-show) CLI command to get this value.
>In this example, replace the placeholder text `<connector-name>`, `<resource-group-name>`, and `<subscription-id>` with your values.
145
+
146
+
Use 'public' for the public preview releases (0.9.x). For `<VERSION>`, use 'latest' or a specific semantic version. For `<DISTRIBUTION>`, use `eks` or `gke`.
147
+
148
+
> [!NOTE]
149
+
> This script might create a Log Analytics workspace in your Azure account.
23
150
24
151
Run the following command to check that the installation succeeded:
25
152
@@ -31,31 +158,31 @@ The STATUS field should read **deployed**.
31
158
32
159
## Security rules for gated deployment
33
160
34
-
Define security rules to control what can be deployed into your Kubernetes clusters. These rules help you block or audit container images based on security criteria, such as images with too many vulnerabilities.
161
+
You can define security rules to control what is allowed to be deployed into your Kubernetes clusters. These rules enable you to block or audit container images based on security criteria, such as images with too many vulnerabilities.
35
162
36
163
### Accessing security rules
37
164
38
-
1.Go to the **Microsoft Defender for Cloud (MDC) Dashboard**.
165
+
1. Navigate to the **Microsoft Defender for Cloud (MDC) Dashboard**.
39
166
1. In the left navigation pane, select **Environment settings**.
40
167
1. Select the **Security rules** tile.
41
168
42
169
### Configuring vulnerability assessment rules
43
170
44
-
1.In the Security rules page, go to **Vulnerability assessment** under the **Gated deployment** section.
45
-
1. Create or update your security rules.
171
+
1. Within the Security rules page, navigate to **Vulnerability assessment** under the **Gated deployment** section.
172
+
1. Create or edit your security rules as needed.
46
173
47
174
> [!IMPORTANT]
48
175
> For Helm installations:
49
-
>
50
-
> -**Subscription Support Warning**: When you create rules, you might see a message that your selected subscription isn't supported for Gated deployment. This message appears because you installed the Defender for Containers components with Helm instead of using the dashboard's automatic installation.
51
-
> -**Skip Auto-Installation**: If you're prompted to enable gating in the third tab of the security rule edit window, select**Skip**. This option enables auto-installation, which conflicts with your existing Helm deployment.
52
-
>
176
+
>
177
+
> - **Subscription Support Warning**: When creating rules, your selected subscription may be marked as "not supported for Gated deployment." This occurs because you installed the Defender for Containers components using Helm rather than through the dashboard's automatic installation.
178
+
>- **Skip Auto-Installation**: If prompted to enable gating in the third tab of the security rule edit window, make sure to press**Skip**. This option enables auto-installation, which conflicts with your existing Helm deployment.
179
+
>
53
180
> :::image type="content" source="media/deploy-helm/edit-vulnerability-assessment-rule.png" alt-text="Screenshot showing the third tab of the security rule edit window.":::
54
181
55
-
## Handle existing recommendations
182
+
## Existing recommendation to provision sensor
56
183
57
184
> [!NOTE]
58
-
> If you use Helm to set up the sensor, **ignore** the existing recommendations about provisioning the sensor.
185
+
> If you use Helm to set up the sensor, **ignore** the existing recommendations.
59
186
60
187
**For AKS**:
61
188
@@ -77,10 +204,9 @@ Run the following command to update an existing Helm-based deployment:
0 commit comments