aws-microservices-deploy-options icon indicating copy to clipboard operation
aws-microservices-deploy-options copied to clipboard

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

Open NotSoShaby opened this issue 5 years ago • 0 comments

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

NotSoShaby avatar Nov 11 '19 11:11 NotSoShaby