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

start '--embed-certs' fails to find certs #5716

Closed
nixpanic opened this issue Oct 24, 2019 · 12 comments
Closed

start '--embed-certs' fails to find certs #5716

nixpanic opened this issue Oct 24, 2019 · 12 comments
Labels
co/none-driver help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/bug Categorizes issue or PR as related to a bug. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete.

Comments

@nixpanic
Copy link
Member

The exact command to reproduce the issue:

As root: ./minikube start --vm-driver=none --embed-certs
Run this on a clean CentOS-7 installation with Docker started/enabled.

The full output of the command that failed:

./minikube start --vm-driver=none --embed-certs
😄  minikube v1.4.0 on Centos 7.6.1810
🤹  Running on localhost (CPUs=2, Memory=3789MB, Disk=40939MB) ...
ℹ️   OS release is CentOS Linux 7 (Core)
🐳  Preparing Kubernetes v1.16.0 on Docker 1.13.1 ...

💣  Failed to setup kubeconfig: reading CertificateAuthority /root/.minikube/ca.crt: open /root/.minikube/ca.crt: no such file or directory

😿  Sorry that minikube crashed. If this was unexpected, we would love to hear from you:
👉  https://github.com/kubernetes/minikube/issues/new/choose
@khassel
Copy link

khassel commented Oct 27, 2019

Can confirm this strange bug in v1.4.0.

After cleaning up (minikube delete, rm -rf ~/.minikube ) you can try to minikube start --vm-driver=none without the certs-param.

If the cluster starts, then minikube delete and now minikube start --vm-driver=none --embed-certs should work.

@medyagh medyagh added the triage/needs-information Indicates an issue needs more information in order to work on it. label Oct 30, 2019
@medyagh
Copy link
Member

medyagh commented Oct 30, 2019

@nixpanic does @khassel 's suggestion help ?

@khassel
Copy link

khassel commented Oct 31, 2019

This Problem exists in v1.5.0 and v1.5.1 and v1.5.2 too.

For reproducing this error with v1.5.2:

Save the following lines to a Dockerfile

FROM centos:7

RUN yum install -y yum-utils device-mapper-persistent-data lvm2

RUN yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo

RUN yum install -y docker-ce docker-ce-cli containerd.io nano

RUN echo "#!/bin/bash" > /usr/bin/systemctl; \
    echo "exit 0" >> /usr/bin/systemctl; \
    cp /usr/bin/systemctl /usr/bin/sudo;

RUN curl -o /usr/local/bin/minikube -L https://github.com/kubernetes/minikube/releases/download/v1.5.2/minikube-linux-amd64

RUN chmod +x /usr/local/bin/minikube

Build the image with docker build -t centos_minikube:latest .
Start the image with docker run -it -v /var/run/docker.sock:/var/run/docker.sock centos_minikube:latest bash

Run minikube start --vm-driver=none --embed-certs

Result:

[root@b58295dc9d9f /]# minikube start --vm-driver=none --embed-certs
* minikube v1.5.2 on Centos 7.6.1810 (docker/amd64)
* Running on localhost (CPUs=4, Memory=3944MB, Disk=59211MB) ...
* OS release is CentOS Linux 7 (Core)
! VM may be unable to resolve external DNS records
* Preparing Kubernetes v1.16.2 on Docker '19.03.4' ...
* 
X Failed to setup kubeconfig: reading CertificateAuthority /root/.minikube/ca.crt: open /root/.minikube/ca.crt: no such file or directory
* 
* Sorry that minikube crashed. If this was unexpected, we would love to hear from you:
  - https://github.com/kubernetes/minikube/issues/new/choose

@khassel
Copy link

khassel commented Oct 31, 2019

ls -la /root/.minikube after minikube start --vm-driver=none --download-only command:

[root@e3f7db0901fa ~]# ls -la .minikube/
total 40
drwxr-xr-x 10 root root 4096 Oct 31 23:05 .
dr-xr-x---  1 root root 4096 Oct 31 23:05 ..
drwxr-xr-x  2 root root 4096 Oct 31 23:05 addons
drwxr-xr-x  4 root root 4096 Oct 31 23:05 cache
drwxr-xr-x  2 root root 4096 Oct 31 23:05 certs
drwxr-xr-x  2 root root 4096 Oct 31 23:05 config
drwxr-xr-x  2 root root 4096 Oct 31 23:05 files
drwxr-xr-x  2 root root 4096 Oct 31 23:05 logs
drwxr-xr-x  2 root root 4096 Oct 31 23:05 machines
drwx------  3 root root 4096 Oct 31 23:05 profiles

ls -la /root/.minikube after minikube start --vm-driver=none command:

[root@e3563efa6f99 /]# ls -la /root/.minikube
total 92
drwxr-xr-x 1 root root 4096 Oct 31 23:14 .
dr-xr-x--- 1 root root 4096 Oct 31 23:14 ..
drwxr-xr-x 2 root root 4096 Oct 31 23:05 addons
-rw-r--r-- 1 root root 1298 Oct 31 23:14 apiserver.crt
-rw------- 1 root root 1679 Oct 31 23:14 apiserver.key
-rw-r--r-- 1 root root 1066 Oct 31 23:14 ca.crt
-rw------- 1 root root 1675 Oct 31 23:14 ca.key
drwxr-xr-x 4 root root 4096 Oct 31 23:05 cache
drwxr-xr-x 1 root root 4096 Oct 31 23:14 certs
-rw-r--r-- 1 root root 1103 Oct 31 23:14 client.crt
-rw------- 1 root root 1679 Oct 31 23:14 client.key
drwxr-xr-x 1 root root 4096 Oct 31 23:15 config
drwxr-xr-x 2 root root 4096 Oct 31 23:05 files
drwxr-xr-x 2 root root 4096 Oct 31 23:05 logs
drwxr-xr-x 1 root root 4096 Oct 31 23:15 machines
drwx------ 1 root root 4096 Oct 31 23:15 profiles
-rw-r--r-- 1 root root 1074 Oct 31 23:14 proxy-client-ca.crt
-rw------- 1 root root 1675 Oct 31 23:14 proxy-client-ca.key
-rw-r--r-- 1 root root 1103 Oct 31 23:14 proxy-client.crt
-rw------- 1 root root 1675 Oct 31 23:14 proxy-client.key

So e.g. the ca.crt seems to be excpected by minikube start --vm-driver=none --embed-certs but is not created at this time.

@medyagh medyagh added the kind/bug Categorizes issue or PR as related to a bug. label Nov 4, 2019
@medyagh
Copy link
Member

medyagh commented Nov 4, 2019

@khassel thank you so much for providing more information ! this does seem to be a bug ! and I apperciate you taking the time to report it instead of ignoring it !

@khassel have you checked if this issue exists for other drivers as well ?

@medyagh medyagh changed the title 'minikube start --vm-driver=none --embed-certs' fails to find certs start with '--embed-certs' fails to find certs. Nov 4, 2019
@medyagh medyagh added co/none-driver priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. and removed triage/needs-information Indicates an issue needs more information in order to work on it. labels Nov 4, 2019
@medyagh
Copy link
Member

medyagh commented Nov 4, 2019

update: for me it the embed cert works on hypert kit.

so it seems to be a none issue !

@medyagh medyagh changed the title start with '--embed-certs' fails to find certs. start with '--embed-certs' fails to find certs Nov 4, 2019
@medyagh medyagh changed the title start with '--embed-certs' fails to find certs start '--embed-certs' fails to find certs Nov 4, 2019
@medyagh medyagh added the help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. label Nov 4, 2019
@khassel
Copy link

khassel commented Nov 4, 2019

@khassel have you checked if this issue exists for other drivers as well ?

no, only for --vm-driver=none. But checked it for other os, same problem in fedora30.

@tstromberg tstromberg added priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. and removed priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. labels Dec 9, 2019
@martinhartig
Copy link

same issue with minikube 1.6.2 on Windows using Hyper-V

@MingyiLiang
Copy link

MingyiLiang commented Jan 23, 2020

minikube v1.6.2 on Ubuntu18.10 still have this bug when embed-certs set as true using VirtualBox

@bhundven
Copy link

Still an issue on Debian 10.3 using kvm2 driver with minikube 1.7.2.

@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label May 15, 2020
@medyagh
Copy link
Member

medyagh commented May 20, 2020

@nixpanic

@MingyiLiang I believe this was fixed in latest version. do you mind trying with the latest version?

@medyagh medyagh closed this as completed May 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
co/none-driver help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/bug Categorizes issue or PR as related to a bug. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete.
Projects
None yet
Development

No branches or pull requests

9 participants