Skip to content

Commit bb82979

Browse files
committed
add a blog to introduce about kubeadm v1beta4
1 parent 30026fa commit bb82979

File tree

1 file changed

+99
-0
lines changed

1 file changed

+99
-0
lines changed
Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
---
2+
layout: blog
3+
title: 'Kubernetes v1.31: kubeadm v1beta4'
4+
date: 2024-09-20
5+
slug: kubernetes-1-31-kubeadm-v1beta4
6+
author: >
7+
Paco Xu (DaoCloud),
8+
---
9+
10+
The [`kubeadm`](/docs/reference/setup-tools/kubeadm/) configuration
11+
([v1beta4](/docs/reference/config-api/kubeadm-config.v1beta4/))
12+
is released with Kubernetes v1.31. v1beta3 is still supported,
13+
but is marked as deprecated. It will be removed after a minimum
14+
of 3 Kubernetes releases.
15+
16+
This guide will walk you through key changes and update about the kubeadm v1beta4 configuration,
17+
and how to migrate from v1beta3 to v1beta4.
18+
19+
Details about v1beta4 can be found in the
20+
[API doc]((/docs/reference/config-api/kubeadm-config.v1beta4/)).
21+
The documentation is maintained in the
22+
[code](https://github.com/kubernetes/kubernetes/blob/master/cmd/kubeadm/app/apis/kubeadm/v1beta4/doc.go)
23+
and generated for the kubernetes.io website.
24+
25+
### A list of changes since v1beta3
26+
27+
This version improves on the [v1beta3](/docs/reference/config-api/kubeadm-config.v1beta3/)
28+
format by fixing some minor issues and adding a few new fields.
29+
30+
To put it simply,
31+
32+
- Two new API types: ResetConfiguration and UpgradeConfiguration
33+
- For InitConfiguration and JoinConfiguration, `dryRun` mode and `NodeRegistration.ImagePullSerial` are supported
34+
- For ClusterConfiguration, we add field including `CertificateValidityPeriod`,
35+
`CACertificateValidityPeriod`, `EncryptionAlgorithm`, `DNS.Disabled` and `Proxy.Disabled`.
36+
- Support `ExtraEnvs` for all control plan components
37+
- `ExtraArgs` changed from a map to structured extra arguments for duplicates
38+
- Add a `Timeouts` structure for init, join, upgrade and reset.
39+
40+
For details, you can see the official document below:
41+
42+
- Support custom environment variables in control plane components under `ClusterConfiguration`.
43+
Use `APIServer.ExtraEnvs`, `ControllerManager.ExtraEnvs`, `Scheduler.ExtraEnvs`, `Etcd.Local.ExtraEnvs`.
44+
- The ResetConfiguration API type is now supported in v1beta4. Users are able to reset a node by passing
45+
a `--config` file to "kubeadm reset".
46+
- `dryRun` mode in is now configurable in InitConfiguration and JoinConfiguration.
47+
- Replace the existing string/string extra argument maps with structured extra arguments that support duplicates.
48+
The change applies to `ClusterConfiguration` - `APIServer.ExtraArgs`, `ControllerManager.ExtraArgs`,
49+
`Scheduler.ExtraArgs`, `Etcd.Local.ExtraArgs`. Also to `NodeRegistrationOptions.KubeletExtraArgs`.
50+
- Add `ClusterConfiguration.EncryptionAlgorithm` that can be used to set the asymmetric encryption algorithm
51+
used for this cluster's keys and certificates. Can be one of "RSA-2048" (default), "RSA-3072", "RSA-4096" or "ECDSA-P256".
52+
- Add `ClusterConfiguration.DNS.Disabled` and `ClusterConfiguration.Proxy.Disabled` that can be used to disable
53+
the CoreDNS and kube-proxy addons during cluster initialization. Skipping the related addons phases,
54+
during cluster creation will set the same fields to `false`.
55+
- Add the `NodeRegistration.ImagePullSerial` field in `InitConfiguration` and `JoinConfiguration`, which
56+
can be used to control if kubeadm pulls images serially or in parallel.
57+
- The UpgradeConfiguration kubeadm API is now supported in v1beta4 when passing --config to "kubeadm upgrade" subcommands.
58+
Usage of component configuration for kubelet and kube-proxy, InitConfiguration and ClusterConfiguration is deprecated
59+
and will be ignored when passing `--config` to upgrade subcommands.
60+
- Add a `Timeouts` structure to `InitConfiguration`, `JoinConfiguration`, `ResetConfiguration` and `UpgradeConfiguration`
61+
that can be used to configure various timeouts. The `ClusterConfiguration.TimeoutForControlPlane` field is replaced
62+
by `Timeouts.ControlPlaneComponentHealthCheck`. The `JoinConfiguration.Discovery.Timeout` is replaced by
63+
`Timeouts.Discovery`.
64+
- Add a `CertificateValidityPeriod` and `CACertificateValidityPeriod` fields to `ClusterConfiguration`. These fields
65+
can be used to control the validity period of certificates generated by kubeadm during sub-commands such as `init`,
66+
`join`, `upgrade` and `certs`. Default values continue to be 1 year for non-CA certificates and 10 years for CA
67+
certificates. Only non-CA certificates continue to be renewable by `kubeadm certs renew`.
68+
69+
The aim of those changes can be summarized as making tools that use kubeadm easier to configure
70+
and make kubeadm easier to extend.
71+
72+
### How to migrate v1beta3 configuration to v1beta4?
73+
74+
If your configuration is not using the latest version it is **recommended** that you migrate using
75+
the [kubeadm config migrate](/docs/reference/setup-tools/kubeadm/kubeadm-config/#cmd-config-migrate) command.
76+
77+
Read an older version of the kubeadm configuration API types from a file, and output the similar config object for the newer version
78+
79+
Using kubeadm v1.31, run `kubeadm config migrate --old-config old-v1beta3.yaml --new-config new-v1beta4.yaml`
80+
81+
## How do I get involved?
82+
83+
Huge thank you to all the contributors who helped with the design, implementation,
84+
and review of this feature:
85+
86+
- Lubomir I. Ivanov ([neolit123](https://github.com/neolit123))
87+
- Dave Chen([chendave](https://github.com/chendave))
88+
- Paco Xu ([pacoxu](https://github.com/pacoxu))
89+
- Sata Qiu([sataqiu](https://github.com/sataqiu))
90+
- Baofa Fan([carlory](https://github.com/carlory))
91+
- Calvin Chen([calvin0327](https://github.com/calvin0327))
92+
- Ruquan Zhao([ruquanzhao](https://github.com/ruquanzhao))
93+
94+
For those interested in getting involved in future discussions on kubeadm configuration,
95+
you can reach out kubeadm or [SIG-cluster-lifecycle](https://github.com/kubernetes/community/blob/master/sig-cluster-lifecycle/README.md) by several means:
96+
97+
- v1beta4 related items are tracked in https://github.com/kubernetes/kubeadm/issues/2890.
98+
- Slack: [#kubeadm](https://kubernetes.slack.com/messages/kubeadm) or [#sig-cluster-lifecycle](https://kubernetes.slack.com/messages/sig-cluster-lifecycle)
99+
- [Mailing list](https://groups.google.com/forum/#!forum/kubernetes-sig-cluster-lifecycle)

0 commit comments

Comments
 (0)