[Supported in Kublr 1.20.0 and later]
Tags: azure, network
By default Kublr creates all Azure resources for an Azure Kubernetes cluster in a single virtual network and a single subnet in that network.
The virtual network address space CIDRs will be populated from spec.locations[*].azure.virtualNetworkSubnetCidrBlock cluster specification property. If the value is not specified, Kublr will automatically populate the property with the value 172.16.0.0/16 .
The only subnet created by Kublr in this virtual network will use the same address space by default.
The virtual network and subnet properties can be customized via the cluster specification spec.location[*].azure.armTemplateExtras.* properties as shown in the following example:
spec: locations: - name: default azure: virtualNetworkSubnetCidrBlock: 172.20.0.0/16 armTemplateExtras: # everything specified in this section will be directly merged into # the virtual network resource definition created by Kublr virtualNetwork: properties: addressSpace: addressPrefixes: # this address prefix will be used in addition to 172.20.0.0/16 # defined above in virtualNetworkSubnetCidrBlock property - 172.21.0.0/16 subnets: # a custom subnet will be included in addition to the standard subnet # created by Kublr - name: "my-custom-subnet" properties: addressPrefix: 172.21.3.0/24 # this example custom subnet uses the security group and # the route table created by Kublr # but it can also use other security group and/or route table networkSecurityGroup: id: "[resourceId('Microsoft.Network/networkSecurityGroups', variables('k8sSecurityGroup'))]" routeTable: id: "[resourceId('Microsoft.Network/routeTables', variables('k8sRouteTable'))]" # everything specified in this section will be directly merged into # the subnet resource definition created by Kublr subnet: properties: addressPrefix: 172.20.32.0/20
Please refer to Azure documentation for more information about virtual network and subnet customizable properties: