Master Node IP range and Corporate Firewall Issues.
Hi,
We're trying to use AKS, but we're having issues with our corporate firewall on some networks allowing traffic to the Master nodes. For some reason, it seems to be showing an IP address in the kubectl/helm requests and those are being dropped. We have *.azmk8s.io whitelisted, but kubectl and helm seem to be resolving the IP then using the IP to reach out to the API server, and those IPs seem to change, so it's not supportable by our firewall team.
Any help with this would be wonderful, as the IP ranges we're seeing aren't for AKS but rather for all public IPs hosted by azure/microsoft in general, which could be a site hosted in Azure by a third party.
This is becoming a major issue for us and could push us away from AKS onto a different Kubernetes vendor.
Advanced Networking environment?
I have seen a customer attempt to white list only IP addresses required in an Outbound NSG recently and saw the following:
172.30.0.0/16 and 172.31.0.0/16 are required for AKS backplane traffic (including proxy).
(These are sort of eluded to in the AKS docs where they advise DO NOT use these ranges for your cluster here: https://docs.microsoft.com/en-us/azure/aks/configure-advanced-networking
172.29.64.0/18 was required since it was built as the separate AKS Services network.
169.254.0.0/16 is required for Azure DHCP and DNS
The customer put an NSG on the AKS Agent Node Subnet and put a Deny rule just above the 65000 AllowVnetOutbound rule and turned on NSG Logs to see what was attempted (that's how they found these address ranges).
If you have success you may also stumble into this. This address was also seen being blocked by the NSG and so thinking it was some OS (Ubuntu) related address, they added it as well as allowed. But we still are not certain what its for: 100.100.100.200/32 <-- let us know if you figure that out.
169.254 - DHCP/DNS for Azure SDN
Yes, we are using Advanced Networking, but that's not the issue here. Master Nodes in AKS share a common pool, and the API is exposed as DNS entries like: https://<cluster_name>-<rand_number>.hcp.eastus.azmk8s.io, which we see resolving to IPs like 40.xx.xx.15, or 52.xx.xx.xx, public IPs. 172.xx.xx.xx addresses are on 'private' subnets.
We need the range(s) for *.eastus.azmk8s.io or just *.azmk8s.io
OK, sorry I couldn't help. I was talking about an Azure VNet protecting its egress to public cloud. I guess I don't understand how a Corporate Firewall comes into play here (unless you are force tunneling everything from your VNet to Corporate?
Maybe someone else can help. I leave you with this though: https://www.microsoft.com/en-us/download/details.aspx?id=56519
That is kind of a one stop shop, a list if you will, of all Azure IP Address ranges. Service tags are fairly new and expanding all the time. Maybe that could help (it is also divided by Region.
I wish you well!
It's very likely that the Azure team has a waf in front of the managed k8s master nodes. A waf is a distributed firewall that runs at the edge (like a cdn) to protect against ddos attacks among other bad things on the internet. The distributed nature of the service leads to the fact there are many ip addresses behind that wildcard dns that you tried to whitelist in your firewall (and the list changes all the time). I have faced a similar issue with one of my customers and there is no direct solution here if you stick with an outbound connexion filtering mechanism that is at the TCP layer while you're hitting distributed internet services.
@AXington There isn't a managed IP range backing AKS specifically so we can't give you anything on that front. However, we are considering moving to a single static IP per cluster, which should solve for your case. If all goes well, that should be available in the first couple months of next year. We will update this feedback item when it's available:
https://feedback.azure.com/forums/914020-azure-kubernetes-service-aks/suggestions/35010421-secure-aks-api-from-public-internet
Is there any update on single static IP per cluster (master API/control plane) @seanmck?
hello @seanmck : any news about the static IP per cluster?