I checked this issue, #71 , it seems I can not add credentials if kube-apiserver is not running, but after manually pull the private image, and restart kubelet I still get the error.
PullImage "docker.kesci.com:5000/kube-apiserver:latest" from image service failed: rpc error: code = Unknown desc = Error response from daemon: Get https://**my.private.image.registry**/v2/kube-apiserver/manifests/latest: no basic auth credentials
kubeadm version (use kubeadm version
):
Environment:
kubectl version
):Client Version: version.Info{Major:"1", Minor:"7", GitVersion:"v1.7.5", GitCommit:"17d7182a7ccbb167074be7a87f0a68bd00d58d97", GitTreeState:"clean", BuildDate:"2017-08-31T09:14:02Z", GoVersion:"go1.8.3", Compiler:"gc", Platform:"linux/amd64"}
NAME="Ubuntu"
VERSION="16.04.3 LTS (Xenial Xerus)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 16.04.3 LTS"
VERSION_ID="16.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
VERSION_CODENAME=xenial
UBUNTU_CODENAME=xenial
uname -a
):Linux ip-172-31-28-254 4.4.0-92-generic #115-Ubuntu SMP Thu Aug 10 09:04:33 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
I manually replace the image of /etc/kubernetes/manifests/kube-apiserver.yaml
configuration, and kubelet got error container start failed: ErrImagePull: rpc error: code = Unknown desc = Error response from daemon: Get https://my.private.image.registry/v2/kube-apiserver/manifests/latest: no basic auth credentials
,it seems no credentials configured, so I manually docker pull the image
docker pull my.private.image.registry/kube-apiserver:latest
and run service kubelet restart
, still got this error.
kubelet support manually configure credentials or, it can recognize local pulled images.
Replace the /etc/kubernetes/manifests/kube-apiserver.yaml
image with a private registry image.
My solution: docker pull the image and set imagePullPolicy to Never, then restart kubelet.
How do you expect kubeadm to act in this situation? We use official images and do not support custom repos. What is your use case for using a custom image?
@ggaaooppeenngg you should try this:
kubeadm init --config yourconfigfile
, having care to set the imageRepository
option in the config filePlease note that:
For more info you can have a look at https://kubernetes.io/docs/admin/kubeadm/
@jamiehannaford I want to dig some performance issues, and add some tracing logs, so that I can have a check.
Most helpful comment
@ggaaooppeenngg you should try this:
kubeadm init --config yourconfigfile
, having care to set theimageRepository
option in the config filePlease note that:
For more info you can have a look at https://kubernetes.io/docs/admin/kubeadm/