-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
minikube kubectl
--arguments and stdin for apply -f -
not possible
#4333
Comments
You will need to use a single -- to terminate the minikube arguments, before you can start to add the ones for the kubectl
EDIT: Managed to get this wrong, it should have been:
Then again $ minikube -- kubectl version --client
minikube version: v1.1.0
$ minikube kubectl -- version --client
Client Version: version.Info{Major:"1", Minor:"14", GitVersion:"v1.14.2", GitCommit:"66049e3b21efe110454d67df4fa62b08ea79a19b", GitTreeState:"clean", BuildDate:"2019-05-16T16:23:09Z", GoVersion:"go1.12.5", Compiler:"gc", Platform:"linux/amd64"} |
|
The second command is what I expect to get but that notation doesn't work for |
|
But it does not work for I think, that of my original post, version 3 would be the best option because it gives the most flexibility (e.g.: aliasing |
Will look into this bug, looks like an oversight: c := exec.Command(path, args...)
c.Stdout = os.Stdout
c.Stderr = os.Stderr
if err := c.Run(); err != nil { i.e. there is no "os.Stdin" passed to the command. |
The exact command to reproduce the issue:
$ minikube kubectl version --short
$ echo "foo:" | minikube kubectl apply -f -
$ echo "foo:" | minikube kubectl -- apply -f -
$ echo "foo:" | minikube kubectl apply -- -f -
$ minikube -- kubectl version --short
The full output of the command that failed:
Error: unknown flag: --short
Error: unknown shorthand flag: 'f' in -f
error: no objects passed to apply
error: no objects passed to apply
minikube version: v1.1.0
The expected output of the command that failed:
minikube kubectl -- version --short
:echo "foo:" | kubectl apply -f -
:error: error validating "STDIN": error validating data: [apiVersion not set, kind not set]; if you choose to ignore these errors, turn validation off with --validate=false
echo "foo:" | kubectl apply -f -
:error: error validating "STDIN": error validating data: [apiVersion not set, kind not set]; if you choose to ignore these errors, turn validation off with --validate=false
echo "foo:" | kubectl apply -f -
:error: error validating "STDIN": error validating data: [apiVersion not set, kind not set]; if you choose to ignore these errors, turn validation off with --validate=false
minikube kubectl -- version --short
:The output of the
minikube logs
command:The operating system version:
minikube kubectl
The text was updated successfully, but these errors were encountered: