Closed SataQiu closed 4 months ago
i think we need to drop support if any flag that performs a cluster reconfiguration on upgrade. --feature-gates us such a flag. we should deprecate it. the correct way to change fgs is to edit the config map. --yes was recently allowed to mix; we shouldn't add it in config.
what other flags are problematic?
edit: checked https://kubernetes.io/docs/reference/setup-tools/kubeadm/kubeadm-upgrade/ and i think we have config coverage for most flags, some flags were discussed as not desired for config 🤔
cc @calvin0327
i think we need to drop support if any flag that performs a cluster reconfiguration on upgrade. --feature-gates us such a flag
Ok, I will send a PR later to deprecate --feature-gates
flag for kubeadm upgrade apply/plan
what other flags are problematic?
Maybe not completely, but I found these problems:
# kubeadm upgrade plan --config upgrade.yaml --allow-missing-template-keys xx --output xx --show-managed-fields xx
can not mix '--config' with arguments [allow-missing-template-keys、output、show-managed-fields]
Maybe not completely, but I found these problems:
# kubeadm upgrade plan --config upgrade.yaml can not mix '--config' with arguments [all
if we are just passing --config but it complains about some options that we didn't pass, that seems like a bug. please send a PR for that too if possible.
one step in the right direction would be to enable --config for upgrade in kinder workflows. i will take this action item.
if we are just passing --config but it complains about some options that we didn't pass, that seems like a bug. please send a PR for that too if possible.
Sorry for the misleading. These flags were passed with --config
in my test. I think we should also allow these flags mixed with --config
, but don't deprecate them, right? @neolit123
if we are just passing --config but it complains about some options that we didn't pass, that seems like a bug. please send a PR for that too if possible.
Sorry for the misleading. These flags were passed with
--config
in my test. I think we should also allow these flags mixed with--config
, but don't deprecate them, right? @neolit123
i think these flags come from our usage of the kubectl cmd lib for structured output. --output is our flag. these should be allowed with config.
In the Kubespray project, we use the following flags for kubeadm upgrade
but they can't be mixed with --config
option.
How to use these options with --config
? It seems that the v1beta3 config does not support the options.
Without this, it is hard to support upgrading k8s 1.29 to 1.30 by kubespray.
In the Kubespray project, we use the following flags for
kubeadm upgrade
but they can't be mixed with--config
option.
- --allow-experimental-upgrades
- --certificate-renewal
- --etcd-upgrade
- --force
- --yes
How to use these options with
--config
? It seems that the v1beta3 config does not support the options. Without this, it is hard to support upgrading k8s 1.29 to 1.30 by kubespray.
the usage of v1beta3.InitConfiguration|ClusterConfiguration with --config on upgrade has been long deprecated and there was a warning printed to the user for ~10 releases. it's a non-supported and also dangerous form of reconfguration.
it's just not possible to use --config and mix these options, which is the expected behavior. --yes does not exist in v1beta4 so mixing it with --config should be ok, in 1.31.
you should drop your usage of --config on upgrade to 1.30 and 1.31 for non-v1beta4 APIs and use similar actions to reconfigure a kubeadm cluster: https://kubernetes.io/docs/tasks/administer-cluster/kubeadm/kubeadm-reconfigure/
@neolit123 Thank you for your answer. I understood.
When I try to upgrade the cluster using
kubeadm upgrade apply/plan --config upgrade.yaml
(master branch latest code), many flags can not be mixed but are not defined in the config file.For example, an error will occur when you execute this command
kubeadm upgrade apply v1.30.0 --config upgrade.yaml --feature-gates EtcdLearnerMode=true
Other commands and flags may have similar problems that must be checked carefully.
I create this issue to discuss a solution.
There are two ways to handle this:
UpgradeConfiguration
)--config
what do you think?@neolit123 @pacoxu
We'd better fix this issue before the new version is released to reduce the problems introduced by
v1beta4
Similar with: https://github.com/kubernetes/kubernetes/pull/125779