Kubernetes always gives 503 Service Temporarily Unavailable with multiple TLS Ingress
Solution 1:
It was caused by the Ingress config referencing the incorrect services name. After updating the Ingress reference to the service I no longer get a 503.
Solution 2:
You can get a 503
error from nginx when basic-auth
is enable in the Ingress and the annotation nginx.ingress.kubernetes.io/auth-secret
is referencing a non-existing secret.
Either adding the missing secret or removing all basic-auth
annotations from the Ingress can resolve this situation.
Solution 3:
In my case it was caused by using the wrong servicePort (another port than the one defined in the service).
Solution 4:
Usually in the ingress YAML file don't write the right service name (- backend: serviceName:) So, be careful when writing YAML files.
Like:
service.yml:
apiVersion: v1
kind: Service
metadata:
name: my-service-name
ingress.yml:
spec:
tls:
- hosts:
- my-domanin-name.com
secretName: ingress-tls
rules:
- host: my-domanin-name.com
http:
paths:
- backend:
serviceName: MY-SERVICE-NAME