skaffold: [1.17+] Build does not push images to remote repository

Expected behavior

Check for tag in remote repository and push images.

Actual behavior

Builds and tags images but does not push. Helm upgrade fails trying to pull image that doesn’t exist.

Information

  • Skaffold version: 1.17+
  • Operating system: Windows 10
  • Contents of skaffold.yaml:
apiVersion: skaffold/v2beta7
kind: Config

profiles:
- name: test
  build:
    local:
        push:
    tagPolicy:
      gitCommit:
        prefix: test-
    artifacts:
    - image: <account>.dkr.ecr.us-east-1.amazonaws.com/main-web-nginx
      context: .
      docker:
        dockerfile: deploy/docker/nginx.Dockerfile
    - image: <account>.dkr.ecr.us-east-1.amazonaws.com/main-web-phpfpm
      context: .
      docker:
        dockerfile: deploy/docker/php.Dockerfile
  deploy:
    kubeContext: prod-main
    helm:
      releases:
      - name: main-web
        chartPath: ./deploy/helm/main-web
        namespace: test
        artifactOverrides:
          nginx.image: <account>.dkr.ecr.us-east-1.amazonaws.com/main-web-nginx
          phpfpm.image: <account>.dkr.ecr.us-east-1.amazonaws.com/main-web-phpfpm

Steps to reproduce the behavior

  1. skaffold run -p test

This has been working up to version 1.17. I’m not sure of any missing configuration requirements.

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 17 (8 by maintainers)

Most upvoted comments

I’m seeing this too on GHCR. I’ve narrowed it down to using the --kube-context flag to a remote cluster, but having your current context in kubectl set to a local one.

I’ve just experienced the same issue in the same way that @aariacarterweir posted. Explicitly setting kube context to a remote cluster before running skaffold works as expected.

i’m investigating this one now to see what changed, our logic to determine whether a cluster is local or not is a bit tangled. while i’m doing that though, @othercorey the section of your skaffold.yaml for specifying push isn’t actually doing anything:

local:
  push: <- this is empty, so skaffold interprets it as false

instead, if you change it to

local:
  push: true

it should force a push.

still does seem like something has changed related to cluster detection, so i’ll keep looking into it.

I’m seeing this too on GHCR. I’ve narrowed it down to using the --kube-context flag to a remote cluster, but having your current context in kubectl set to a local one.