-1

I'm currently using the standard blue/green deployment setup here:

enter image description here

I need to use the same public IP for both Load Balancers.

Currently it appears that a load balancer (LB) can only use a 'not used' frontend IP configuration. So, I could switch the load balancer off the public IP onto a temporary one then assign the public IP to the other LB. Not such a slick blue/green deployment though.

Is there a way to overcome this issue so I can switch the traffic manager over and the public IP remains the same?

Alex Stephens
  • 3,017
  • 1
  • 36
  • 41
  • Big thanks the person who downvoted the question. Not even a comment left as to why. – Alex Stephens Feb 18 '22 at 13:20
  • maybe you should add a bit more detail on what you are actually trying to achieve? And what traffic are we talking about? HTTP? – silent Feb 18 '22 at 15:22
  • Hmmm, i would have thought this was pretty clear: Is there a way to overcome this issue so I can switch the traffic manager over and the public IP remains the same? – Alex Stephens Feb 18 '22 at 15:31
  • why dont you just keep using the same LB and just have two different backend pools (blue and green) and then switch over the pool in your LB rule? – silent Feb 18 '22 at 15:35

1 Answers1

0

You can try this:

https://learn.microsoft.com/en-us/rest/api/load-balancer/load-balancers/swap-public-ip-addresses

{
  "frontendIPConfigurations": [
    {
      "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb1/frontendIPConfigurations/lbfe1",
      "properties": {
        "publicIPAddress": {
          "id": "/subscriptions/subid/resourceGroups/rg2/providers/Microsoft.Network/publicIPAddresses/pip2"
        }
      }
    },
    {
      "id": "/subscriptions/subid/resourceGroups/rg2/providers/Microsoft.Network/loadBalancers/lb2/frontendIPConfigurations/lbfe2",
      "properties": {
        "publicIPAddress": {
          "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/pip1"
        }
      }
    }
  ]
}

I would probably still prefer a blue/green solution that does not depend on something like this, but it can be a start.

Alex AIT
  • 17,361
  • 3
  • 36
  • 73