Skip to content

Commit fa3efa1

Browse files
committed
kubeadm: use the new v1beta3 instead of v1beta2
In 1.22 kubeadm is adding a new API version - v1beta3. Adapt links and examples to use v1beta3 instead of v1beta2. v1beta2 is not deprecated yet, but v1beta3 is preferred at this point.
1 parent d8f4b5c commit fa3efa1

File tree

8 files changed

+29
-48
lines changed

8 files changed

+29
-48
lines changed

content/en/docs/reference/setup-tools/kubeadm/kubeadm-init-phase.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,8 @@ install them selectively.
143143
{{< tab name="kube-proxy" include="generated/kubeadm_init_phase_addon_kube-proxy.md" />}}
144144
{{< /tabs >}}
145145

146-
For more details on each field in the `v1beta2` configuration you can navigate to our
147-
[API reference pages.] (https://godoc.org/k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/v1beta2)
146+
For more details on each field in the `v1beta3` configuration you can navigate to our
147+
[API reference pages.] (https://godoc.org/k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/v1beta3)
148148

149149
## {{% heading "whatsnext" %}}
150150

content/en/docs/setup/production-environment/tools/kubeadm/control-plane-flags.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ The `extraArgs` field consist of `key: value` pairs. To override a flag for a co
2424
3. Run `kubeadm init` with `--config <YOUR CONFIG YAML>`.
2525

2626
For more details on each field in the configuration you can navigate to our
27-
[API reference pages](https://godoc.org/k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/v1beta2#ClusterConfiguration).
27+
[API reference pages](https://godoc.org/k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/v1beta3#ClusterConfiguration).
2828

2929
{{< note >}}
3030
You can generate a `ClusterConfiguration` object with default values by running `kubeadm config print init-defaults` and saving the output to a file of your choice.
@@ -40,7 +40,7 @@ For details, see the [reference documentation for kube-apiserver](/docs/referenc
4040

4141
Example usage:
4242
```yaml
43-
apiVersion: kubeadm.k8s.io/v1beta2
43+
apiVersion: kubeadm.k8s.io/v1beta3
4444
kind: ClusterConfiguration
4545
kubernetesVersion: v1.16.0
4646
apiServer:
@@ -57,7 +57,7 @@ For details, see the [reference documentation for kube-controller-manager](/docs
5757
5858
Example usage:
5959
```yaml
60-
apiVersion: kubeadm.k8s.io/v1beta2
60+
apiVersion: kubeadm.k8s.io/v1beta3
6161
kind: ClusterConfiguration
6262
kubernetesVersion: v1.16.0
6363
controllerManager:
@@ -73,7 +73,7 @@ For details, see the [reference documentation for kube-scheduler](/docs/referenc
7373
7474
Example usage:
7575
```yaml
76-
apiVersion: kubeadm.k8s.io/v1beta2
76+
apiVersion: kubeadm.k8s.io/v1beta3
7777
kind: ClusterConfiguration
7878
kubernetesVersion: v1.16.0
7979
scheduler:
@@ -86,5 +86,3 @@ scheduler:
8686
readOnly: true
8787
pathType: "File"
8888
```
89-
90-

content/en/docs/setup/production-environment/tools/kubeadm/dual-stack-support.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ For each server that you want to use as a {{< glossary_tooltip text="node" term_
2121

2222
You need to have an IPv4 and and IPv6 address range to use. Cluster operators typically
2323
use private address ranges for IPv4. For IPv6, a cluster operator typically chooses a global
24-
unicast address block from within `2000::/3`, using a range that is assigned to the operator.
24+
unicast address block from within `2000::/3`, using a range that is assigned to the operator.
2525
You don't have to route the cluster's IP address ranges to the public internet.
2626

2727
The size of the IP address allocations should be suitable for the number of Pods and
@@ -30,7 +30,7 @@ Services that you are planning to run.
3030
{{< note >}}
3131
If you are upgrading an existing cluster then, by default, the `kubeadm upgrade` command
3232
changes the [feature gate](/docs/reference/command-line-tools-reference/feature-gates/)
33-
`IPv6DualStack` to `true` if that is not already enabled.
33+
`IPv6DualStack` to `true` if that is not already enabled.
3434
However, `kubeadm` does not support making modifications to the pod IP address range
3535
(“cluster CIDR”) nor to the cluster's Service address range (“Service CIDR”).
3636
{{< /note >}}
@@ -45,19 +45,19 @@ similar to the following example:
4545
kubeadm init --pod-network-cidr=10.244.0.0/16,2001:db8:42:0::/56 --service-cidr=10.96.0.0/16,2001:db8:42:1::/112
4646
```
4747

48-
To make things clearer, here is an example kubeadm [configuration file](https://pkg.go.dev/k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/v1beta2) `kubeadm-config.yaml` for the primary dual-stack control plane node.
48+
To make things clearer, here is an example kubeadm [configuration file](https://pkg.go.dev/k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/v1beta3) `kubeadm-config.yaml` for the primary dual-stack control plane node.
4949

5050
```yaml
5151
---
52-
apiVersion: kubeadm.k8s.io/v1beta2
52+
apiVersion: kubeadm.k8s.io/v1beta3
5353
kind: ClusterConfiguration
5454
featureGates:
5555
IPv6DualStack: true
5656
networking:
5757
podSubnet: 10.244.0.0/16,2001:db8:42:0::/56
5858
serviceSubnet: 10.96.0.0/16,2001:db8:42:1::/112
5959
---
60-
apiVersion: kubeadm.k8s.io/v1beta2
60+
apiVersion: kubeadm.k8s.io/v1beta3
6161
kind: InitConfiguration
6262
localAPIEndpoint:
6363
advertiseAddress: "10.100.0.1"
@@ -85,10 +85,10 @@ The `--apiserver-advertise-address` flag does not support dual-stack.
8585

8686
Before joining a node, make sure that the node has IPv6 routable network interface and allows IPv6 forwarding.
8787

88-
Here is an example kubeadm [configuration file](https://pkg.go.dev/k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/v1beta2) `kubeadm-config.yaml` for joining a worker node to the cluster.
88+
Here is an example kubeadm [configuration file](https://pkg.go.dev/k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/v1beta3) `kubeadm-config.yaml` for joining a worker node to the cluster.
8989

9090
```yaml
91-
apiVersion: kubeadm.k8s.io/v1beta2
91+
apiVersion: kubeadm.k8s.io/v1beta3
9292
kind: JoinConfiguration
9393
discovery:
9494
bootstrapToken:
@@ -98,9 +98,9 @@ nodeRegistration:
9898
node-ip: 10.100.0.3,fd00:1:2:3::3
9999
```
100100

101-
Also, here is an example kubeadm [configuration file](https://pkg.go.dev/k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/v1beta2) `kubeadm-config.yaml` for joining another control plane node to the cluster.
101+
Also, here is an example kubeadm [configuration file](https://pkg.go.dev/k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/v1beta3) `kubeadm-config.yaml` for joining another control plane node to the cluster.
102102
```yaml
103-
apiVersion: kubeadm.k8s.io/v1beta2
103+
apiVersion: kubeadm.k8s.io/v1beta3
104104
kind: JoinConfiguration
105105
controlPlane:
106106
localAPIEndpoint:
@@ -124,7 +124,7 @@ kubeadm join --config=kubeadm-config.yaml ...
124124
### Create a single-stack cluster
125125

126126
{{< note >}}
127-
Enabling the dual-stack feature doesn't mean that you need to use dual-stack addressing.
127+
Enabling the dual-stack feature doesn't mean that you need to use dual-stack addressing.
128128
You can deploy a single-stack cluster that has the dual-stack networking feature enabled.
129129
{{< /note >}}
130130

@@ -134,10 +134,10 @@ In 1.21 the `IPv6DualStack` feature is Beta and the feature gate is defaulted to
134134
kubeadm init --feature-gates IPv6DualStack=false
135135
```
136136

137-
To make things more clear, here is an example kubeadm [configuration file](https://pkg.go.dev/k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/v1beta2) `kubeadm-config.yaml` for the single-stack control plane node.
137+
To make things more clear, here is an example kubeadm [configuration file](https://pkg.go.dev/k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/v1beta3) `kubeadm-config.yaml` for the single-stack control plane node.
138138

139139
```yaml
140-
apiVersion: kubeadm.k8s.io/v1beta2
140+
apiVersion: kubeadm.k8s.io/v1beta3
141141
kind: ClusterConfiguration
142142
featureGates:
143143
IPv6DualStack: false

content/en/docs/setup/production-environment/tools/kubeadm/high-availability.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ option. Your cluster requirements may need a different configuration.
115115

116116
{{< note >}}
117117
The `kubeadm init` flags `--config` and `--certificate-key` cannot be mixed, therefore if you want
118-
to use the [kubeadm configuration](https://godoc.org/k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/v1beta2)
118+
to use the [kubeadm configuration](https://godoc.org/k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/v1beta3)
119119
you must add the `certificateKey` field in the appropriate config locations
120120
(under `InitConfiguration` and `JoinConfiguration: controlPlane`).
121121
{{< /note >}}
@@ -230,7 +230,7 @@ in the kubeadm config file.
230230

231231
1. Create a file called `kubeadm-config.yaml` with the following contents:
232232

233-
apiVersion: kubeadm.k8s.io/v1beta2
233+
apiVersion: kubeadm.k8s.io/v1beta3
234234
kind: ClusterConfiguration
235235
kubernetesVersion: stable
236236
controlPlaneEndpoint: "LOAD_BALANCER_DNS:LOAD_BALANCER_PORT"

content/en/docs/setup/production-environment/tools/kubeadm/setup-ha-etcd-with-kubeadm.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ this example.
9595
HOST=${ETCDHOSTS[$i]}
9696
NAME=${NAMES[$i]}
9797
cat << EOF > /tmp/${HOST}/kubeadmcfg.yaml
98-
apiVersion: "kubeadm.k8s.io/v1beta2"
98+
apiVersion: "kubeadm.k8s.io/v1beta3"
9999
kind: ClusterConfiguration
100100
etcd:
101101
local:

content/en/docs/setup/production-environment/tools/kubeadm/troubleshooting-kubeadm.md

Lines changed: 4 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -348,23 +348,6 @@ kubectl -n kube-system patch ds kube-proxy -p='{ "spec": { "template": { "spec":
348348

349349
The tracking issue for this problem is [here](https://github.com/kubernetes/kubeadm/issues/1027).
350350

351-
## The NodeRegistration.Taints field is omitted when marshalling kubeadm configuration
352-
353-
*Note: This [issue](https://github.com/kubernetes/kubeadm/issues/1358) only applies to tools that marshal kubeadm types (e.g. to a YAML configuration file). It will be fixed in kubeadm API v1beta2.*
354-
355-
By default, kubeadm applies the `node-role.kubernetes.io/master:NoSchedule` taint to control-plane nodes.
356-
If you prefer kubeadm to not taint the control-plane node, and set `InitConfiguration.NodeRegistration.Taints` to an empty slice,
357-
the field will be omitted when marshalling. When the field is omitted, kubeadm applies the default taint.
358-
359-
There are at least two workarounds:
360-
361-
1. Use the `node-role.kubernetes.io/master:PreferNoSchedule` taint instead of an empty slice. [Pods will get scheduled on masters](/docs/concepts/scheduling-eviction/taint-and-toleration/), unless other nodes have capacity.
362-
363-
2. Remove the taint after kubeadm init exits:
364-
```bash
365-
kubectl taint nodes NODE_NAME node-role.kubernetes.io/master:NoSchedule-
366-
```
367-
368351
## `/usr` is mounted read-only on nodes {#usr-mounted-read-only}
369352

370353
On Linux distributions such as Fedora CoreOS or Flatcar Container Linux, the directory `/usr` is mounted as a read-only filesystem.
@@ -374,19 +357,19 @@ Kubernetes components like the kubelet and kube-controller-manager use the defau
374357
for the feature to work.
375358

376359
To workaround this issue you can configure the flex-volume directory using the kubeadm
377-
[configuration file](https://godoc.org/k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/v1beta2).
360+
[configuration file](https://godoc.org/k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/v1beta3).
378361

379362
On the primary control-plane Node (created using `kubeadm init`) pass the following
380363
file using `--config`:
381364

382365
```yaml
383-
apiVersion: kubeadm.k8s.io/v1beta2
366+
apiVersion: kubeadm.k8s.io/v1beta3
384367
kind: InitConfiguration
385368
nodeRegistration:
386369
kubeletExtraArgs:
387370
volume-plugin-dir: "/opt/libexec/kubernetes/kubelet-plugins/volume/exec/"
388371
---
389-
apiVersion: kubeadm.k8s.io/v1beta2
372+
apiVersion: kubeadm.k8s.io/v1beta3
390373
kind: ClusterConfiguration
391374
controllerManager:
392375
extraArgs:
@@ -396,7 +379,7 @@ controllerManager:
396379
On joining Nodes:
397380

398381
```yaml
399-
apiVersion: kubeadm.k8s.io/v1beta2
382+
apiVersion: kubeadm.k8s.io/v1beta3
400383
kind: JoinConfiguration
401384
nodeRegistration:
402385
kubeletExtraArgs:

content/en/docs/tasks/administer-cluster/kubeadm/configure-cgroup-driver.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ A minimal example of configuring the field explicitly:
4242
```yaml
4343
# kubeadm-config.yaml
4444
kind: ClusterConfiguration
45-
apiVersion: kubeadm.k8s.io/v1beta2
45+
apiVersion: kubeadm.k8s.io/v1beta3
4646
kubernetesVersion: v1.21.0
4747
---
4848
kind: KubeletConfiguration

content/en/docs/tasks/administer-cluster/kubeadm/kubeadm-certs.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -157,10 +157,10 @@ The built-in signer is part of [`kube-controller-manager`](/docs/reference/comma
157157

158158
To activate the built-in signer, you must pass the `--cluster-signing-cert-file` and `--cluster-signing-key-file` flags.
159159

160-
If you're creating a new cluster, you can use a kubeadm [configuration file](https://godoc.org/k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/v1beta2):
160+
If you're creating a new cluster, you can use a kubeadm [configuration file](https://godoc.org/k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/v1beta3):
161161

162162
```yaml
163-
apiVersion: kubeadm.k8s.io/v1beta2
163+
apiVersion: kubeadm.k8s.io/v1beta3
164164
kind: ClusterConfiguration
165165
controllerManager:
166166
extraArgs:
@@ -219,7 +219,7 @@ To configure the kubelets in a new kubeadm cluster to obtain properly signed ser
219219
certificates you must pass the following minimal configuration to `kubeadm init`:
220220

221221
```yaml
222-
apiVersion: kubeadm.k8s.io/v1beta2
222+
apiVersion: kubeadm.k8s.io/v1beta3
223223
kind: ClusterConfiguration
224224
---
225225
apiVersion: kubelet.config.k8s.io/v1beta1

0 commit comments

Comments
 (0)