diff --git a/packaging/flavorgen/flavors/generators.go b/packaging/flavorgen/flavors/generators.go index bed5b6ca3d..bbe5266706 100644 --- a/packaging/flavorgen/flavors/generators.go +++ b/packaging/flavorgen/flavors/generators.go @@ -90,6 +90,8 @@ systemd: # kubeadm must run after coreos-metadata populated /run/metadata directory. Requires=coreos-metadata.service After=coreos-metadata.service + # kubeadm must run after containerd - see https://github.com/kubernetes-sigs/image-builder/issues/939. + After=containerd.service [Service] # Make metadata environment variables available for pre-kubeadm commands. EnvironmentFile=/run/metadata/*` diff --git a/templates/cluster-template-ignition.yaml b/templates/cluster-template-ignition.yaml index d4747e4f4e..390669d3bc 100644 --- a/templates/cluster-template-ignition.yaml +++ b/templates/cluster-template-ignition.yaml @@ -189,6 +189,8 @@ spec: # kubeadm must run after coreos-metadata populated /run/metadata directory. Requires=coreos-metadata.service After=coreos-metadata.service + # kubeadm must run after containerd - see https://github.com/kubernetes-sigs/image-builder/issues/939. + After=containerd.service [Service] # Make metadata environment variables available for pre-kubeadm commands. EnvironmentFile=/run/metadata/* @@ -284,6 +286,8 @@ spec: # kubeadm must run after coreos-metadata populated /run/metadata directory. Requires=coreos-metadata.service After=coreos-metadata.service + # kubeadm must run after containerd - see https://github.com/kubernetes-sigs/image-builder/issues/939. + After=containerd.service [Service] # Make metadata environment variables available for pre-kubeadm commands. EnvironmentFile=/run/metadata/* diff --git a/test/e2e/data/infrastructure-vsphere/main/ignition/ignition.yaml b/test/e2e/data/infrastructure-vsphere/main/ignition/ignition.yaml index 1fe8c26c44..7717a696a8 100644 --- a/test/e2e/data/infrastructure-vsphere/main/ignition/ignition.yaml +++ b/test/e2e/data/infrastructure-vsphere/main/ignition/ignition.yaml @@ -122,6 +122,8 @@ spec: # kubeadm must run after coreos-metadata populated /run/metadata directory. Requires=coreos-metadata.service After=coreos-metadata.service + # kubeadm must run after containerd - see https://github.com/kubernetes-sigs/image-builder/issues/939. + After=containerd.service [Service] # Make metadata environment variables available for pre-kubeadm commands. EnvironmentFile=/run/metadata/* @@ -211,6 +213,8 @@ spec: # kubeadm must run after coreos-metadata populated /run/metadata directory. Requires=coreos-metadata.service After=coreos-metadata.service + # kubeadm must run after containerd - see https://github.com/kubernetes-sigs/image-builder/issues/939. + After=containerd.service [Service] # Make metadata environment variables available for pre-kubeadm commands. EnvironmentFile=/run/metadata/*