Minikube: Troubleshooting Installation Issues

30 minutes
  • 2 Learning Objectives

About this Hands-on Lab

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!

Learning Objectives

Successfully complete this lab by achieving the following learning objectives:

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 by root, 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 with minikub config view), and we’ve got to change that. We’re going to set it to none:

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. Then kubectl get po -A will show us the cluster, up and running.

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

Additional Resources

In your organization you have a developer that was given a cloud server to use for thier installation of Minikube. Unfortunately they have made some mistakes with the installation and the cluster will not work. They have gotten as far as minikube start but this throws errors. You have been asked to see if you can get it running. It needs to match production which is running kubernetes version 1.16.1

What are Hands-on Labs

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.

Get Started
Who’s going to be learning?

How many seats do you need?

  • $499 USD per seat per year
  • Billed Annually
  • Renews in 12 months

Ready to accelerate learning?

For over 25 licenses, a member of our sales team will walk you through a custom tailored solution for your business.


$2,495.00

Checkout
Sign In
Welcome Back!

Psst…this one if you’ve been moved to ACG!