K8s Nginx Ingress Controller
Fleetingbasic Authentication
- External reference: https://kubernetes.github.io/ingress-nginx/examples/auth/basic/
htpasswd -c auth foo kubectl create secret generic basic-auth –from-file=auth kubectl get secret basic-auth -o yaml
metadata: name: ingress-with-auth annotations:
nginx.ingress.kubernetes.io/auth-type: basic
nginx.ingress.kubernetes.io/auth-secret: basic-auth
nginx.ingress.kubernetes.io/auth-realm: 'Authentication Required - foo'
spec:
— https://kubernetes.github.io/ingress-nginx/examples/auth/basic/
how it deals with HSTS
hsts hsts-include-subdomains hsts-max-age type bool bool string default “true” “true” “31536000”
NGINX ingress controller timing out request after 60s
-
External reference: https://stackoverflow.com/questions/54366082/nginx-ingress-controller-timing-out-request-after-60s
kind: Ingress metadata: name: aks-ingress annotations: kubernetes.io/ingress.class: nginx certmanager.k8s.io/cluster-issuer: letsencrypt nginx.ingress.kubernetes.io/rewrite-target: / […] nginx.ingress.kubernetes.io/proxy-connect-timeout: “180” nginx.ingress.kubernetes.io/proxy-read-timeout: “180” nginx.ingress.kubernetes.io/proxy-send-timeout: “180”
spec: […] — https://stackoverflow.com/questions/54366082/nginx-ingress-controller-timing-out-request-after-60s
I am setting those parameters in my ingress resource deffinition:
kind: Ingress metadata: name: my-foobar-ingress namespace: foobar annotations: nginx.org/proxy-send-timeout: “10s” nginx.org/proxy-connect-timeout: “10s” nginx.org/proxy-read-timeout: “10s”
[…]
Are you sure these are the correct annotations? Have a look at ingress/annotations/proxy/main.go, where the following constants are defined:
connect = “ingress.kubernetes.io/proxy-connect-timeout” send = “ingress.kubernetes.io/proxy-send-timeout” read = “ingress.kubernetes.io/proxy-read-timeout”
503 in Kubernetes NGINX Ingress
-
External reference: https://serverfault.com/questions/1068310/how-to-solve-error-503-in-kubernetes-nginx-ingress kubernetes nginx
encountered the 503 error as nginx was sending a request to a port that was not hosting the dashboard (433 -> 443).
— https://serverfault.com/questions/1068310/how-to-solve-error-503-in-kubernetes-nginx-ingress