diff --git a/cluster-provision/k8s/1.30/k8s_provision.sh b/cluster-provision/k8s/1.30/k8s_provision.sh index 1bd17aa06c..a8405447cb 100755 --- a/cluster-provision/k8s/1.30/k8s_provision.sh +++ b/cluster-provision/k8s/1.30/k8s_provision.sh @@ -148,9 +148,14 @@ patch $cni_manifest_ipv6 $cni_ipv6_diff cp /tmp/local-volume.yaml /provision/local-volume.yaml +# Create drop-in config files for kubelet +# https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/#kubelet-conf-d +kubelet_conf_d="/etc/kubernetes/kubelet.conf.d" +mkdir -m 644 $kubelet_conf_d + # TODO use config file! this is deprecated cat </etc/sysconfig/kubelet -KUBELET_EXTRA_ARGS=--cgroup-driver=systemd --runtime-cgroups=/systemd/system.slice --fail-swap-on=false --kubelet-cgroups=/systemd/system.slice +KUBELET_EXTRA_ARGS=--cgroup-driver=systemd --runtime-cgroups=/systemd/system.slice --fail-swap-on=false --kubelet-cgroups=/systemd/system.slice --config-dir=$kubelet_conf_d EOT # Enable userfaultfd for centos9 to support post-copy live migration.