Categories: CloudNativeKubernetes

Kubernetes – How to Install Kubernetes on Ubuntu (Linux)

This blog represents steps/instructions on how to setup Kubernetes on Ubuntu (Linux) using Minikube. The instructions have been used to setup Kubernetes on Ubuntu 16.04. Following are key steps which need to be taken in order to setup and get started with Kubernetes:

  • Ensure Virtualization Technology (VT) is enabled in BIOS
  • Install VirtualBox and VBoxManage
  • Install KubeCtl
  • Install Minikube
  • Launch Kubernetes cluster


Ensure Virtualization Technology is Enabled in BIOS Setup

First and foremost, ensure that Virtualization Technology (VT) is enabled in BIOS setup. In order to do that, do following:

  • Shutdown the system and restart.
  • Keep tapping ESC key when starting the machine. This would bring up the startup screen such as that shown in below screenshot:

    Figure 1. Accessing BIOS Setup

  • Select F10 to go to BIOS setup. This would bring up the screen such as that shown below:

    Figure 2. Enable Virtualization Technology

  • Go to System Configuration, scroll down using arrow mark to Virtualization Technology, press enter, and select Enabled.
  • Press F10 for saving and existing the setup.

Install VirtualBox (Hypervisor) and VBoxManage

Follow the steps given below to setup Virtual Box:

Follow the steps given below to setup VBoxManage:

VBoxManage is the command-line interface to VirtualBox.

  • Download the appropriate VBoxManage extension on your system using the command such as following:
    wget http://download.virtualbox.org/virtualbox/5.1.0/Oracle_VM_VirtualBox_Extension_Pack-5.1.0.vbox-extpack
    
  • Install VBoxManage on your system using the following:
    sudo VBoxManage extpack install ./Oracle_VM_VirtualBox_Extension_Pack-5.1.0.vbox-extpack
    
  • Run the following command to confirm that VBoxManage has been successfully installed.
    VBoxManage list extpacks
    

    Following is the screenshot representing the output of execution of above command:

    Figure 4. VBoxManage List Extpacks

Install Kubectl

  • Execute the following command to download the latest version of kubectl
    curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl
    
  • Change the permission of kubectl file to make it executable
    chmod +x ./kubectl
    
  • Move the kubectl to PATH
    sudo mv ./kubectl /usr/local/bin/kubectl
    

The above details can also be found on the page, Install Kubectl binary via curl

In order to confirm if everything is alright, execute the following command:

kubectl version

Above would show the result as shown in the screenshot given below:

Figure 5. kubectl version

Install Minikube

Install Minikube using the following command:

curl -Lo minikube https://storage.googleapis.com/minikube/releases/v0.22.2/minikube-linux-amd64 && chmod +x minikube && sudo mv minikube /usr/local/bin/

Execute the following command which would print the version of Minikube such as v0.22.2

minikube version

Launch Kubernetes Cluster

Execute the following command to launch Kubernetes cluster

minikube start

Above would result in starting of Kubernetes cluster. Following screenshot represents the same:

Figure 6. Starting Kubernetes Cluster

Once started, access the Kubernetes Dashboard by executing following command:

minikube dashboard

It would open up a browser window with Dashboard as represented in the following screenshot.

You can stop the cluster using the following command:

minikube stop


Ajitesh Kumar

I have been recently working in the area of Data analytics including Data Science and Machine Learning / Deep Learning. I am also passionate about different technologies including programming languages such as Java/JEE, Javascript, Python, R, Julia, etc, and technologies such as Blockchain, mobile computing, cloud-native technologies, application security, cloud computing platforms, big data, etc. I would love to connect with you on Linkedin. Check out my latest book titled as First Principles Thinking: Building winning products using first principles thinking.

Share
Published by
Ajitesh Kumar
Tags: Kubernetes

Recent Posts

Agentic Reasoning Design Patterns in AI: Examples

In recent years, artificial intelligence (AI) has evolved to include more sophisticated and capable agents,…

1 month ago

LLMs for Adaptive Learning & Personalized Education

Adaptive learning helps in tailoring learning experiences to fit the unique needs of each student.…

1 month ago

Sparse Mixture of Experts (MoE) Models: Examples

With the increasing demand for more powerful machine learning (ML) systems that can handle diverse…

1 month ago

Anxiety Disorder Detection & Machine Learning Techniques

Anxiety is a common mental health condition that affects millions of people around the world.…

1 month ago

Confounder Features & Machine Learning Models: Examples

In machine learning, confounder features or variables can significantly affect the accuracy and validity of…

2 months ago

Credit Card Fraud Detection & Machine Learning

Last updated: 26 Sept, 2024 Credit card fraud detection is a major concern for credit…

2 months ago