Kubernetes is a free, open source, extensible, and portable platform used to manage containerized services and workload in different types of physical, cloud, and virtual environments. It assists in automation and declarative configuration. It has a vast and speedily expanding ecosystem. Kubernetes tools, support, and services are widely available.
Following are the features that Kubernetes supports:
Self-healing capabilities
Automated scheduling
Load Balancing
Horizontal Scaling
Automated Rollouts
Environment consistency for development, testing, and production
Auto-scalable infrastructure
Application Centric Management
High Resource utilization
Can create predictable infrastructure
Enterprise ready features and so much more.
In this article, we will look at how to install single node Kubernetes with the help of a few easy to follow commands. To demonstrate the deployment process, we have used Ubuntu 20.04 as the operating system. Ubuntu is a highly efficient and widely used distribution of Linux. Due to its focus on user friendliness, many people use it as a daily driver. It is also the most used distribution in the tech community.
We will install Kubernetes using the command line interface (also known as Terminal).
Without any further ado, let’s get started.
Following are the steps involved in the deployment process of Kubernetes on Ubuntu:
We first need to install MicroK8s on our Ubuntu system. It is a minimal, lightweight, small, and fully conformant distribution of Kubernetes. We are using snapd package manager to install microk8s.
If you don’t have snapd package manager, you can install it from here:
https://snapcraft.io/docs/installing-snapd?_ga=2.126145930.647748854.1648705733-158347252.1648705733
To install microk8s, we will run the following command:
sudo snap install microk8s --classic
Admin privilege is required for seamless usage of commands. For that a group is created, which can be joined using the following commands:
sudo usermod -a -G microk8s $USER
sudo chown -f -R $USER ~/.kube
To update the group, you will have to re-enter the session by executing the command mentioned below:
su - $USER
To check the status of Kubernetes while it is being started, run the following command:
microk8s status --wait-ready
In this step, we will enable the services we want. To see all the available services and optional features, run this command:
microk8s enable –help
To enable a particular service, issue the following command:
microk8s enable dashboard dns ingress
To disable a service, execute the following command:
Microk8s disable
Now that we are done with the essential configurations, let’s start using Kubernetes.
You can make kubectl the default Kubernetes management tool on your terminal if you use microk8s. To do that, type
Alias mkctl=”microk8s kubectl”. You can also manage other Kubernetes clusters with kubectl by pointing to the respective kubeconfig file through the “—kubeconfig” argument.
microk8s kubectl get all --all-namespaces
To access the Kubernetes dashboard, you can use the following command:
microk8s dashboard-proxy
You can start a service by running the following command:
microk8s start
To stop a service, run the following command:
microk8s stop
In today’s guide, we saw in detail how to install Single Node Kubernetes with microk8s on Ubuntu 20.04. We also explored different commands that are used to configure the Kubernetes instance.
We hope you had a great time exploring the guide.
To learn how to use ‘kubectl get’ with the help of a few examples, do give this page a try:
https://linuxways.net/centos/kubectl-get-command-explained-with-examples/
Karim Buzdar holds a degree in telecommunication engineering and holds several sysadmin certifications including CCNA RS, SCP, and ACE. As an IT engineer and technical author, he writes for various websites.
Here’s the guide to deploy Elastic Stack on Ubuntu VPS, with secure access, HTTPS proxying,…
This guide walks through deploying Nagios Core on an Ubuntu VPS, from system prep to…
After a decade under Pablo Cantero's stewardship, Shoryuken has a new maintainer - me. I'm…
MAAS 3.7 has been officially released and it includes a bunch of cool new features.…
Update: This article originally concluded that Eisel-Lemire wasn't worth it for Ruby. I was wrong.…
Recently, the team at MinIO moved the open source project into maintenance mode and will…