ddlinlin opened a new issue, #1875: URL: https://github.com/apache/apisix-ingress-controller/issues/1875
### Issue description The service url ssl was invalid, checked the apisix-ingress-controller log , found that a leader election occured in that moment. A invalid sni ssl was imported after the leaderelction . There is only 1 pod apisix-ingress-controller . `leaderelection.go:367] Failed to update lock: Put "https://192.168.0.1:443/apis/coordination.k8s.io/v1/namespaces/apisix/leases/ingress-apisix-leader": context deadline exceeded ingress/controller.go:320 LeaderElection {"message": "apisix-ingress-controller-85988cf5fb-xqmr5 stopped leading", "event_type": "Normal"} leaderelection.go:283] failed to renew lease apisix/ingress-apisix-leader: timed out waiting for the condition ingress/controller.go:372 controller now is running as a candidate {"namespace": "apisix", "pod": "apisix-ingress-controller-85988cf5fb-xqmr5"} ingress/namespace.go:82 namespace controller exited leaderelection.go:248] attempting to acquire leader lease apisix/ingress-apisix-leader... ingress/apisix_cluster_config.go:69 ApisixClusterConfig controller exited ingress/apisix_upstream.go:71 ApisixUpstream controller exited ingress/apisix_route.go:74 ApisixRoute controller exited ingress/apisix_consumer.go:67 ApisixConsumer controller exited ingress/apisix_tls.go:71 ApisixTls controller exited ingress/secret.go:76 secret controller exited ingress/apisix_pluginconfig.go:71 ApisixPluginConfig controller exited ingress/ingress.go:71 ingress controller exited ingress/endpoint.go:84 endpoints controller exited ingress/pod.go:56 pod controller exited leaderelection.go:367] Failed to update lock: rpc error: code = Unavailable desc = error reading from server: read tcp 7.11.184.74:41832->7.11.142.11:2379: read: connection timed out ingress/controller.go:358 found a new leader ingress/controller.go:360 controller now is running as a candidate {"namespace": "apisix", "pod": "apisix-ingress-controller-85988cf5fb-xqmr5"} ingress/controller.go:320 LeaderElection {"message": "apisix-ingress-controller-85988cf5fb-xqmr5 became leader", "event_type": "Normal"} leaderelection.go:258] successfully acquired lease apisix/ingress-apisix-leader ingress/controller.go:358 found a new leader apisix-ingress-controller-85988cf5fb-xqmr5 ingress/controller.go:406 controller tries to leading ... {"namespace": "apisix", "pod": "apisix-ingress-controller-85988cf5fb-xqmr5"} apisix/cluster.go:332 waiting cluster default to ready, it may takes a while apisix/cluster.go:372 syncing schema {"cluster": "default"} apisix/cluster.go:160 syncing cache {"cluster": "default"} apisix/ssl.go:130 list ssl #0, body: {"id":"6e2c","cert":"-----BEGIN CERTIFICATE----*************","create_time":1655718431,"status":1,"validity_end":1714175999,"validity_start":1681171200} apisix/ssl.go:130 list ssl #1, body: {"id":"f43e","cert":"-----BEGIN CERTIFICATE----*************","create_time":1655718431,"status":1,"validity_end":1715385599,"validity_start":1681948800} apisix/cluster.go:164 cache synced {"cost_time": "35.843618ms", "cluster": "default"} apisix/cluster.go:343 cluster default now is ready, cost time 35.968107ms ingress/compare.go:118 secret "1111" not found ingress/compare.go:118 secret "2222" not found` ` ### Environment - your apisix-ingress-controller version (output of apisix-ingress-controller version --long): -- apache/apisix-ingress-controller:1.4.1 - your Kubernetes cluster version (output of kubectl version): - - Major:"1", Minor:"24+", GitVersion:"v1.24.6-aliyun.1" - if you run apisix-ingress-controller in Bare-metal environment, also show your OS version (uname -a): -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
