A couple of weeks ago, I set up a Load Balancer on an AKS Cluster. I am using the following script to point a .cloudapp.azure.com domain to the Load Balancer:
#!/bin/bash
# Public IP address of your ingress controller
IP="<MY_IP>"
# Name to associate with public IP address
DNSNAME="<MY_DNS_NAME>"
# Get the resource-id of the public ip
PUBLICIPID=$(az network public-ip list --query "[?ipAddress!=null]|[?contains(ipAddress, '$IP')].[id]" --output tsv)
# Update public ip address with DNS name
az network public-ip update --ids $PUBLICIPID --dns-name $DNSNAME
The problem is that the FQDN keeps disappearing, approximately every 24 hours. Every day I have to run the script again, and then everything is alright again. Why could this be happening?
I have assigned a static IP to my Load Balancer, which also has not restarted. I used the following command to assign a static ip:
az network public-ip create --resource-group <MY_RG> --name <IP_NAME> --sku Standard --allocation-method static --query publicIp.ipAddress -o tsv
and used this IP in my charts for the nginx controller. The IP keeps pointing to the right place but the domain name keeps disappearing.
Thank you in advance for any advice, greatly appreciated.