[Supported in Kublr 1.20.0 and later]

Two Azure clusters may be connected on the network level using Azure Virtual Network peering if their vnet address spaces do not intersect.


This article provides an example of defining vnet peering in the cluster specification.


Cluster 1:

spec:
  locations:
    - azure:
        armTemplateExtras:
          resources:
            - apiVersion: '2019-11-01'
              location: '[parameters(''region'')]'
              name: '[concat(variables(''k8sVirtualNetwork''), ''/peering1'')]'
              type: Microsoft.Network/virtualNetworks/virtualNetworkPeerings
              properties:
                allowForwardedTraffic: true
                allowVirtualNetworkAccess: true
                remoteVirtualNetwork:
                  id: '/subscriptions/abcd0123-4566-89ab-cdef-0123456789ab/resourceGroups/cluster2/providers/Microsoft.Network/virtualNetworks/cluster2-VirtualNetwork'

Cluster 2:

spec:
  locations:
    - azure:
        armTemplateExtras:
          resources:
            - apiVersion: '2019-11-01'
              location: '[parameters(''region'')]'
              name: '[concat(variables(''k8sVirtualNetwork''), ''/peering1'')]'
              type: Microsoft.Network/virtualNetworks/virtualNetworkPeerings
              properties:
                allowForwardedTraffic: true
                allowVirtualNetworkAccess: true
                remoteVirtualNetwork:
                  id: '/subscriptions/abcd0123-4566-89ab-cdef-0123456789ab/resourceGroups/cluster1/providers/Microsoft.Network/virtualNetworks/cluster1-VirtualNetwork'