Reserved IP for Azure Cloud Service doesn't persist

痞子三分冷 提交于 2019-12-05 10:01:41

This worked for me:

Create your reserved IPs

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

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

Deploy to the production slot with the following network configuration in your .cscfg file:

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

Deploy to the staging slot with the following configuration:

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

Continue using your normal workflow - deploy to staging, then swap to production. The IP addresses should stay associated with their slots (ip1 in production and ip2 in staging).

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!