aws-samples / aws-microservices-deploy-options

This repo contains a simple application that consists of three microservices. Each application is deployed using different Compute options on AWS.
MIT No Attribution
429 stars 179 forks source link

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

Open NotSoShaby opened 5 years ago

NotSoShaby commented 5 years ago

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 /: . 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