Description
For a public AKS API server, use apiServerAccessProfile.authorizedIPRanges to limit connections to approved public IP ranges. Manage private connectivity separately for a private cluster.
Potential impact
Broad ranges expose the management API to more connection attempts. Omitting a required egress address can interrupt administration or deployment.
Remediation
Identify the public source addresses used by management clients, automation and the cluster. After applying the list, use the same authorized identity to confirm that a management request succeeds from an approved network and the connection is blocked from an unapproved one. Retain authentication and RBAC.
Examples
The examples use historical API versions and Kubernetes 1.15.7. Supply supported versions and the remaining cluster configuration. Replace the documentation CIDRs with your actual management and egress ranges.
Before
resource aksCluster 'Microsoft.ContainerService/managedClusters@2017-08-31' = {
name: 'aksCluster'
location: resourceGroup().location
properties: {
dnsPrefix: 'team-aks'
kubernetesVersion: '1.15.7'
}
}
After
resource aksCluster 'Microsoft.ContainerService/managedClusters@2020-02-01' = {
name: 'aksCluster'
location: resourceGroup().location
properties: {
dnsPrefix: 'team-aks'
kubernetesVersion: '1.15.7'
apiServerAccessProfile: {
authorizedIPRanges: [
'203.0.113.10/32'
'198.51.100.0/24'
]
}
}
}