Add Public Ip to Azure Scale Set VM

Solution 1:

You can't assign an existing public IP directly to a scale set VM, that's not how scale sets work. VM Scale Sets are designed to create multiple identical copies of a VM, and allow you to scale the number of VM's up or down as required. Given this, assigning an existing IP to a VM doesn't really fit that design. There are however solutions if you need public IP's with you scale set:

  1. You can assign your existing public IP to an Azure Load Balancer and have that balance traffic across all the VM's in your scale set (regardless of how many there are)
  2. You can assign a public IP to each VM in the scale set, but you need to have Azure do this for you. You can see how to do this here

All of that said, if you only need a single VM, then you probably want to look at using a VM rather than VMSS.