In my current azure platform I have created vm scale set using az cli command. Then by default it created a load balancer and public ip and got associated with it. Now I want to delete this public ip, because I don't have any need with this. I am trying to delete this , but getting error that this IP is associated with vm, I am trying to disassociate it, but not able to find that option. I have checked to delete from LB frontend IP configuration or backend pool, but couldn't do so. I need to get rid this without effecting my VM which is running. Could someone help me.
Let me know if more details are needed
I am expecting for an answer to delete the public IP without deleting the existing VM.
I tried below
Created virtual machine scale set and load balancer associated with public Ip:
Load balancer frontend Ip:
When I tried to delete the public IP of vmss, I got same error.
Note that, you cannot delete the public IP of vmss without deleting it from the load balancer. For that, you need to create new public IP in load balancer and then delete the previous IP that is associated with vmss.
In my case, created one new public Ip inside load balancer you must have Ip for load balancer even its not necessary for vmss :
Now, I can delete the public Ip of vmss:
Once refresh the vmss public Ip is deleted successfully: