Azure Kubernetes (AKS) SDN connector
Azure SDN connectors support dynamic address groups based on Azure Kubernetes (AKS) filters.
To filter out the Kubernetes IP addresses, the following address filters have been introduced:
k8s_cluster |
Kubernetes cluster name. |
k8s_namespace |
Namespace of a Kubernetes service or pod. |
k8s_svcname |
Kubernetes service name. |
k8s_nodename |
Kubernetes node name. |
k8s_region |
Kubernetes node region. |
k8s_podname |
Kubernetes pod name. |
k8s_label.xxx |
Name of label of a Kubernetes resource (cluster/service/node/Pod). |
To enable an Azure SDN connector to fetch IP addresses from Azure Kubernetes:
- Configure the Azure SDN connector:
- Go to Security Fabric > External Connectors.
- Click Create New, and select Azure.
- Configure as shown substituting the region, tenant and client IDs, and client secret for your deployment. The update interval is in seconds.
- Create a dynamic firewall address for the configured K8S SDN connector:
- Go to Policy & Objects > Addresses.
- Click Create New, then select Address.
- Configure the address as shown, selecting the desired filter in the Filter dropdown list. In this example, the Azure SDN connector will automatically populate and update IP addresses only for instances that belong to the zhmKC cluster:
- Ensure that the K8S SDN connector resolves dynamic firewall IP addresses:
- Go to Policy & Objects > Addresses.
- Hover over the address created in step 2 to see a list of IP addresses for instances that belong to the zhmKC cluster as configured in step 2:
To configure an Azure Kubernetes SDN connector through the CLI:
- Configure an SDN connector for Kubernetes:
config system sdn-connector
edit "azure1"
set type azure
set tenant-id "942b80cd-1b14-42a1-8dcf-4b21dece61ba"
set client-id "14dbd5c5-307e-4ea4-8133-68738141feb1"
set client-secret xxxxx
set update-interval 30
next
end
- Create a dynamic firewall address for the SDN connector with a supported Kubernetes filter. In this example, the Azure SDN connector will automatically populate and update IP addresses only for instances that belong to the zhmKC cluster:
config firewall address
edit "az-k8s-cluster"
set type dynamic
set sdn "azure1"
set filter "K8S_Cluster=zhmKC"
next
end
-
Confirm that the Azure SDN connector resolves dynamic firewall IP addresses using the configured filter:
config firewall address
edit "az-k8s-cluster"
set type dynamic
set sdn "azure1"
set filter "K8S_Cluster=zhmKC"
config list
edit "10.240.0.4"
next
edit "10.240.0.5"
next
edit "10.244.0.10"
next
end
next
end