Select Language:
If you’re trying to secure your Azure Key Vault used for encrypting secrets in AKS, it’s important to understand how the control plane interacts with Key Vault and how to set up network restrictions correctly.
The key point is that the Key Management Service (KMS) plugin operates as part of the Kubernetes control plane, specifically through the API server. This means all requests to encrypt or decrypt secrets come from the control plane managed by Azure, not directly from your worker nodes. Placing the Key Vault in the same virtual network (VNet) as your worker nodes doesn’t automatically secure the connection because the control plane itself is outside of your VNet unless you explicitly connect it.
In a typical AKS setup without VNet integration, the control plane runs in Azure’s managed network. Its outbound IP addresses are not fixed or documented, and they are not exposed to you. When the API server calls Key Vault, it does so from these managed IPs over the public internet. This setup means you cannot whitelist specific IP addresses or networks in your Key Vault access policies because the IPs are unpredictable and not under your control.
However, enabling VNet integration for the API server changes this. When you activate this feature, Azure places the control plane inside a subnet in your VNet. Though Azure still manages the control plane, it now has a private IP from your VNet. Requests from the API server to Key Vault then come from this known, private IP address, which allows you to configure firewall rules. You can now whitelist specific VNets or subnets in your Key Vault settings, making your setup more secure.
Once VNet integration is active, you can also disable public access to Key Vault and instead use Private Endpoints or specific VNet rules. In this setup, traffic from the API server to Key Vault travels over the private network, not the public internet — a much safer arrangement.
It’s worth noting that the recent improvements to the KMS key management experience mainly focus on better key lifecycle management and usability. The fundamental networking flow remains the same: API server calls Key Vault, so the critical factor is ensuring the API server has a designated, predictable network identity. Without VNet integration, the control plane uses ephemeral IPs, forcing you to allow public access and making network restrictions challenging.
To secure your Key Vault for encrypting secrets in AKS effectively, ensure you enable VNet integration for your API server. This way, you can confidently restrict access to your Key Vault, knowing exactly which network resources can reach it and through what paths.
If this information helps solve your issue, please remember to “Accept Answer.” Your feedback helps others in the community who face similar challenges.




