-
Notifications
You must be signed in to change notification settings - Fork 204
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to create 2 Gateway Subnet reference in virtualnetworkgateway #4482
Comments
If you use Fortunately, you can give them different names in the cluster, while still having them called Try this: apiVersion: network.azure.com/v1api20201101
kind: VirtualNetworksSubnet
metadata:
name: gatewaysubnet-vnet1
namespace: sandbox
spec:
addressPrefix: 10.x.x.x/27
owner:
name: vnet1
azureName: GatewaySubnet
---
apiVersion: network.azure.com/v1api20201101
kind: VirtualNetworksSubnet
metadata:
name: gatewaysubnet-vnet2
namespace: sandbox
spec:
addressPrefix: 10.x.x.x/27
owner:
name: vnet2
azureName: GatewaySubnet I've given each subnet a unique name within the cluster, but they both have Then you can create your gateway for vnet1 with apiVersion: network.azure.com/v1api20240301
kind: VirtualNetworkGateway
metadata:
name: gw-test
namespace: sandbox
spec:
location: westus3
gatewayType: ExpressRoute
ipConfigurations:
- name: default
subnet:
reference:
group: network.azure.com
kind: VirtualNetworksSubnet
name: gatewaysubnet-vnet1
owner:
name: rg-networking and similarly for the other gateway: apiVersion: network.azure.com/v1api20240301
kind: VirtualNetworkGateway
metadata:
name: gw-test
namespace: sandbox
spec:
location: westus3
gatewayType: ExpressRoute
ipConfigurations:
- name: default
subnet:
reference:
group: network.azure.com
kind: VirtualNetworksSubnet
name: gatewaysubnet-vnet2
owner:
name: rg-networking Note: I've hand modified these yaml fragments without testing, check for typos. Let us know how you get on. |
Make sense. Thanks for clarifying this. Closing this issue. |
Describe the bug
When attempting to create multiple Virtual Network Gateways in the same subscription/resource group (Same namespace), we encounter issues with naming constraints on the GatewaySubnet. The Virtual Network Gateway can only be created in a subnet named GatewaySubnet, which leads to conflicts when trying to set up gateways for multiple VNets within the same resource group.
# How to reference vnet1 gateway ??
# How to reference vnet2 gateway ??
To Reproduce
Problem
Issue 1: It's not possible to create two subnets with the same name (GatewaySubnet) within the same subscription/resource group(Same namespace), even though the subnets are in different VNets.
Issue 2: It’s unclear how to create Virtual Network Gateways for multiple VNets within the same resource group(Same namespace) when both require a subnet named GatewaySubnet.
Expected behavior
It should be possible to create Virtual Network Gateways for multiple VNets, even if they are in the same subscription/resource group, by allowing each VNet to have a GatewaySubnet without conflict.
The text was updated successfully, but these errors were encountered: