Using the new github docker registry containerd kubernetes can't pull image but using docker engine based k8s works fine.
Steps to reproduce the issue:
- Create a secret with github docker registry token
Follow instructions here:
https://help.github.com/en/articles/configuring-docker-for-use-with-github-package-registry#authenticating-to-github-package-registry
Using kubectl
kubectl create secret docker-registry regcred --docker-server=https://docker.pkg.github.com --docker-username=<user | org>--docker-password=15650cad4e8a6602284255f7caf76134eb977b45 --docker-email=<email>
- Create pod.yaml
apiVersion: v1
kind: Pod
metadata:
name: private-reg
spec:
containers:
- name: private-reg-container
image: docker.pkg.github.com/csantanapr/docker/knative-samples_helloworld-go
imagePullSecrets:
- name: regcred
- Create a pod
kubectl apply -f pod.yaml
Describe the results you received:
Errors for the Pod pulling image
31s Normal Pulling Pod pulling image "docker.pkg.github.com/csantanapr/docker/knative-samples_helloworld-go"
31s Warning Failed Pod Failed to pull image "docker.pkg.github.com/csantanapr/docker/knative-samples_helloworld-go": rpc error: code = Unknown desc = failed to resolve image "docker.pkg.github.com/csantanapr/docker/knative-samples_helloworld-go:latest": no available registry endpoint: docker.pkg.github.com/csantanapr/docker/knative-samples_helloworld-go:latest not found
31s Warning Failed Pod Error: ErrImagePull
3s Normal BackOff Pod Back-off pulling image "docker.pkg.github.com/csantanapr/docker/knative-samples_helloworld-go"
3s Warning Failed Pod Error: ImagePullBackOff
Describe the results you expected:
Pod is in Running State
Here is the output when running same scenario on minikube with docker engine
Normal Pulling 2m58s kubelet, minikube Pulling image "docker.pkg.github.com/csantanapr/docker/knative-samples_helloworld-go"
Normal Pulled 2m48s kubelet, minikube Successfully pulled image "docker.pkg.github.com/csantanapr/docker/knative-samples_helloworld-go"
Normal Created 2m48s kubelet, minikube Created container private-reg-container
Normal Started 2m47s kubelet, minikube Started container private-reg-container
Output of containerd --version:
I'm running on IKS here is the version 1.2.6 when running kubectl get nodes -o wide
kubectl get nodes -o wide
NAME STATUS ROLES AGE VERSION INTERNAL-IP EXTERNAL-IP OS-IMAGE KERNEL-VERSION CONTAINER-RUNTIME
10.187.176.105 Ready <none> 18d v1.13.5+IKS 10.187.176.105 169.*.*.* Ubuntu 18.04.2 LTS 4.15.0-47-generic containerd://1.2.6
Using the new github docker registry containerd kubernetes can't pull image but using docker engine based k8s works fine.
Steps to reproduce the issue:
Follow instructions here:
https://help.github.com/en/articles/configuring-docker-for-use-with-github-package-registry#authenticating-to-github-package-registry
Using kubectl
kubectl apply -f pod.yamlDescribe the results you received:
Errors for the Pod pulling image
Describe the results you expected:
Pod is in Running State
Here is the output when running same scenario on minikube with docker engine
Output of
containerd --version:I'm running on IKS here is the version
1.2.6when runningkubectl get nodes -o wide