-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Manager error results in pod crash #1774
Comments
Yes, it is the expected behavior. The client doesn't know whether the network issue is in the whole cluster or itself. If it continues to run without restart and another manager pod has been new leader, they might work at the same time and lead to unexpected result.
controller-runtime/pkg/manager/manager.go Lines 178 to 187 in 19f9afe
|
@FillZpp thank you for the information! |
Hi, does it possible to expose those values as HELM variables ? |
Using the manager, if there is an issue with leader election, our program should exit immediately according to the docs:
controller-runtime/pkg/manager/manager.go
Lines 81 to 87 in b8db76e
However, when I experience a network issue in our kubernetes cluster, sometimes our application pod will continually restart because it has momentarily lost connection to the kubernetes api (again, due to some intermittent connection issues). This happens because when the pod tries to acquire/reacquire the leader lock, it times out when the pod starts back up, then exits, rinse and repeat.
I'm seeing logs like this:
Is this expected behavior? Is there anything I can do to prevent the pods from restarting continually when there are connectivity issues to the kubernetes apis?
The text was updated successfully, but these errors were encountered: