K8s 1.23.14 (default) deployment fails
Created by: chess-knight
Similar problem to #303 (closed).
Deployment gets stuck during bootstrap of first control plane because coredns container image cannot be pulled.
Example log of containerd on control plane:
Jan 25 10:46:36 capi-testcluster-control-plane-genc01-dcck4 containerd[545]: time="2023-01-25T10:46:36.830350539Z" level=info msg="PullImage \"registry.k8s.io/coredns:v1.8.6\""
Jan 25 10:46:37 capi-testcluster-control-plane-genc01-dcck4 containerd[545]: time="2023-01-25T10:46:37.554457011Z" level=error msg="PullImage \"registry.k8s.io/coredns:v1.8.6\" failed" error="rpc error: code = NotFound desc = failed to pull and unpack image \"registry.k8s.io/coredns:v1.8.6\": failed to resolve reference \"registry.k8s.io/coredns:v1.8.6\": registry.k8s.io/coredns:v1.8.6: not found"
I tested it and it seems that registry.k8s.io is used only from v1.23.15.
This also applies to v1.22.17 and v1.24.9.
PR #313 only checks major and minor versions, which seems insufficient.
I found that it was is fixed in cluster-api v1.2.9 so maybe we do not need this registry patching logic at all. Maybe we also don't need imageRepository
in the KubeadmControlPlane spec. This issue in cluster-api is probably also related.