Ask questionsFailed to push image to Docker Hub
Actual behavior I am running Kubernetes v1.15.5 cluster and I created a Kaniko pod to build and push an image to Docker Hub, here is the pod.yaml:
apiVersion: v1 kind: Pod metadata: name: kaniko spec: containers: - name: kaniko image: gcr.io/kaniko-project/executor:latest args: ["--dockerfile=/workspace/Dockerfile", "--context=dir://workspace", "--destination=zhq527725/test-kaniko"] volumeMounts: - name: kaniko-secret mountPath: /root - name: dockerfile-storage mountPath: /workspace restartPolicy: Never volumes: - name: kaniko-secret secret: secretName: docker-hub items: - key: .dockerconfigjson path: .docker/config.json - name: dockerfile-storage persistentVolumeClaim: claimName: dockerfile-claim
And I created a secret for Kaniko to login Docker Hub:
kubectl create secret docker-registry docker-hub --docker-server=https://index.docker.io/v1/ --docker-username=zhq527725 --docker-password=<my-password> --docker-email=<my-email>
But I found Kaniko pod failed to push to Docker Hub, here is its logs:
error checking push permissions -- make sure you entered the correct tag name, and that you are authenticated correctly, and try again: checking push permission for "index.docker.io/zhq527725/test-kaniko:latest": UNAUTHORIZED: authentication required; [map[Action:pull Class: Name:zhq527725/test-kaniko Type:repository] map[Action:push Class: Name:zhq527725/test-kaniko Type:repository]]
And the I changed the
--destination arg of Kaniko pod from
registry.docker.io/zhq527725/test-kaniko, but it still failed with a different error:
error checking push permissions -- make sure you entered the correct tag name, and that you are authenticated correctly, and try again: checking push permission for "registry.docker.io/zhq527725/test-kaniko:latest": creating push check transport for registry.docker.io failed: unrecognized HTTP status: 503 Service Unavailable
I confirm that I can use
docker push with the same username/password to successfully push image into Docker Hub.
Expected behavior Successfully push images to Docker Hub.
So far, I have tested Kaniko in my Kubernetes cluster against Harbor, Docker Hub and gcr, and I found it only works with gcr.
Answer questions gebi
we just had our kaniko setup stopped working with the same problem
error checking push permissions as reported in #1209 .
Our fix was to just use
mgit/base:kaniko-executor-debug-stable as image which also fixes #656
Is there anything we can help with regarding stabilizing kaniko?