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
Copy file name to clipboardExpand all lines: articles/defender-for-cloud/deploy-helm.md
+22-9Lines changed: 22 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@ title: Install Defender for Containers sensor using Helm
3
3
description: Learn how to install the Microsoft Defender for Containers sensor on Kubernetes clusters using Helm.
4
4
author: Elazark
5
5
ms.topic: how-to
6
-
ms.date: 02/01/2026
6
+
ms.date: 02/18/2026
7
7
ms.author: elkrieger
8
8
ai-usage: ai-assisted
9
9
---
@@ -58,7 +58,7 @@ Depending on your deployment type, follow the relevant instructions to install t
58
58
59
59
- Helm version 3.8 or later (the available version supports OCI)
60
60
61
-
- Azure CLI must be [installed](/cli/azure/install-azure-cli?view=azure-cli-latest) and [logged in](/cli/azure/reference-index?view=azure-cli-latest) to an account with resource group owner role for the target cluster.
61
+
- Azure CLI must be [installed](/cli/azure/install-azure-cli?view=azure-cli-latest&preserve-view=true) and [logged in](/cli/azure/reference-index?view=azure-cli-latest&preserve-view=true) to an account with resource group owner role for the target cluster.
62
62
63
63
- Azure resource ID for the target cluster
64
64
@@ -81,7 +81,7 @@ Depending on your deployment type, follow the relevant instructions to install t
81
81
82
82
Or, run the [delete_conflicting_policies.sh](https://github.com/microsoft/Microsoft-Defender-For-Containers/blob/main/scripts/delete_conflicting_policies.sh) script with the following command:
This command removes resource group and subscription level policies for setting up the generally available (GA) version of Defender for Containers. It can affect clusters other than the one you're configuring.
@@ -92,11 +92,11 @@ Use the [install_defender_sensor_aks.sh](https://github.com/microsoft/Microsoft-
Replace the placeholder text `<CLUSTER_AZURE_RESOURCE_ID>`, `<RELEASE_TRAIN>`, and `<VERSION>` with your own values.
99
+
Replace the placeholder text `<CLUSTER_AZURE_RESOURCE_ID>`, `<RELEASE_TRAIN>`, `<NAMESPACE>`, and `<VERSION>` with your own values:
100
100
101
101
- Replace `<VERSION>` with:
102
102
- `latest` for the most recent version.
@@ -106,6 +106,11 @@ Replace the placeholder text `<CLUSTER_AZURE_RESOURCE_ID>`, `<RELEASE_TRAIN>`, a
106
106
- `stable` (default).
107
107
- `public` for the preview version.
108
108
109
+
- Replace `<NAMESPACE>` with `kube-system` if you are deploying to AKS Automatic.
110
+
111
+
> [!NOTE]
112
+
> Don’t provide this parameter for standard AKS deployments. If not specified, the default namespace is `mdc`.
113
+
109
114
- Use the `--antimalware` flag to enable antimalware scanning.
110
115
111
116
> [!NOTE]
@@ -117,7 +122,7 @@ Replace the placeholder text `<CLUSTER_AZURE_RESOURCE_ID>`, `<RELEASE_TRAIN>`, a
117
122
118
123
- Helm version 3.8 or later (the available version supports OCI)
119
124
120
-
- Azure CLI must be [installed](/cli/azure/install-azure-cli?view=azure-cli-latest) and [logged in](/cli/azure/reference-index?view=azure-cli-latest) to an account with resource group owner role for the security connector.
125
+
- Azure CLI must be [installed](/cli/azure/install-azure-cli?view=azure-cli-latest&preserve-view=true) and [logged in](/cli/azure/reference-index?view=azure-cli-latest&preserve-view=true) to an account with resource group owner role for the security connector.
121
126
122
127
- Ensure the cluster account is connected to Microsoft Defender for Cloud. Learn how to [connect your AWS account](quickstart-onboard-aws.md) or [connect your GCP project](quickstart-onboard-gcp.md) to your Defender for Cloud.
123
128
@@ -140,7 +145,7 @@ Replace the placeholder text `<CLUSTER_AZURE_RESOURCE_ID>`, `<RELEASE_TRAIN>`, a
140
145
141
146
1. Set the `kubeconfig` context to the target cluster by using the following command:
title: Gated deployment for Infrastructure as Code
3
+
description: Learn how to deploy gated deployment infrastructure as code for managed cluster API.
4
+
#customer intent: As a Kubernetes administrator, I want to deploy gated deployment infrastructure as code so that I can automate the setup and ensure consistent configuration across environments.
5
+
author: Elazark
6
+
ms.author: elkrieger
7
+
ms.date: 02/16/2026
8
+
ms.topic: how-to
9
+
---
10
+
11
+
# Gated deployment for Infrastructure as Code
12
+
13
+
Microsoft Defender for Cloud's gated deployment agent is a Kubernetes admission controller that enforces container image security policies at deployment time. Gated deployment acts as a gatekeeper for container images for known security problems at deployment time and decides whether they're allowed to run.
14
+
15
+
The gated deployment agent requires read access to all of your Azure Container Registries (ACRs) associated with the cluster. These registries store the container images alongside the vulnerability assessment artifacts generated by Defender for Containers. To enable this access, configure a Managed Service Identity (MSI) with the required ACR read permissions and assign it to the agent.
16
+
17
+
## Prerequisites
18
+
19
+
- An Azure subscription with Microsoft Defender for Cloud enabled.
20
+
- You must [enable gated deployment in Defender for Containers](enablement-guide-runtime-gated.md) with the defender sensor and registry access extensions turned on.
21
+
- You must enable on your Azure Kubernetes Service (AKS) cluster:
> Security gating only needs to be installed once. The first time you enable the security gating toggle, it installs security gating.
27
+
> After that, security gating is already installed. When the installation runs again, the system detects this and does nothing.
28
+
> If you try to install it again through the API, it fails because security gating already exists.
29
+
>
30
+
> :::image type="content" source="media/gated-deployment-infrastructure-as-code/security-gating-on.png" alt-text="Screenshot that shows security gating is turned to on." lightbox="media/gated-deployment-infrastructure-as-code/security-gating-on.png":::
31
+
32
+
## Deploy the gated agent
33
+
34
+
1.[Create a Managed Service Identity (MSI) that the gated deployment agent uses](/entra/identity/managed-identities-azure-resources/manage-user-assigned-managed-identities-azure-portal).
35
+
36
+
1.[Assign the AcrPull role (or equivalent read role)](/azure/container-registry/container-registry-rbac-built-in-roles-overview?tabs=registries-configured-with-rbac-registry-abac-repository-permissions) to the MSI on all ACRs the cluster uses.
37
+
38
+
1.[Add a Federated Identity Credential (FIC) to the MSI](/graph/api/resources/federatedidentitycredentials-overview?view=graph-rest-1.0) that allows the gated deployment agent to authenticate by using AKS Workload Identity, with the following FIC parameters:
39
+
40
+
-**Issuer**: The AKS OIDC issuer URL
41
+
-**Subject**: The service account used by the gated deployment agent `system:serviceaccount:kube-system:defender-admission-controller-serviceaccount`.
42
+
-**Audience**: api://AzureADTokenExchange
43
+
44
+
1. Under the [securityGating section of the managed cluster API configuration](https://learn.microsoft.com/azure/templates/microsoft.containerservice/managedclusters?pivots=deployment-language-arm-template#resource-format-1), set the [MSI’s objectId in the identities parameter](https://learn.microsoft.com/azure/templates/microsoft.containerservice/managedclusters?pivots=deployment-language-arm-template#managedclustersecurityprofiledefendersecuritygating-1) under the security gating section of the managed cluster API configuration.
45
+
46
+
:::image type="content" source="media/gated-deployment-infrastructure-as-code/identities.png" alt-text="Screenshot that shows the section of the securityGating section of the managed cluster API configuration, where the code is located." lightbox="media/gated-deployment-infrastructure-as-code/identities.png":::
47
+
48
+
This ensures the gated deployment agent can use the MSI at runtime.
49
+
50
+
## Next step
51
+
52
+
> [!div class="nextstep"]
53
+
> [Troubleshoot gated deployment in Kubernetes](troubleshooting-runtime-gated.md)
0 commit comments