diff --git a/changelog/changes/2023-10-09-kubernetes-usr-libexec.md b/changelog/changes/2023-10-09-kubernetes-usr-libexec.md new file mode 100644 index 00000000000..6c2d51a80f0 --- /dev/null +++ b/changelog/changes/2023-10-09-kubernetes-usr-libexec.md @@ -0,0 +1 @@ +- To make Kubernetes work by default, `/usr/libexec/kubernetes/kubelet-plugins/volume/exec` is now a symlink to the writable folder `/var/kubernetes/kubelet-plugins/volume/exec` ([Flatcar#1193](https://github.com/flatcar/Flatcar/issues/1193)) diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-base/misc-files/misc-files-0-r2.ebuild b/sdk_container/src/third_party/coreos-overlay/coreos-base/misc-files/misc-files-0-r2.ebuild index 77d53306889..ce1111ac7f1 100644 --- a/sdk_container/src/third_party/coreos-overlay/coreos-base/misc-files/misc-files-0-r2.ebuild +++ b/sdk_container/src/third_party/coreos-overlay/coreos-base/misc-files/misc-files-0-r2.ebuild @@ -142,4 +142,9 @@ src_install() { # Enable some sockets that aren't enabled by their own ebuilds. systemd_enable_service sockets.target sshd.socket fi + + # Create a symlink for Kubernetes to redirect writes from /usr/libexec/... to /var/kubernetes/... + # (The below keepdir will result in a tmpfiles entry in base_image_var.conf) + keepdir /var/kubernetes/kubelet-plugins/volume/exec + dosym /var/kubernetes/kubelet-plugins/volume/exec /usr/libexec/kubernetes/kubelet-plugins/volume/exec }