Skip to content

Commit 95be4c9

Browse files
Merge pull request #2233 from MicrosoftDocs/main
Auto Publish – main to live - 2025-12-11 18:05 UTC
2 parents f8d4a2b + a15ee57 commit 95be4c9

6 files changed

Lines changed: 194 additions & 62 deletions

articles/defender-for-cloud/deploy-helm.md

Lines changed: 148 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,150 @@ title: Install Defender for Containers sensor Using Helm
33
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.
44
author: Elazark
55
ms.topic: how-to
6-
ms.date: 06/16/2025
6+
ms.date: 12/11/2025
77
ms.author: elkrieger
88
ai-usage: ai-assisted
99
---
1010

11-
# Configure Defender for Containers sensor deployed with Helm
11+
# Install Defender for Containers sensor using Helm
1212

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.
1414

15-
## Prerequisites
15+
## General prerequisites
1616

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).
2118

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:
81+
82+
[delete_conflicting_policies.sh](https://gist.github.com/matannov/a1830a8333cb7804704ad148edc5c904)
83+
84+
Run the script with the command:
85+
86+
```bash
87+
delete_conflicting_policies.sh <CLUSTER_AZURE_RESOURCE_ID>
88+
```
89+
90+
> [!NOTE]
91+
> 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):
94+
95+
[install_defender_sensor_aks.sh](https://gist.github.com/matannov/8a68d2101bc57af461913f7547891d94)
96+
97+
Run the script with the command:
98+
99+
```bash
100+
install_defender_sensor_aks.sh <CLUSTER_AZURE_RESOURCE_ID> <RELEASE_TRAIN> <VERSION>
101+
```
102+
103+
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):
111+
112+
[install_defender_sensor_mc.sh](https://gist.github.com/matannov/00c0bc43f63280f5cf30736b38a54678)
113+
114+
Set your kubeconfig context to the target cluster, and run the script with the command:
115+
116+
```bash
117+
install_defender_sensor_mc.sh <SECURITY_CONNECTOR_AZURE_RESOURCE_ID> <RELEASE_TRAIN> <VERSION> <DISTRIBUTION> [<ARC_CLUSTER_RESOURCE_ID>]
118+
```
119+
120+
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.
132+
>
133+
>For example:
134+
>
135+
>```azurecli
136+
>az resource show \
137+
> --name <connector-name> \
138+
> --resource-group <resource-group-name> \
139+
> --resource-type "Microsoft.Security/securityConnectors" \
140+
> --subscription <subscription-id> \
141+
> --query id -o tsv
142+
>```
143+
>
144+
>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.
23150
24151
Run the following command to check that the installation succeeded:
25152
@@ -31,31 +158,31 @@ The STATUS field should read **deployed**.
31158
32159
## Security rules for gated deployment
33160
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.
35162
36163
### Accessing security rules
37164
38-
1. Go to the **Microsoft Defender for Cloud (MDC) Dashboard**.
165+
1. Navigate to the **Microsoft Defender for Cloud (MDC) Dashboard**.
39166
1. In the left navigation pane, select **Environment settings**.
40167
1. Select the **Security rules** tile.
41168
42169
### Configuring vulnerability assessment rules
43170
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.
46173
47174
> [!IMPORTANT]
48175
> 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+
>
53180
> :::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.":::
54181
55-
## Handle existing recommendations
182+
## Existing recommendation to provision sensor
56183
57184
> [!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.
59186
60187
**For AKS**:
61188
@@ -77,10 +204,9 @@ Run the following command to update an existing Helm-based deployment:
77204
helm upgrade microsoft-defender-for-containers-sensor \
78205
oci://mcr.microsoft.com/azuredefender/microsoft-defender-for-containers-sensor \
79206
--devel \
80-
--reuse-values \
81-
--namespace mdc
207+
--reuse-values
82208
```
83209
84-
## Next steps
210+
## Related content
85211
86212
- [Common questions about protecting containers](faq-defender-for-containers.yml)

0 commit comments

Comments
 (0)