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 commands fail when kubeconfig context not set to minikube #2100

Closed
coollog opened this issue Oct 20, 2017 · 3 comments
Closed

minikube commands fail when kubeconfig context not set to minikube #2100

coollog opened this issue Oct 20, 2017 · 3 comments
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@coollog
Copy link

coollog commented Oct 20, 2017

Is this a BUG REPORT or FEATURE REQUEST?: BUG REPORT

Please provide the following details:

Environment: bash 4.4.12, kubectl v1.7.6

Minikube version: v0.22.3

  • OS: Mac OS X 10.12.6
  • VM Driver: virtualbox
  • ISO version: minikube-v0.23.5.iso

What happened:

minikube service and minikube dashboard fail when kubectl config current-context is not minikube.

What you expected to happen:

The minikube commands should run in the minikube kubeconfig context.

How to reproduce it (as minimally and precisely as possible):

$ minikube status
minikube: Running
cluster: Running
kubectl: Correctly Configured: pointing to minikube-vm at 192.168.99.100

$ kubectl config current-context
my_gke_context

$ minikube service my_service
Error opening service: Could not find finalized endpoint being pointed to by my_service: Error getting kubernetes client: getting clientset: Error creating new client from kubeConfig.ClientConfig(): No Auth Provider found for name "gcp"
@r2d4 r2d4 added the kind/bug Categorizes issue or PR as related to a bug. label Oct 20, 2017
@r2d4
Copy link
Contributor

r2d4 commented Oct 20, 2017

The code for new-ing up the kube client is here https://github.com/kubernetes/minikube/blob/master/pkg/minikube/service/service.go#L64-L78

We probably need to specify the minikube context there.

@mahdix
Copy link
Contributor

mahdix commented Oct 26, 2017

I will pick up this one.

@mahdix
Copy link
Contributor

mahdix commented Oct 27, 2017

PR: #2128
I tested it on Ubuntu and Mac OS before/after change and it seems to be working as expected (When you change current context of Kubectl, still minikube works on minikube context)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

No branches or pull requests

3 participants