Skip to content

Commit 9d9aecc

Browse files
authored
Merge pull request #10535 from BLasan/issue-10143
Fix minikube kubectl context switching
2 parents bce74a8 + 01d47d6 commit 9d9aecc

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

cmd/minikube/cmd/kubectl.go

+4
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@ minikube kubectl -- get pods --namespace kube-system`,
4343
co := mustload.Healthy(ClusterFlagValue())
4444

4545
version := co.Config.KubernetesConfig.KubernetesVersion
46+
47+
cluster := []string{"--cluster", ClusterFlagValue()}
48+
args = append(args, cluster...)
49+
4650
c, err := KubectlCommand(version, args...)
4751
if err != nil {
4852
out.ErrLn("Error caching kubectl: %v", err)

0 commit comments

Comments
 (0)