Skip to content

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

Closed
@bkeelan

Description

@bkeelan

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

Metadata

Metadata

Assignees

Labels

cmd/kubectlIssues with the "kubectl" commandkind/bugCategorizes issue or PR as related to a bug.priority/important-soonMust be staffed and worked on either currently, or very soon, ideally in time for the next release.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions