Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Install Kubernetes on Ubuntu 18.04

Install Kubernetes on Ubuntu 18.04

Quick guide to install Kubernetes via Minikube on Ubuntu 18.04.

1. Install VirtualBox

Install VirtualBox to be used as the hypervisor.

sudo apt-get install -y virtualbox virtualbox-ext-pack

2. Install kubectl

Install kubectl, the kubernetes command line tool.

sudo apt-get update && \
  sudo apt-get install -y apt-transport-https && \
  curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add - && \
  sudo touch /etc/apt/sources.list.d/kubernetes.list && \
  echo "deb http://apt.kubernetes.io/ kubernetes-xenial main" | sudo tee -a /etc/apt/sources.list.d/kubernetes.list && \
  sudo apt-get update && \
  sudo apt-get install -y kubectl

3. Install Minikube

Install Minikube to run your single node kubernetes cluster.

curl -Lo minikube https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64 \
  && chmod +x minikube && \
  sudo cp minikube /usr/local/bin && rm minikube

4. Done!

You can run Minikube and start your cluster by running:

minikube start

You can then see that it is running:

kubectl get nodes

Yay!

@Utkarsh490
Copy link

Utkarsh490 commented Nov 6, 2021

Thankyou somuch for helping us out here..

Loading

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment