Skip to content

Instantly share code, notes, and snippets.

@besteban1989
Created December 15, 2022 21:49
Show Gist options
  • Save besteban1989/0617e35d7517f15969716ed3ef502968 to your computer and use it in GitHub Desktop.
Save besteban1989/0617e35d7517f15969716ed3ef502968 to your computer and use it in GitHub Desktop.
Get AKS Outbound IP
RG=<resource-group-name>
AKSNAME=<aks-name>
# Get networking load balancer SKU
az aks show -g $RG -n $AKSNAME --query networkProfile.loadBalancerSku
# Get outbound type
az aks show -g $RG -n $AKSNAME --query networkProfile.outboundType
# Get load balancer IP for outbound traffic (useful to whitelist AKS requests in 3rd party systems)
PUBLIC_IP_RESOURCE_ID=`az aks show -g $RG -n $AKSNAME --query "networkProfile.loadBalancerProfile.effectiveOutboundIPs[].id" -o tsv`
# Get IP address
az network public-ip show --ids $PUBLIC_IP_RESOURCE_ID --query ipAddress -o tsv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment