HIGH
Source
Trivy
ID
AVD-AZU-0043

Ensure AKS cluster has Network Policy configured

The Kubernetes object type NetworkPolicy should be defined to have opportunity allow or block traffic to pods, as in a Kubernetes cluster configured with default settings, all pods can discover and communicate with each other without any restrictions.

Impact

Follow the appropriate remediation steps below to resolve the issue.

Configure a network policy

1
2
3
4
5
resource "azurerm_kubernetes_cluster" "good_example" {
  network_profile {
    network_policy = "calico"
  }
}