kubeadm: "kubeadm config images pull" should not pull etcd image if external etcd configured

Is this a BUG REPORT or FEATURE REQUEST?

BUG REPORT

Versions

kubeadm version (use kubeadm version): v1.16.0

Environment:

  • Kubernetes version (use kubectl version): v1.16.0
  • Cloud provider or hardware configuration: hardware
  • OS (e.g. from /etc/os-release): CentOS Linux 7
  • Kernel (e.g. uname -a): 3.10.0-957.21.3
  • Others:

What happened?

A v1.16.0 HA cluster was configured with kubeadm, using external etcd nodes. Later, in preparation for upgrading to v1.16.1, the following command was run to download the images: kubeadm config images pull --kubernetes-version v1.16.1

What you expected to happen?

Since the cluster was configured with external etcd nodes, the etcd image should not be pulled. When the initial installation was done, the following command is smart enough to not pull the etcd image if the kubeadm.yaml file specifies external etcd configuration: kubeadm config images pull --config /etc/kubernetes/kubeadm.yaml

When the “kubeadm config images pull --kubernetes-version <version>” is done on an already installed cluster, it should look at the kubeadm-config config map and see that it specifies external etcd configuration and avoid pulling the etcd image.

How to reproduce it (as minimally and precisely as possible)?

Install a v1.16.0 cluster using kubeadm and external etcd nodes. Then run the following command: kubeadm config images pull --kubernetes-version v1.16.1

Anything else we need to know?

This is a problem in the case where the kubernetes images are being pulled from a private docker registry (not k8s.gcr.io). In that case, the private registry may not have the etcd image, since it isn’t required if external etcd is configured.

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 23 (14 by maintainers)

Most upvoted comments

This is a problem in the case where the kubernetes images are being pulled from a private docker registry (not k8s.gcr.io). In that case, the private registry may not have the etcd image, since it isn’t required if external etcd is configured.

i think etcd should not be pulled during init, join and upgrade commands if external etcd is used? isn’t kubeadm already skipping it in that case?

kubeadm config images pull …

i personally think this command is a best effort to prepull all required images. if you wish to pull only the ones you need, that would be a job for:

kubeadm config images list ...
docker pull ...

kubeadm 1.17 will also have JSON/YAML format for list.