Reserved IP address for Azure Cloud Service not saved

I'm struggling to deal with Reserved IPs in the Azure Cloud Service.

I have a cloud service with a deployment of Staging and Productions, and I need at least a Production deployment to have a stable IP address. I set 2 reserved IP addresses as described here , then assigned my reserved IP addresses to deploy Production and Staging with Power Shell:

Set-AzureReservedIPAssociation -ReservedIPName MyReservedIP1 -ServiceName mycloudservice -Slot "Production"
Set-AzureReservedIPAssociation -ReservedIPName MyReservedIP2 -ServiceName mycloudservice -Slot "Staging"

All is well and good that the reserved IP addresses are assigned to the corresponding instances, and swapping supports the correct addresses. The problem is that if I delete one of the deployments and redeploy the IP address is not supported.

I also tried assigning a reserved IP address to the cloud service without specifying “Slot”, and it set a penalty, but it does not seem to be used in Production or Staging deployments.

Set-AzureReservedIPAssociation -ReservedIPName MyReservedIP -ServiceName mycloudservice

My usual workflow was to deploy to Staging, then swap with Production, as soon as I checked, everything worked fine. With this scenario, how can I ensure that a production deployment always gets a reserved IP address when I share using Staging, even if the current Production instance is not deployed?

The Azure documentation says, “The IP address for the cloud service will be the same even if the resources are disabled or canceled,” so my previous assigned production IP address will not be supported even if I delete the Production instance and then change it to Staging

+4
1

:

IP-

New-AzureReservedIP -ReservedIPName "ip1" -Location "East US 2"

New-AzureReservedIP -ReservedIPName "ip2" -Location "East US 2"

.cscfg:

<NetworkConfiguration>
    <AddressAssignments>
      <ReservedIPs>
        <ReservedIP name="ip1" />
      </ReservedIPs>
    </AddressAssignments>
  </NetworkConfiguration>

:

<NetworkConfiguration>
    <AddressAssignments>
      <ReservedIPs>
        <ReservedIP name="ip2" />
      </ReservedIPs>
    </AddressAssignments>
  </NetworkConfiguration>

- , . IP- (ip1 ip2 ).

+2

Source: https://habr.com/ru/post/1610071/


All Articles