You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In a particular project we are using LeaderElection via Kubernetes C# client. For some reason no leader was being elected and the application was not logging any relevant information.
The root cause was lack of permissions for the endpoints resource. After doing some debugging I managed to access the following exception:
{"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"endpoints \"leaderendpoint\" is forbidden: User \"system:serviceaccount:app-XXX-dev:XXX\\" cannot get resource \\"endpoints\\" in API group \\"\\" in the namespace \\"app-XXX-dev\\"","reason":"Forbidden","details":{"name":"leaderendpoint","kind":"endpoints"},"code":403}
k8s-ci-robot
added
lifecycle/rotten
Denotes an issue or PR that has aged beyond stale and will be auto-closed.
and removed
lifecycle/stale
Denotes an issue or PR has remained open with no activity and has become stale.
labels
May 7, 2024
In a particular project we are using LeaderElection via Kubernetes C# client. For some reason no leader was being elected and the application was not logging any relevant information.
The root cause was lack of permissions for the endpoints resource. After doing some debugging I managed to access the following exception:
I suggest to remove the following if condition so that the onError event is always triggered:
https://github.com/kubernetes-client/csharp/blob/master/src/KubernetesClient/LeaderElection/LeaderElector.cs#L162
The text was updated successfully, but these errors were encountered: