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

Failed to setup kubeconfig: writing kubeconfig: Error writing file : open : no such file or directory #5268

Closed
cs-wang opened this issue Sep 5, 2019 · 3 comments
Labels
kind/support Categorizes issue or PR as a support question.

Comments

@cs-wang
Copy link

cs-wang commented Sep 5, 2019

The exact command to reproduce the issue:

minikube start -v 8 -p hostcluster --kubernetes-version='v1.14.0' --vm-driver=none

The full output of the command that failed:

  • [hostcluster] minikube v1.3.1 on Centos 7.6.1810 (vbox/amd64)
  • Running on localhost (CPUs=4, Memory=3789MB, Disk=37861MB) ...
    Reading certificate data from /root/.minikube/certs/ca.pem
    Decoding PEM data...
    Parsing certificate...
    Reading certificate data from /root/.minikube/certs/cert.pem
    Decoding PEM data...
    Parsing certificate...
    Couldn't set key CPE_NAME, no corresponding struct field found
    Couldn't set key , no corresponding struct field found
    Couldn't set key CENTOS_MANTISBT_PROJECT, no corresponding struct field found
    Couldn't set key CENTOS_MANTISBT_PROJECT_VERSION, no corresponding struct field found
    Couldn't set key REDHAT_SUPPORT_PRODUCT, no corresponding struct field found
    Couldn't set key REDHAT_SUPPORT_PRODUCT_VERSION, no corresponding struct field found
    Couldn't set key , no corresponding struct field found
  • OS release is CentOS Linux 7 (Core)
  • Preparing Kubernetes v1.14.0 on Docker 18.09.6 ...

X Failed to setup kubeconfig: writing kubeconfig: Error writing file : open : no such file or directory
*

The output of the minikube logs command:


*
X Error getting config: stat /root/.minikube/profiles/minikube/config.json: no such file or directory
*

The operating system version:
Linux localhost.localdomain 3.10.0-957.el7.x86_64 #1 SMP Thu Nov 8 23:39:32 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

the /var/log/message
Sep 5 17:37:44 localhost systemd: Started Kubernetes systemd probe.
Sep 5 17:37:44 localhost kubelet: I0905 17:37:44.834372 8748 server.go:417] Version: v1.14.0
Sep 5 17:37:44 localhost kubelet: I0905 17:37:44.835739 8748 plugins.go:103] No cloud provider specified.
Sep 5 17:37:44 localhost kubelet: F0905 17:37:44.835854 8748 server.go:265] failed to run Kubelet: unable to load bootstrap kubeconfig: stat /etc/kubernetes/bootstrap-kubelet.conf: no such file or directory
Sep 5 17:37:44 localhost systemd: kubelet.service: main process exited, code=exited, status=255/n/a
Sep 5 17:37:44 localhost systemd: Unit kubelet.service entered failed state.
Sep 5 17:37:44 localhost systemd: kubelet.service failed.

@tstromberg tstromberg changed the title minikube always crashed Failed to setup kubeconfig: writing kubeconfig: Error writing file : open : no such file or directory Sep 5, 2019
@tstromberg
Copy link
Contributor

I believe this is a dupe of #4100 - which is fixed at head. I suspect this is because there is an invalid KUBECONFIG environment variable set.

Do you mind sharing:

  • The exact command line you used to start minikube
  • The output of env | grep KUBE (if you are using minikube with sudo, then use sudo env | grep KUBE

Please let me know if this helps.

@tstromberg tstromberg added the kind/support Categorizes issue or PR as a support question. label Sep 5, 2019
@cs-wang
Copy link
Author

cs-wang commented Sep 6, 2019

great, problem resolved after unset KUBECONFIG, thanks a lot!!!

@cs-wang cs-wang closed this as completed Sep 6, 2019
@muctarr-rahim
Copy link

How do you unset kubeconfig

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

No branches or pull requests

3 participants