Search code examples
kubernetesgoogle-container-registryskaffold

Skaffold remote deployment does not push to container registry


In the skaffold documentation it says it will auto-detect a local cluster based upon the kubernetes context and, if it is not a local-cluster, it will push to a container repo.

I am running skaffold on a Mac, I do not see that behavior. When I run it with skaffold run on minikube, it does what I expect. But when I change the context to my remote cluster, it does not push the image to the remote container registry. I'm somewhat new to skaffold so I would love any ideas on how to debug this or anything that might cause this behavior.

Edit: adding my ~/.skaffold/config file

global:
  local-cluster: true
  survey:
    last-prompted: "2021-01-18T14:06:13-05:00"
kubeContexts:
- kube-context: minikube
  local-cluster: true

Solution

  • Setting local-cluster: true in your ~/.skaffold/config instructs Skaffold to treat that cluster as a local-cluster. When in the global section, Skaffold will treat all clusters as local.