ingress-nginx

7 commands

7 shown

Dump effective nginx config Render the full live nginx.conf with all server blocks the controller actually generated kubectl exec deploy/ingress-nginx-controller -n ingress-nginx -- nginx -T | less #ingress-nginx#debug#troubleshooting#k8s Controller status metrics Live active connections, reading/writing/waiting counters from the stub_status endpoint kubectl exec deploy/ingress-nginx-controller -n ingress-nginx -- curl -s localhost:10254/nginx_status #ingress-nginx#monitoring#performance#observability Grep upstream timeouts in logs Hunt backend timeouts and client-aborted requests; note: 499 means client closed before upstream replied kubectl logs -n ingress-nginx deploy/ingress-nginx-controller --tail=2000 | grep -iE 'upstream timed out|504|499' #ingress-nginx#troubleshooting#network#debug Canary traffic split annotation Route 20% of traffic to a canary ingress; needs a primary ingress on the same host/path kubectl annotate ingress <name> -n <ns> nginx.ingress.kubernetes.io/canary=true nginx.ingress.kubernetes.io/canary-weight="20" #ingress-nginx#ci#gitops#network Rate limit and body size annotations Cap requests-per-second per client IP and raise upload limit; rps burst defaults to 5x kubectl annotate ingress <name> -n <ns> nginx.ingress.kubernetes.io/limit-rps="10" nginx.ingress.kubernetes.io/proxy-body-size="50m" #ingress-nginx#security#performance#network Rewrite-target with capture group Strip a path prefix via regex capture; path must use (/|$)(.*) for $2 to resolve kubectl annotate ingress <name> -n <ns> nginx.ingress.kubernetes.io/rewrite-target='/$2' nginx.ingress.kubernetes.io/use-regex='true' #ingress-nginx#network#troubleshooting List ingressclasses and default Show controllers and which IngressClass is default; only one should be marked default kubectl get ingressclass -o custom-columns='NAME:.metadata.name,DEFAULT:.metadata.annotations.ingressclass\.kubernetes\.io/is-default-class' #ingress-nginx#k8s#troubleshooting
no commands match