Search code examples
azureazure-devopsazure-virtual-networkazure-public-ip

Azure: Sharing Public IP Address between Resource Groups


I have an IP Address in one of my resource group(for e.g test-resource-group). I wish to use this IP Address in AKS Created Resource Group(for e.g MC_xxxx_resource-group). The IP allocation for a service in AKS leads to error stating "IP Address is not in resource-group MC_xxxx_resource-group.

I wanted to know, as to what is the easiest mechanism that I can have Public Address created in one resource group be shared with another resource group??


Solution

  • I was able to resolve the issue with the following solution:

    1. Go to the Resource Group which is created by k8s-cluster.
    2. Go the SETTINGS -> ACCESS CONTROL -> ROLES ASSIGNMENT.
    3. Check the System Created Contributor Role.
    4. Go to the Resource Group against which the Public IP Address is Created(for.e.g test-resource-group)
    5. Go the SETTINGS -> ACCESS CONTROL -> ROLES ASSIGNMENT -> ADD ROLE ASSIGNMENT
    6. If the ROLE from Point 2 is not listed, type the initials of it and it should be displayed.
    7. Select the role as NETWORKING CONTRIBUTOR for it.

    In the above fashion, you can use the Public IP Address created in some another resource group for your k8s cluster.

    Happy Coding :)