Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
519 views
in Technique[技术] by (71.8m points)

kubernetes - 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
question from:https://stackoverflow.com/questions/65876719/skaffold-remote-deployment-does-not-push-to-container-registry

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...