Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
After deploying Defender for Containers on your EKS clusters, configure various settings to customize the security coverage to meet your needs. This article also explains how to add or remove components after initial deployment.
Configuration areas
Jump to the configuration you need:
Component management
Core settings
Tip
Most organizations start with configuring plan components. If you need to add or remove components after initial deployment, see Add or remove components.
Add or remove components
After initial deployment, you might need to add components that you skipped or remove unnecessary ones.
Check component deployment status
Go to Inventory and filter by AWS resources.
Check each EKS cluster for:
- Arc connectivity status
- Defender extension status
- Policy extension status
Add missing components
Connect EKS clusters to Azure Arc
If clusters aren't connected to Arc:
Go to Microsoft Defender for Cloud > Recommendations.
Look for recommendations about EKS clusters that need Arc connection.
Follow the recommendation to connect your clusters.
Use the provided scripts to connect each cluster to Azure Arc.
Or use CLI:
# Connect cluster to Arc
az connectedk8s connect \
--name $CLUSTER_NAME \
--resource-group $RESOURCE_GROUP \
--location $REGION
Deploy Defender sensor to existing clusters
After connecting your EKS clusters to Azure Arc:
Go to Microsoft Defender for Cloud > Recommendations.
Look for recommendations about installing the Defender extension on Arc-enabled clusters.
Select the recommendation and follow the remediation steps.
Or deploy using CLI:
# Install Defender extension
az k8s-extension create \
--name microsoft-defender \
--extension-type microsoft.azuredefender.kubernetes \
--cluster-type connectedClusters \
--cluster-name $CLUSTER_NAME \
--resource-group $RESOURCE_GROUP
Add Azure Policy extension
To add policy assessment to existing deployments:
# Install Azure Policy extension
az k8s-extension create \
--name azurepolicy \
--extension-type Microsoft.PolicyInsights \
--cluster-type connectedClusters \
--cluster-name $CLUSTER_NAME \
--resource-group $RESOURCE_GROUP
Remove specific components
To remove components but keep others:
Go to your Arc-enabled Kubernetes cluster.
Under Settings, select Extensions.
Select the extension to remove (Microsoft Defender or Azure Policy).
Select Uninstall.
Or use CLI:
# Remove Defender sensor only
az k8s-extension delete \
--name microsoft-defender \
--cluster-type connectedClusters \
--cluster-name $CLUSTER_NAME \
--resource-group $RESOURCE_GROUP
# Remove Policy extension only
az k8s-extension delete \
--name azurepolicy \
--cluster-type connectedClusters \
--cluster-name $CLUSTER_NAME \
--resource-group $RESOURCE_GROUP
Deploy components selectively
Deploy to specific clusters only
To deploy the sensor only to selected EKS clusters:
Connect specific clusters to Azure Arc (not all clusters).
Go to Recommendations and find "Arc-enabled Kubernetes clusters should have Defender extension installed".
Select only the clusters where you want the sensor.
Follow the remediation steps for the selected clusters.
Configure plan components
You can enable or disable specific Defender for Containers components:
Go to Microsoft Defender for Cloud > Environment settings.
Select your AWS connector.
Select Settings for the Containers plan.
Turn components on or off:
- Defender sensor
- Azure Policy for Kubernetes
- K8s API access
- Registry access
Select Continue and Save.
Troubleshooting component issues
Fix Arc connectivity issues
For clusters that show as disconnected:
Rerun the Arc connection script.
Verify network connectivity from the cluster to Azure.
Check Arc agent logs:
kubectl logs -n azure-arc -l app.kubernetes.io/component=cluster-agent
Fix sensor deployment issues
For clusters missing the Defender sensor:
Verify Arc connection is healthy.
Check for conflicting policies or admission controllers.
Deploy manually if needed: Use remediation from the recommendation.
Sensor pods not starting
# Check pod status
kubectl describe pods -n kube-system -l app=microsoft-defender
# Common issues:
# - Image pull errors: Check network connectivity
# - Permission denied: Verify RBAC settings
# - Resource constraints: Check node resources
Best practices
- Regular reviews: Review configuration monthly.
- Test changes: Test configuration changes in non-production environments first.
- Document settings: Maintain documentation of custom configurations.
- Monitor impact: Watch for performance impact after changes.
- Back up settings: Export configurations before major changes.
- Track exclusions: Document why certain clusters or components are excluded.