Debugging Kubernetes/GKE timeout issue while creating ingress with ingress-nginx

4/30/2020

Using ingress-nginx v0.30 in the GKE cluster has no issue creating the ingress using kubectl apply -f command. After upgrading to ingress-nginx v0.31.1, the following error has been shown:

Error from server (Timeout): error when creating "kubernetes/ingress.yaml": Timeout: request did not complete within requested timeout 30s

Questions:

  1. How to debug the timeout of this request?
    • There is no connection issue
    • same ingress file works on v0.30
    • Stackdriver shows no clue
  2. Any way to increase the timeout (eg: 30s to 60s)?

--- Update #1 - attach the ingress-nginx controller logs ---

-------------------------------------------------------------------------------
NGINX Ingress controller
  Release:       0.31.1
  Build:         git-b68839118
  Repository:    https://github.com/kubernetes/ingress-nginx
  nginx version: nginx/1.17.10

-------------------------------------------------------------------------------

I0430 10:43:55.316136       6 flags.go:204] Watching for Ingress class: nginx
W0430 10:43:55.316577       6 flags.go:249] SSL certificate chain completion is disabled (--enable-ssl-chain-completion=false)
W0430 10:43:55.316748       6 client_config.go:543] Neither --kubeconfig nor --master was specified.  Using the inClusterConfig.  This might not work.
I0430 10:43:55.316999       6 main.go:220] Creating API client for https://10.32.0.1:443
I0430 10:43:55.325457       6 main.go:264] Running in Kubernetes cluster version v1.15+ (v1.15.9-gke.24) - git (clean) commit 39e41a8d6b7221b901a95d3af358dea6994b4a40 - platform linux/amd64
I0430 10:43:55.623453       6 main.go:105] SSL fake certificate created /etc/ingress-controller/ssl/default-fake-certificate.pem
I0430 10:43:55.628959       6 ssl.go:528] loading tls certificate from certificate path /usr/local/certificates/cert and key path /usr/local/certificates/key
I0430 10:43:55.686051       6 nginx.go:263] Starting NGINX Ingress controller
I0430 10:43:55.739629       6 event.go:278] Event(v1.ObjectReference{Kind:"ConfigMap", Namespace:"ingress-nginx", Name:"ingress-nginx-controller", UID:"dabd96c2-1027-4d90-82cd-9f77b11bdf26", APIVersion:"v1", ResourceVersion:"5294", FieldPath:""}): type: 'Normal' reason: 'CREATE' ConfigMap ingress-nginx/ingress-nginx-controller
I0430 10:43:56.886801       6 nginx.go:307] Starting NGINX process
I0430 10:43:56.887408       6 nginx.go:327] Starting validation webhook on :8443 with keys /usr/local/certificates/cert /usr/local/certificates/key
I0430 10:43:56.887637       6 leaderelection.go:242] attempting to acquire leader lease  ingress-nginx/ingress-controller-leader-nginx...
I0430 10:43:56.888136       6 controller.go:139] Configuration changes detected, backend reload required.
I0430 10:43:56.903811       6 leaderelection.go:252] successfully acquired lease ingress-nginx/ingress-controller-leader-nginx
I0430 10:43:56.904281       6 status.go:86] new leader elected: ingress-nginx-controller-686c8db8cb-xwjm6
I0430 10:43:57.005488       6 controller.go:155] Backend successfully reloaded.
I0430 10:43:57.005534       6 controller.go:164] Initial sync, sleeping for 1 second.
-- ChinKang
google-kubernetes-engine
kubernetes
kubernetes-ingress
nginx-ingress

0 Answers