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
With Coordinated Leader Election, components need to both run a LeaseCandidate
34
-
and Lease goroutine (both found in client-go/pkg/leaderelection). Two components
35
-
(kube-controller-manager and kube-scheduler) will automatically use coordinated
36
-
leader election if enabled. Please refer to the example found in
37
-
[k8s.io/kubernetes/cmd/kube-scheduler/app/server.go](https://github.com/kubernetes/kubernetes/blob/master/cmd/kube-scheduler/app/server.go) on set up.
38
-
39
-
The created LeaseCandidate object looks similar to below:
40
-
41
-
```
42
-
apiVersion: coordination.k8s.io/v1alpha1
43
-
kind: LeaseCandidate
44
-
metadata:
45
-
name: hostname_uuid
46
-
namespace: kube-system
47
-
spec:
48
-
binaryVersion: 1.31.0
49
-
emulationVersion: 1.31.0
50
-
leaseName: kube-scheduler
51
-
preferredStrategies:
52
-
- OldestEmulationVersion
53
-
renewTime: "2024-07-30T03:45:18.325483Z"
54
-
```
55
-
56
-
Please refer to the [documentation](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#leasecandidate-v1alpha1-coordination-k8s-io) for LeaseCandidate for the full API details.
32
+
## Component configuration
33
+
Provided that you have enabled the `CoordinatedLeaderElection` feature gate _and_
34
+
have the `coordination.k8s.io/v1alpha1` API group enabled, compatible control plane
35
+
components automatically use the LeaseCandidate and Lease APIs to elect a leader
36
+
as needed.
37
+
38
+
For Kubernetes {{< skew currentVersion >}}, two control plane components
39
+
(kube-controller-manager and kube-scheduler) automatically use coordinated
40
+
leader election when the feature gate and API group are enabled.
0 commit comments