Install kubectl and minikube on Linux


Staff member
Oct 27, 2011
Reaction score
Kubernetes is a great way to deploy your applications - and it's VERY popular out there with teams working in technology. Before you get going though, you'll need to install the kubectl cli tool and you may as well install minikube so you can test things out. Minikube is a non-production sandbox environment that you can use to test out kubernetes.

This article will show you how to install the latest versions of both - and we'll go into using them in another future article. There are tons of useful youtube videos out there as well that can get you going once you have these installed.

Installing kubectl on Linux

Now, this won't matter if you're running fedora, ubuntu, centos or any other Linux distribution as long as you have curl installed.

To install the latest version of kubectl on Linux, simply open up a terminal and download the latest using curl. You can do this as a regular user.
curl -LO$(curl -s

Once downloaded, you need to make it executable.
chmod +x ./kubectl

Next, just move it somewhere in your $PATH so you can just type its name w/o needing to type out the full path. You'll need sudo for this if you move it into /usr/local/bin/.
sudo mv ./kubectl /usr/local/bin/

You could move it into another $PATH location as well - maybe one from your home directory. To get a full list of your $PATH locations, simply type echo $PATH on your terminal.

After moving it, you can now test to see if it works.

You should see the help file come up since you didn't give it any arguments.

Here's a quick asciinema showing the process:


To install minikube, you'll need to ensure you have Virtualbox installed. If you don't have it, you can download for your distribution here:

Installing minikube on Linux

This is VERY similar to installing kubectl. Again, it doesn't matter which flavor of Linux you're using.

Now that you have Virtualbox installed, you can use curl to download the latest version of minikube.
curl -Lo minikube

Next, make it executable with chmod
chmod +x ./minikube

Finally, move it somewhere in your $PATH
sudo mv ./minikube /usr/local/bin/

Now, type minikube to get its help page.

To start minikube, type minikube start.

Once it has started (it may take a while, but it'll update you along the way) type kubectl get all and you'll likely see something similar to this output:
[[email protected] ~]$ kubectl get all
NAME                 TYPE        CLUSTER-IP   EXTERNAL-IP   PORT(S)   AGE
service/kubernetes   ClusterIP    <none>        443/TCP   88s

To stop minikube, simply type minikube stop.

I hope this has been helpful. We'll follow up with some kubernetes (k8s) basics to get you going!
Last edited:
$200 Digital Ocean Credit
Get a free VM to test out Linux!

Latest posts