kubernetes-sigs / kubespray

Deploy a Production Ready Kubernetes Cluster
Apache License 2.0
16.22k stars 6.5k forks source link

upgrade: variables modified in kubeadm-config.yaml are not reflected in static manifests anymore #11552

Open maxime1907 opened 2 months ago

maxime1907 commented 2 months ago

What happened?

Recently, the --config option was removed from kubeadm upgrade following deprecation cycle:

This introduces a regression because now there is no playbook to reconfigure kubeadm

What did you expect to happen?

upgrade-cluster.yml playbook reconfigures kubeadm

How can we reproduce it (as minimally and precisely as possible)?

  1. Deploy a cluster
  2. Change a kubeadm setting like kube_apiserver_pod_eviction_not_ready_timeout_seconds
  3. Run the upgrade playbook

OS

Linux 5.15.0-122-generic x86_64
PRETTY_NAME="Ubuntu 22.04.3 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.3 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy

Version of Ansible

ansible [core 2.16.10]
  config file = /kubespray/ansible.cfg
  configured module search path = ['/kubespray/library']
  ansible python module location = /usr/local/lib/python3.10/dist-packages/ansible
  ansible collection location = /root/.ansible/collections:/usr/share/ansible/collections
  executable location = /usr/local/bin/ansible
  python version = 3.10.12 (main, Jul 29 2024, 16:56:48) [GCC 11.4.0] (/usr/bin/python3)
  jinja version = 3.1.4
  libyaml = True

Version of Python

Python 3.10.12

Version of Kubespray (commit)

f9ebd45c7

Network plugin used

calico

Full inventory with variables

not relevant

Command used to invoke ansible

ansible-playbook -i inventory/mycluster/hosts.yaml upgrade-cluster.yml

Output of ansible run

not relevant

Anything else we need to know

I'm not sure if we should completely separate this feature inside a dedicated playbook or reintroduce this behavior with a command such as:

kubeadm init phase control-plane all --config /etc/kubernetes/kubeadm-config.yaml

That topic has been a bit discussed here:

tico88612 commented 2 months ago

This issue is an embarrassment. v1.29 works with --config but v1.30 doesn't, but v1.31 does again.

BTW, reconfiguring clusters is not a good practice.

https://github.com/kubernetes-sigs/kubespray/pull/11352#issuecomment-2210283864

tico88612 commented 1 month ago

@maxime1907 If you want to add this back, we should first support Kubeadm Configuration (v1beta4).

Related Issue: #10935