Skip to content

Commit ace0f35

Browse files
authored
Merge pull request #46982 from Jefftree/cle
[KEP-4355] Coordinated Leader Election alpha documentation
2 parents cdd0f61 + 80e2409 commit ace0f35

File tree

3 files changed

+66
-0
lines changed

3 files changed

+66
-0
lines changed
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
---
2+
reviewers:
3+
- jpbetz
4+
title: Coordinated Leader Election
5+
content_type: concept
6+
weight: 200
7+
---
8+
9+
<!-- overview -->
10+
11+
{{< feature-state feature_gate_name="CoordinatedLeaderElection" >}}
12+
13+
Kubernetes {{< skew currentVersion >}} includes an alpha feature that allows {{<
14+
glossary_tooltip text="control plane" term_id="control-plane" >}} components to
15+
deterministically select a leader via _coordinated leader election_.
16+
This is useful to satisfy Kubernetes version skew constraints during cluster upgrades.
17+
Currently, the only builtin selection strategy is `OldestEmulationVersion`,
18+
preferring the leader with the lowest emulation version, followed by binary
19+
version, followed by creation timestamp.
20+
21+
## Enabling coordinated leader election
22+
23+
Ensure that `CoordinatedLeaderElection` [feature
24+
gate](/docs/reference/command-line-tools-reference/feature-gates/) is enabled
25+
when you start the {{< glossary_tooltip text="API Server"
26+
term_id="kube-apiserver" >}}: and that the `coordination.k8s.io/v1alpha1` API group is
27+
enabled.
28+
29+
This can be done by setting flags `--feature-gates="CoordinatedLeaderElection=true"` and
30+
`--runtime-config="coordination.k8s.io/v1alpha1=true"`.
31+
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.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
title: CoordinatedLeaderElection
3+
content_type: feature_gate
4+
_build:
5+
list: never
6+
render: false
7+
8+
stages:
9+
- stage: alpha
10+
defaultValue: false
11+
fromVersion: "1.31"
12+
---
13+
Enables the behaviors supporting the LeaseCandidate API, and also enables
14+
coordinated leader election for the Kubernetes control plane, deterministically.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
api_metadata:
3+
apiVersion: "coordination.k8s.io/v1alpha1"
4+
import: "k8s.io/api/coordination/v1alpha1"
5+
kind: "LeaseCandidate"
6+
content_type: "api_reference"
7+
description: "This is a placeholder page to be overwritten when the docs are generated for 1.31"
8+
title: "LeaseCandidate"
9+
weight: 5
10+
---
11+
12+

0 commit comments

Comments
 (0)