Skip to content

Commit

Permalink
Merge pull request #10535 from BLasan/issue-10143
Browse files Browse the repository at this point in the history
Fix minikube kubectl context switching
  • Loading branch information
medyagh authored Feb 20, 2021
2 parents bce74a8 + 01d47d6 commit 9d9aecc
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cmd/minikube/cmd/kubectl.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ minikube kubectl -- get pods --namespace kube-system`,
co := mustload.Healthy(ClusterFlagValue())

version := co.Config.KubernetesConfig.KubernetesVersion

cluster := []string{"--cluster", ClusterFlagValue()}
args = append(args, cluster...)

c, err := KubectlCommand(version, args...)
if err != nil {
out.ErrLn("Error caching kubectl: %v", err)
Expand Down

0 comments on commit 9d9aecc

Please sign in to comment.