@Ghosh, Sanu , Thank you for your query. Unfortunately, at this time, creation of worker nodes in a virtual network other than the ARO cluster virtual network is not supported.
When you deploy Azure Red Hat on OpenShift 4, your entire cluster is contained within a virtual network. Within this virtual network, your master nodes and workers nodes each live in their own subnet.
If you try to add a machineset (only after assigning Azure Red Hat OpenShift
Application and your aro
application [which should be the same as name of the ARO node resource group], Network Contributor role to the scope /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/myVirtualNetwork/subnets/mySubnet
) with spec.providerSpec.vnet=myVirtualNetwork
and spec.providerSpec.subnet=mySubnet
the machine provisioning will still fail with the following error:
InvalidConfiguration: failed to reconcile machine "$mavhinename": network.InterfacesClient#CreateOrUpdate: Failure sending request: StatusCode=400 -- Original Error: Code="BackendIPConfigurationsDontUseSameVnet" Message="Not all Backend IP Configurations referenced by the Load Balancer /subscriptions/xxxx-xxxx-xxxx-xxxx/resourceGroups/aro-jf77fogg/providers/Microsoft.Network/loadBalancers/cluster-v9ckz use the same Virtual Network." Details=[]
However, it is possible to create a new machineset in a different subnet than your existing worker nodes in the ARO cluster virtual network.
- Please login to the Azure Red Hat Openshift console How-to
- Navigate to Compute>Machine Sets
- Choose an existing an worker machine set and from the context menu select the Edit Machine Set option.
- Copy the YAML manifest for the machine set and click on the Cancel button.
- Edit the following in the copied YAML:
- Remove the fields
spec.status
,metadata.uid
,metadata.generation
,metadata.creationTimestamp
,metadata.annotations.selfLink
,metadata.annotations.managedFields
- Modify the values of
spec.providerSpec.vnet
,spec.providerSpec.subnet
,metadata.name
to suit your needs.
- Remove the fields
- On the Azure Red Hat OpenShift console > Compute > Machine Set page click on
Create Machine Set
button - Paste the edited YAML manifest.
- Click on the Create button
This will Provision a new Machine in the desired subnet in the ARO cluster virtual network. After some time you should see a new node created.
You can Edit Machine Count from the context menu for your machine set on the Azure Red Hat Openshift console > Compute > Machine Set page
Please ensure to follow the guildelines detailed here for ARO networking.
For custom DNS in ARO please follow the instructions shared here.
Hope this helps!!!
Please "Accept as Answer" if it helped, so that it can help others in the community looking for help on similar topics.