I deploy a local cluster on bare-metal using both Kontena pharos tool and kubeadm successfully. Both these tools retrieve essential kubernetes containers from public container registries. However I need to store the same container images (etcd, kube-apiserver) in a private registry which has authentication. I have pushed the images with same name to private registry.
When I perform deployment by specifying the option --image-repository= kubelet cannot pull images. In the boxes docker config has the credentials and I can pull same images using docker pull command. It appears kubelet directly interact with the registry and it fails indicating permission denied.
I wonder how I can setup Kubernetes cluster so that container images are pulled from a secure private registry. I have checked the page Pull an Image from a Private Registry - Kubernetes which seems applicable for running cluster than bootstrapping cluster.
Cluster information:
Kubernetes version: v1.14.3
Cloud being used: bare-metal
Installation method: Kontena Pharos / Kubeadm
Host OS: Ubuntu 16.04
CNI and version: weave-2.5.2
CRI and version: docker-18.06.1-ce