integ/kubernetes/kubernetes-unversioned/centos/files/kubelet_override.yaml
kdhokte 0d5f87e08f update kubeadm configmap with new feature gate
The script will run for every k8s upgrade as a part of the
control-plane upgrade of the first master.
It updates kubeadm-config configmap to configure kube-apiserver
manifest with RemoveSelfLink=false.

The kubelet config override file is consumed by
kubeadm upgrade apply to configure cgroupDriver=cgroupfs.

Kubernetes changed default cgroupDriver cgroupfs to systemd
from k8s 1.21. We need to configure cgroupDriver with 'cgroupfs'
in the kubelet config otherwise kubelet will fail to launch.

Kubernetes changed kube-apiserver feature-gate RemoveSelfLink
default value to true from k8s 1.20 onwards.
This caused PVCs to not bound to PVs and eventually caused some
system apps to fail. We need to configure the kube-apiserver
feature-gates with RemoveSelfLink=false to avoid it until we can
update the application code to handle the new behaviour.

Test Plan:
PASS: successful testing of the script during k8s version upgrades
      from 1.18 -> 1.19 -> 1.20 -> 1.21 on AIO-DX system.
      Verified that PVCs are bound to PVs after each upgrade.
      Verified that pods are up and running after each upgrade.
      Verified that kube-apiserver manifest and kubelet config
      file is configured as expected after each upgrade.

PASS: 'build-pkgs --dep-test kubernetes-unversioned'
      package built with dependencies passed

Story: 2008972
Task: 44037

Signed-off-by: kdhokte <kaustubh.dhokte@windriver.com>
Change-Id: Ie53ebb5839eb0bd843f5bb2c577a4292969c0997
2021-11-22 17:50:13 -05:00

5 lines
96 B
YAML

---
kind: KubeletConfiguration
apiVersion: kubelet.config.k8s.io/v1beta1
cgroupDriver: cgroupfs