# Kubernetes Cluster Deployment from a private docker registry

**URL:** <https://discuss.kubernetes.io/t/kubernetes-cluster-deployment-from-a-private-docker-registry/7159>\
**Category:** General Discussions\
**Created:** [July 16, 2019, 5:07am UTC](https://discuss.kubernetes.io/t/kubernetes-cluster-deployment-from-a-private-docker-registry/7159 "2019-07-16T05:07:55Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Chaminda\_Divitotawel](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.kubernetes.io/chaminda_divitotawel/32/3328_2.png) [@Chaminda\_Divitotawel](https://discuss.kubernetes.io/u/Chaminda_Divitotawel)\
**Post date:** [July 16, 2019, 5:07am UTC](https://discuss.kubernetes.io/t/kubernetes-cluster-deployment-from-a-private-docker-registry/7159/1 "2019-07-16T05:07:55Z")

</div>

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](https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/) 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

---

<div class="post-metadata">

**Author:** ![Chaminda\_Divitotawel](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.kubernetes.io/chaminda_divitotawel/32/3328_2.png) [@Chaminda\_Divitotawel](https://discuss.kubernetes.io/u/Chaminda_Divitotawel)\
**Post date:** [July 16, 2019, 5:36am UTC](https://discuss.kubernetes.io/t/kubernetes-cluster-deployment-from-a-private-docker-registry/7159/2 "2019-07-16T05:36:09Z")

</div>

I have figured out part of it. It looks that, Kubelet may not be directly access registry. I have found permission denied error on docker logs as well. So its seems to be an permission issue which is bit silly.
