New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
skaffold build: --kube-context flag does not default correctly. #4477
Comments
This could be related to #4347 |
@j-windsor Can you please paste the output of
I want to see if there are any global defaults set. |
Note that this is the managed Skaffold in Cloud Code VSCode
|
I checked to see fi can build with Skaffold without any contexts or minikube and it worked fine: $ rm ~/.kube/config
$ kubectl config get-contexts
CURRENT NAME CLUSTER AUTHINFO NAMESPACE
$ minikube delete
🙄 "minikube" profile does not exist, trying anyways.
💀 Removed all traces of the "minikube" cluster.
$ cd examples/getting-started
$ skaffold build --default-repo briandealwis --cache-artifacts=false
Generating tags...
- skaffold-example -> briandealwis/skaffold-example:v1.12.0-103-gcca734ed5-dirty
Building [skaffold-example]...
[...]
Successfully tagged briandealwis/skaffold-example:v1.12.0-103-gcca734ed5-dirty /me now trying to recover my |
So is the answer here really to change the documented default to show |
@j-windsor so this is a funny situation! Your code is executing:
This appears to using an The docs are correct in that an empty kontext is meant to refer to Arguably you've revealed a bug in that we're not validating the kontext. And ideally we want to keep But you have a valid use-case: we should support builders that don't require a cluster (e.g., Jib and Bazel builds don't require a cluster). Perhaps that would be best addressed by ensuring our |
@briandealwis I think that fix could work! I understand the desire to keep skaffold |
thanks for digging into this one @briandealwis, I think this is exposing several different issues actually:
|
Or maybe we need a way to say ignore minikube and build with the local docker daemon. |
Expected behavior
skaffold build --kube-context=''
andskaffold build
output the same thing, given that the cli docs specify that the default for this command is--kube-context=''
.Actual behavior
skaffold build
seems to take the active context as the kube-context and not''
as documented.When I am trying to deploy images to GCR for a later deployment (to Cloud Run), I am not paying attention to what my active context is, but sometimes it is a stopped minikube cluster. I would expect when running
skaffold build
with the implicit default of--kube-context=''
, it acts as a 'contextless' build that doesn't assume a local build, but I instead get the error...Information
The text was updated successfully, but these errors were encountered: