包阅导读总结
1.
– `Kubernetes v1.31`、`kubeadm v1beta4`、`配置格式`、`迁移`、`更改`
2.
Kubernetes v1.31 发布,kubeadm 采用新的 v1beta4 配置文件格式,v1beta3 格式已弃用,文中介绍了 v1beta4 的关键更改、迁移方法及参与讨论的途径。
3.
– Kubernetes v1.31 及 kubeadm v1beta4
– kubeadm 采用新配置格式 v1beta4,v1beta3 格式已弃用但仍支持,至少 3 个小版本后移除对 v1beta3 的支持
– v1beta4 关键更改
– 新增了一些配置元素和字段,如 `ResetConfiguration`、`UpgradeConfiguration` 等
– 对现有配置元素进行了改进,如支持 `dryRun` 模式等
– 迁移方法
– 推荐使用 `kubeadm config migrate` 命令从 v1beta3 迁移到 v1beta4
– 参与途径
– 对 kubeadm 配置感兴趣的可通过多种方式参与未来讨论
思维导图:
文章地址:https://kubernetes.io/blog/2024/08/23/kubernetes-1-31-kubeadm-v1beta4/
文章来源:kubernetes.io
作者:Kubernetes Blog
发布时间:2024/8/23 0:00
语言:英文
总字数:651字
预计阅读时间:3分钟
评分:83分
标签:Kubernetes,kubeadm,配置,v1beta4,迁移
以下为原文内容
本内容来源于用户推荐转载,旨在分享知识与观点,如有侵权请联系删除 联系邮箱 media@ilingban.com
Kubernetes v1.31: kubeadm v1beta4
By Paco Xu (DaoCloud) |
As part of the Kubernetes v1.31 release, kubeadm
isadopting a new (v1beta4) version ofits configuration file format. Configuration in the previous v1beta3 format is now formallydeprecated, which means it’s supported but you should migrate to v1beta4 and stop usingthe deprecated format.Support for v1beta3 configuration will be removed after a minimum of 3 Kubernetes minor releases.
In this article, I’ll walk you through key changes;I’ll explain about the kubeadm v1beta4 configuration format,and how to migrate from v1beta3 to v1beta4.
You can read the reference for the v1beta4 configuration format:kubeadm Configuration (v1beta4).
A list of changes since v1beta3
This version improves on the v1beta3format by fixing some minor issues and adding a few new fields.
To put it simply,
- Two new configuration elements: ResetConfiguration and UpgradeConfiguration
- For InitConfiguration and JoinConfiguration,
dryRun
mode andnodeRegistration.imagePullSerial
are supported - For ClusterConfiguration, there are new fields including
certificateValidityPeriod
,caCertificateValidityPeriod
,encryptionAlgorithm
,dns.disabled
andproxy.disabled
. - Support
extraEnvs
for all control plan components extraArgs
changed from a map to structured extra arguments for duplicates- Add a
timeouts
structure for init, join, upgrade and reset.
For details, you can see the official document below:
- Support custom environment variables in control plane components under
ClusterConfiguration
.UseapiServer.extraEnvs
,controllerManager.extraEnvs
,scheduler.extraEnvs
,etcd.local.extraEnvs
. - The ResetConfiguration API type is now supported in v1beta4. Users are able to reset a node by passinga
--config
file tokubeadm reset
. dryRun
mode is now configurable in InitConfiguration and JoinConfiguration.- Replace the existing string/string extra argument maps with structured extra arguments that support duplicates.The change applies to
ClusterConfiguration
–apiServer.extraArgs
,controllerManager.extraArgs
,scheduler.extraArgs
,etcd.local.extraArgs
. Also tonodeRegistrationOptions.kubeletExtraArgs
. - Added
ClusterConfiguration.encryptionAlgorithm
that can be used to set the asymmetric encryptionalgorithm used for this cluster’s keys and certificates. Can be one of “RSA-2048” (default), “RSA-3072″,”RSA-4096” or “ECDSA-P256”. - Added
ClusterConfiguration.dns.disabled
andClusterConfiguration.proxy.disabled
that can be usedto disable the CoreDNS and kube-proxy addons during cluster initialization.Skipping the related addons phases, during cluster creation will set the same fields totrue
. - Added the
nodeRegistration.imagePullSerial
field inInitConfiguration
andJoinConfiguration
,which can be used to control if kubeadm pulls images serially or in parallel. - The UpgradeConfiguration kubeadm API is now supported in v1beta4 when passing
--config
tokubeadm upgrade
subcommands.For upgrade subcommands, the usage of component configuration for kubelet and kube-proxy, as well asInitConfiguration and ClusterConfiguration, is now deprecated and will be ignored when passing--config
. - Added a
timeouts
structure toInitConfiguration
,JoinConfiguration
,ResetConfiguration
andUpgradeConfiguration
that can be used to configure various timeouts.TheClusterConfiguration.timeoutForControlPlane
field is replaced bytimeouts.controlPlaneComponentHealthCheck
.TheJoinConfiguration.discovery.timeout
is replaced bytimeouts.discovery
. - Added a
certificateValidityPeriod
andcaCertificateValidityPeriod
fields toClusterConfiguration
.These fields can be used to control the validity period of certificates generated by kubeadm duringsub-commands such asinit
,join
,upgrade
andcerts
.Default values continue to be 1 year for non-CA certificates and 10 years for CA certificates.Also note that only non-CA certificates are renewable bykubeadm certs renew
.
These changes simplify the configuration of tools that use kubeadmand improve the extensibility of kubeadm itself.
How to migrate v1beta3 configuration to v1beta4?
If your configuration is not using the latest version, it is recommended that you migrate usingthe kubeadm config migrate command.
This command reads an existing configuration file that uses the old format, and writes a newfile that uses the current format.
Example
Using kubeadm v1.31, run kubeadm config migrate --old-config old-v1beta3.yaml --new-config new-v1beta4.yaml
How do I get involved?
Huge thanks to all the contributors who helped with the design, implementation,and review of this feature:
For those interested in getting involved in future discussions on kubeadm configuration,you can reach out kubeadm or SIG-cluster-lifecycle by several means: