Skip to content
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 appends --cluster flag breaking exec commands #10791

Closed
bkeelan opened this issue Mar 12, 2021 · 1 comment · Fixed by #10793
Closed

minikube kubectl appends --cluster flag breaking exec commands #10791

bkeelan opened this issue Mar 12, 2021 · 1 comment · Fixed by #10793
Assignees
Labels
cmd/kubectl Issues with the "kubectl" command kind/bug Categorizes issue or PR as related to a bug. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release.
Milestone

Comments

@bkeelan
Copy link

bkeelan commented Mar 12, 2021

Looks like #10535 may have introduced a bug

[minikube] ~ $ minikube kubectl -- --context minikube exec ambassador-84ffc9fdc4-nxp4h -- echo "hello"
hello --cluster minikube

[minikube] ~ $ kubectl --context minikube exec ambassador-84ffc9fdc4-nxp4h -- echo "hello"
hello

This causes issues when trying to run exec commands because the --cluster flag is always appended to the end leading to issues such as

[minikube] ~ $ minikube kubectl -- --context minikube exec mysql-db-79b945965d-gtzf7 -- mysqladmin ping

mysqladmin: [ERROR] unknown option '--cluster'
command terminated with exit code 2
[minikube] ~ $ minikube version
minikube version: v1.18.1
commit: 09ee84d530de4a92f00f1c5dbc34cead092b95bc
@afbjorklund
Copy link
Collaborator

I have noticed this as well, ever since the introduction of that extra -- in exec.

kubectl exec [POD] [COMMAND] is DEPRECATED and will be removed in a future version. Use kubectl exec [POD] -- [COMMAND] instead.

@afbjorklund afbjorklund added kind/bug Categorizes issue or PR as related to a bug. cmd/kubectl Issues with the "kubectl" command labels Mar 12, 2021
@afbjorklund afbjorklund added the priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. label Mar 12, 2021
@medyagh medyagh added this to the v.1.19.0 milestone Mar 12, 2021
@afbjorklund afbjorklund self-assigned this Mar 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cmd/kubectl Issues with the "kubectl" command kind/bug Categorizes issue or PR as related to a bug. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants