Skip to content

Instantly share code, notes, and snippets.

@devshawn
Last active January 19, 2022 02:52
Show Gist options
  • Save devshawn/8cc0cb4166e1b07524548fd6597ee8d5 to your computer and use it in GitHub Desktop.
Save devshawn/8cc0cb4166e1b07524548fd6597ee8d5 to your computer and use it in GitHub Desktop.
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

Thankyou somuch for helping us out here..

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