Skip to main content

Installation Options

To setup a Kubernetes cluster, there are several options available, each with its own advantages and use cases. Below are some of the most popular methods for installing Kubernetes:
  • Minikube: A local Kubernetes cluster that is easy to set up and ideal for development and testing purposes.
  • kubeadm: A tool that provides a simple way to create a Kubernetes cluster on any machine
  • k3s: A lightweight Kubernetes distribution designed for edge computing and IoT devices.
  • microk8s: A minimal Kubernetes distribution that is easy to install and suitable for development and testing.
In this guide, I will use k3s for the installation process. However, the steps may vary slightly depending on the method you choose. Always refer to the official documentation for the specific installation method you decide to use.

k3s Installation

Here is the documentation as well as the GitHub repository.
k3s is a lightweight Kubernetes distribution that is designed to be easy to install and operate. It is ideal for edge computing, IoT devices, and development environments.
1

Install Script

The easiest way to install k3s is to use the installation script provided by the k3s project. You can run the following command in your terminal:
This command will download and execute the installation script, which will set up k3s, its dependencies, and kubectl on your machine.
Make sure you have curl installed on your system before running the above command.
Terminal Output
2

Verify Installation

After the installation is complete, you can verify that k3s is running by checking the status of the service:
Terminal Output
You should see output indicating that the k3s service is active and running.
You can also check the Kubernetes cluster status using kubectl:
This command should show your node(s) in a Ready state.
If you faced the kubectl permission issue, you can refer to step 3 of this guide to resolve it.
3

Fix kubectl Permission Issue

You can refer this link for more details.
If you encounter a permission issue when running kubectl commands (e.g., kubectl get nodes), it may be because the k3s installation creates a kubeconfig file that is owned by root. To fix this issue, you can change the ownership of the kubeconfig file to your user.
Issue
To resolve this, run the following command to change the ownership of the kubeconfig file:
Fix Permission Issue
To make it persistent across reboots, you can add the above commands to your shell profile (e.g., ~/.bashrc or ~/.profile):
Add the following lines to the end of the file:
~/.bashrc
After making these changes, you should be able to run kubectl commands without encountering permission issues:
Verify kubectl Access
Last modified on May 9, 2026