diff --git a/roles/download/templates/kubeadm-images.yaml.j2 b/roles/download/templates/kubeadm-images.yaml.j2 index 565533087..c2068d2fc 100644 --- a/roles/download/templates/kubeadm-images.yaml.j2 +++ b/roles/download/templates/kubeadm-images.yaml.j2 @@ -21,5 +21,5 @@ etcd: {% endif %} dns: type: CoreDNS - imageRepository: {{ coredns_image_repo | regex_replace('/coredns.*$','') }} + imageRepository: {{ coredns_image_repo | regex_replace('/coredns(?!/coredns).*$','') }} imageTag: {{ coredns_image_tag }} diff --git a/roles/kubernetes/control-plane/templates/kubeadm-config.v1beta2.yaml.j2 b/roles/kubernetes/control-plane/templates/kubeadm-config.v1beta2.yaml.j2 index c329fcabe..001a399ea 100644 --- a/roles/kubernetes/control-plane/templates/kubeadm-config.v1beta2.yaml.j2 +++ b/roles/kubernetes/control-plane/templates/kubeadm-config.v1beta2.yaml.j2 @@ -84,7 +84,7 @@ etcd: {% endif %} dns: type: CoreDNS - imageRepository: {{ coredns_image_repo | regex_replace('/coredns.*$','') }} + imageRepository: {{ coredns_image_repo | regex_replace('/coredns(?!/coredns).*$','') }} imageTag: {{ coredns_image_tag }} networking: dnsDomain: {{ dns_domain }}