- Lab
- A Cloud Guru
Minikube: Troubleshooting Installation Issues
In this hands on lab we will be attempting to correct a broken Minikube cluster. In this instance the `minikube start` command will not complete. We will need to correct the issue and get the cluster working. I highly recommend that you attempt this lab without looking at the solution or the commands. Good luck!
Path Info
Table of Contents
-
Challenge
Start the Minikube Cluster
Issue the command to start Minikube:
minikube start
The first error we see is a permission denied type, so let's look at permissions:
ls -la
We'll see that the
minikub
directory is owned byroot
, so let's change that:sudo chown -R $USER /home/cloud_user/.minikube
Now when we run
minikub start
again, we get an error about VBoxManage not found. This is because we're set up to download a VM boot image and create a VirtualBox VM. We don't have VitrualBox, because we're already on a cloud user. Our current VM driver is set to VirtualBox (which we can see withminikub config view
), and we've got to change that. We're going to set it tonone
:minikube config set vm-driver none
Now let's try starting again, with this:
sudo minikube start
This time around, we'll get an error about an unspported version of Kubernetes. We need to be running 1.16.1, and it looks like we're trying here to run 1.11.0*. Let's fix that with a configuration command, then try to start Minikub again:
minikube config set kubernetes-version 1.16.1 sudo minikube start
Now we've got an error telling us that the Docker executable is not in the $PATH. Is Docker even installed? Let's fix that and try again:
sudo apt install -y docker.io sudo minikube start
This time, we made it through the install. But wait! What is the status of Minikub? Find out with this:
minikube status
Ahh, we're getting another permission denied error. We don't have permission to open
~/.minikub/machines/minikub/config.json
. We'll get another one if we try to get our pod status:kubectl get po
This error tells us that we don't have permission to access
~/.kube/config
.We will need to take ownership of the
.minikube
and.kube
directories:sudo chown -R $USER /home/cloud_user/.kube sudo chown -R $USER /home/cloud_user/.minikube
Now when we execute
minikub status
, we'll see that everything is running and configured. Thenkubectl get po -A
will show us the cluster, up and running. -
Challenge
Create the Objects in the Local Folder YAML Files to Verify That the Cluster Is Working
Create the objects:
kubectl apply -f /home/cloud_user/local
Now we can verify that the objects were created:
kubectl get po kubectl get pv kubectl get pvc
What's a lab?
Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.
Provided environment for hands-on practice
We will provide the credentials and environment necessary for you to practice right within your browser.
Guided walkthrough
Follow along with the author’s guided walkthrough and build something new in your provided environment!
Did you know?
On average, you retain 75% more of your learning if you get time for practice.