I'm deploying a nginx-ingress helm chart on AKS to...
# kubernetes
j
I'm deploying a nginx-ingress helm chart on AKS to provision a private loadbalancer.
Copy code
new k8s.helm.v3.Chart(name, {
    chart: "nginx-ingress",
    version: "1.36.3",
    fetchOpts: {
        repo: "<https://kubernetes-charts.storage.googleapis.com>",
    },
    values: {
        controller: {
            service: {
                loadBalancerIP: props.backendIpAddress,
                annotations: {
                    "<http://service.beta.kubernetes.io/azure-load-balancer-internal|service.beta.kubernetes.io/azure-load-balancer-internal>": "true"
                }
            },
        }
    },
})
In my case the cluster gets recreated and the Kubernetes provider tries to deploy the helm chart on the new cluster with the same IP address. Because the IP address is still allocated by the old loadbalancer, it will fail. Do you got any ideas on how to delete the old service/loadbalancer before the new one gets created?