Skip to content

Commit

Permalink
Fix minikube kubectl context switching
Browse files Browse the repository at this point in the history
  • Loading branch information
BLasan committed Feb 20, 2021
1 parent 3512e88 commit 3e98960
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 3e98960

Please sign in to comment.