Skip to content
This repository has been archived by the owner on Mar 2, 2023. It is now read-only.

Permission denied when pushing to ECR using skaffold (ecr credential helper works) #277

Open
NotSoShaby opened this issue Nov 11, 2019 · 0 comments

Comments

@NotSoShaby
Copy link

I am following the guide here
and trying to use ECR as a repo i followed the direction for credentials helper. I tested it and it works from terminal using a simple `docker push /<IMAGE_NAME>: . but using skaffold, the push fails on auth issue

Expected behavior
skaffold will be able to push as long as amazon-ecr-credential-helper is configured properly

Actual behavior
docker push works, but skaffold fails pushing

Information
Skaffold version: 1.0
Operating system: macOS Mojave
Contents of skaffold.yaml:

apiVersion: skaffold/v1alpha2
kind: Config
build:
  tagPolicy:
    envTemplate:
      template: "{{.BASE_TAG}}"
  artifacts:
  - imageName: <ECR REGISTRY>/<IMAGE_NAME>
    workspace: ..
    docker:
      dockerfilePath: ./BaseDockerfile
  local:
deploy:
  kubectl:
    manifests:
      - k8s-*

k8s-celery-pod.yaml

apiVersion: v1
kind: Pod
metadata:
  name: celery
spec:
  containers:
  - name: celery
    image: <ECR REGISTRY>/<IMAGE_NAME>:<BASE_TAG>  
    command: "pipenv run celery worker -c 4 -l INFO -A autoai.celery.core.celery"

Error i get:

FATA[0011] exiting dev mode because first build failed: pushing image: denied: requested access to the resource is denied
docker push <ECR REGISTRY>/<IMAGE_NAME>:<BASE_TAG> in the same environment works fine

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant