Minikube start on Mac throws certificate error when using hyperkit driver - macos

I am getting below error when I try to start a minikube on my Mac.
Command : minikube start
invalid configuration: [unable to read client-cert
/Users/sathishkumar/.minikube/profiles/minikube/client.crt for
minikube due to open
/Users/sathishkumar/.minikube/profiles/minikube/client.crt: no such
file or directory, unable to read client-key
/Users/sathishkumar/.minikube/profiles/minikube/client.key for
minikube due to open
/Users/sathishkumar/.minikube/profiles/minikube/client.key: no such
file or directory]
What is the solution to resolve this issue?.

Try to delete and restart clean minikube. To do so, follow this process:
Delete the minikube cluster (ignore this step if this gives the same error).
$ minikube delete
Now delete the .minikube folder,
$ rm -rf $HOME/.minikube
Now, start the minikube again:
$ minikube start

Tried with
minikube start --driver=virtualbox
And it's working.

minikube start --embed-certs
for your original issue as minikube puts the certs externally to the kubeconfig by default. Using --embed-certs inlines them in the config like Docker Desktop & KinD do.

Related

Deploy jenkins with minikube in windows 10

I am trying to launch a jenkins on minikube on my windows computer.
For this, the first thing I have done has been to install minikube, virtualBox, kubectl and kubernetes-helm.
I have then run the following commands to pull up my minikube container and install jenkins.
minikube --memory 4096 --cpus 2 start --vm-driver=virtualbox
minikube status
helm repo add stable https://charts.helm.sh/stable/
helm upgrade --install myjenkins jenkins/jenkins
When I execute this last command, the following window appears:
My problem is that when I try to execute the command to know the password it gives me an error. I am working on a windows laptop. What would be the way to execute all the commands. With cmd, power shell, git bash?? I have tried to run it with all three and in none of them have I been able to execute the command to find out the password to enter jenkins that does seem to be up.

k8s setup on windows with minikube

PS C:\Users\docker> minikube start
minikube v1.28.0 on Microsoft Windows 10 Pro 10.0.19044 Build 19044
Using the hyperv driver based on existing profile
Starting control plane node minikube in cluster minikube
! StartHost failed, but will try again: error loading existing host. Please try running [minikube delete], then run [minikube start] again: filestore "minikube": open C:\Users\docker.minikube\machines\minikube\config.json: The system cannot find the file specified.
Failed to start hyperv VM. Running "minikube delete" may fix it: error loading existing host. Please try running [minikube delete], then run [minikube start] again: filestore "minikube": open C:\Users\docker.minikube\machines\minikube\config.json: The system cannot find the file specified.
X Exiting due to GUEST_NOT_FOUND: Failed to start host: error loading existing host. Please try running [minikube delete], then run [minikube start] again: filestore "minikube": open C:\Users\docker.minikube\machines\minikube\config.json: The system cannot find the file specified.
Suggestion: minikube is missing files relating to your guest environment. This can be fixed by running 'minikube delete'
Related issue: https://github.com/kubernetes/minikube/issues/9130
PS C:\Users\docker> minikube start
minikube v1.28.0 on Microsoft Windows 10 Pro 10.0.19044 Build 19044
Using the hyperv driver based on existing profile
Starting control plane node minikube in cluster minikube
! StartHost failed, but will try again: error loading existing host. Please try running [minikube delete], then run [minikube start] again: filestore "minikube": open C:\Users\docker.minikube\machines\minikube\config.json: The system cannot find the file specified.
Failed to start hyperv VM. Running "minikube delete" may fix it: error loading existing host. Please try running [minikube delete], then run [minikube start] again: filestore "minikube": open C:\Users\docker.minikube\machines\minikube\config.json: The system cannot find the file specified.
X Exiting due to GUEST_NOT_FOUND: Failed to start host: error loading existing host. Please try running [minikube delete], then run [minikube start] again: filestore "minikube": open C:\Users\docker.minikube\machines\minikube\config.json: The system cannot find the file specified.
Suggestion: minikube is missing files relating to your guest environment. This can be fixed by running 'minikube delete'
Related issue: https://github.com/kubernetes/minikube/issues/9130
PS C:\Users\docker> minikube start --driver=hyperv
minikube v1.28.0 on Microsoft Windows 10 Pro 10.0.19044 Build 19044
Using the hyperv driver based on existing profile
Starting control plane node minikube in cluster minikube
! StartHost failed, but will try again: error loading existing host. Please try running [minikube delete], then run [minikube start] again: filestore "minikube": open C:\Users\docker.minikube\machines\minikube\config.json: The system cannot find the file specified.
Failed to start hyperv VM. Running "minikube delete" may fix it: error loading existing host. Please try running [minikube delete], then run [minikube start] again: filestore "minikube": open C:\Users\docker.minikube\machines\minikube\config.json: The system cannot find the file specified.
X Exiting due to GUEST_NOT_FOUND: Failed to start host: error loading existing host. Please try running [minikube delete], then run [minikube start] again: filestore "minikube": open C:\Users\docker.minikube\machines\minikube\config.json: The system cannot find the file specified.
Suggestion: minikube is missing files relating to your guest environment. This can be fixed by running 'minikube delete'
Related issue: https://github.com/kubernetes/minikube/issues/9130
tried [minikube delete], then run [minikube start] but still the same issue

Minikube with VirtualBox start not working on MacOS Monterey

I have a Minikube K8s cluster that I have been using for a while, but after updating to the latest MacOS Monterey, Minikube fails to start with the following error.
Unable to start the VM: /usr/local/bin/VBoxManage startvm minikube --type headless failed:
So apparently VirtualBox has a bug with Monterey, so I used docker as the driver
docker system prune
minikube delete
minikube start --driver=docker
Be careful while using the prune and delete commands as it'll delete your cluster and unused containers, networks, etc

docker on Mac, mounting volume on any directory fails " Mounts denied: EOF"

a co-worker is having troubles getting any docker volumes to mount on his Mac. It works fine for me, but not him.
we both have same version of Catalina + docker 2020-03-31 2.2.0.5
docker run hello-world works as expected.
from home directory:
docker run -it --rm -v $PWD:/test alpine /bin/sh
runs fine for me but for my co-worker (in his home dir):
docker: Error response from daemon: Mounts denied: EOF.
ERRO[0000] error waiting for container: context canceled
We have tried:
reinstall docker
reset to factory defaults
putting the local dist to mount in many different directories
docker system prune
reboot of entire machine
I'm running out of things to try....
any ideas/suggestions?
things I'm considering: older version of docker, going through the pain of setting up docker via home-brew.
Thanks!

windows minikube kubectl fail to pull image

Very simple. I'm running both docker and minikube on my local machine.
I build a docker image on my windows machine:
docker build -t my-service-image:1.0.0
Then I create a deployment
kubectl create deployment test-node --image=my-service-image:1.0.0
Checking event
kubectl get events
And I see:
Error: ErrImagePull
Error: ImagePullBackOff
The common suggestion to address this issue on linux/mac is to run the following command before building the docker image
eval $(minikube docker-env)
However, as stated, this is a windows machine. What is the easiest way to resolve this issue?
As I see from this blog post, run this command in powershell before building your docker image.
minikube docker-env | Invoke-Expression
I couldn't try it out, as I am running ubuntu. Let us know what is the outcome.
I have very inconvenient but working suggestion for you:
So basically what you can do is:
1) print out all variables to output just using minikube docker-env command
2) set manually all the variables from previous step using set windows command.
Hope this will help.

Resources