- Lab
-
Libraries: If you want this lab, consider one of these libraries.
- Cloud

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!

Lab 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
About the author
Real skill practice before real-world application
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.
Learn by doing
Engage hands-on with the tools and technologies you’re learning. You pick the skill, we provide the credentials and environment.
Follow your guide
All labs have detailed instructions and objectives, guiding you through the learning process and ensuring you understand every step.
Turn time into mastery
On average, you retain 75% more of your learning if you take time to practice. Hands-on labs set you up for success to make those skills stick.