Is it possible to construct kubeadm to use the image from the docker-engine?

  docker, kubeadm

Basically, the kubeadm-cluster is to be created offline. The required images were loaded in docker as given below. However, the kubeadm init command below still tries to pull images from the remote. Is it possible to construct kubeadm to use the image from the docker-engine? Thanks in advance.

$ kubeadm version
kubeadm version: &version.Info{Major:"1", Minor:"21", GitVersion:"v1.21.0", GitCommit:"cb303e613a121a29364f75cc67d3d580833a7479", GitTreeState:"clean", BuildDate:"2021-04-08T16:30:03Z", GoVersion:"go1.16.1", Compiler:"gc", Platform:"linux/amd64"}

$ docker image ls | grep google
registry.cn-hangzhou.aliyuncs.com/google_containers/kube-apiserver            v1.21.0        4d217480042e   3 weeks ago     126MB
registry.cn-hangzhou.aliyuncs.com/google_containers/kube-proxy                v1.21.0        38ddd85fe90e   3 weeks ago     122MB
registry.cn-hangzhou.aliyuncs.com/google_containers/kube-controller-manager   v1.21.0        09708983cc37   3 weeks ago     120MB
registry.cn-hangzhou.aliyuncs.com/google_containers/kube-scheduler            v1.21.0        62ad3129eca8   3 weeks ago     50.6MB
registry.cn-hangzhou.aliyuncs.com/google_containers/pause                     3.4.1          0f8457a4c2ec   3 months ago    683kB
registry.cn-hangzhou.aliyuncs.com/google_containers/coredns                   1.8.0          296a6d5035e2   6 months ago    42.5MB
registry.cn-hangzhou.aliyuncs.com/google_containers/etcd                      3.4.13-0       0369cf4303ff   8 months ago    253MB

$ kubeadm init --ignore-preflight-errors=Swap  --image-repostiory registry.cn-hangzhou.aliyuncs.com/google_containers
[preflight] Running pre-flight checks
        [WARNING Swap]: running with swap on is not supported. Please disable swap
[preflight] Pulling images required for setting up a Kubernetes cluster
[preflight] This might take a minute or two, depending on the speed of your internet connection
[preflight] You can also perform this action in beforehand using 'kubeadm config images pull'

Source: Docker Questions

LEAVE A COMMENT