Created
December 15, 2022 21:49
-
-
Save besteban1989/0617e35d7517f15969716ed3ef502968 to your computer and use it in GitHub Desktop.
Get AKS Outbound IP
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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