Join 1M+ other developers and:
- Get help and share knowledge in Q&A
- Subscribe to topics of interest
- Get courses & tools that help you grow as a developer or small business owner
How to specify multiple hostnames in ingress-nginx @do-loadbalancer-hostname
I am following https://www.digitalocean.com/community/tutorials/how-to-set-up-an-nginx-ingress-with-cert-manager-on-digitalocean-kubernetes#step-5-%E2%80%94-enabling-pod-communication-through-the-load-balancer-(optional) to setup TLS in my cluster.
I have 2 host names web.myapp.com and api.myapp.com I want to have both of these subdomains to be added in my nginx annotation.
I cant give comma seperated as it is throughing below warnings:
Warning SyncLoadBalancerFailed 4s (x2 over 9s) service-controller Error syncing load balancer: failed to update load balancer status: Service "ingress-nginx-controller" is invalid: status.loadBalancer.ingress.hostname: Invalid value: "web.myapp.co.za,api.myapp.co.za": a DNS-1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*')
Thanks in advance
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.×