Kubernetes Using Minikube on Arch Linux#
Introduction#
Kubernetes is one of the most powerful and popular container orchestration tools used to manage containers, pods, and clusters. In this post, weโll walk step-by-step through the fundamentals of Kubernetes, and by the end, weโll deploy a simple Ubuntu application using Minikube locally on Arch Linux.
๐ง What is Kubernetes?#
Kubernetes (K8s) is an open-source container orchestration platform developed by Google and now maintained by the CNCF (Cloud Native Computing Foundation).
It automates the deployment, scaling, and management of containerized applications.
Think of it as an orchestrator for Docker containers โ instead of running containers manually, Kubernetes manages everything for you.
๐ ๏ธ Understanding the Architecture#
Kubernetes has a master node and worker nodes.
The master node manages the entire cluster: scheduling, updating, and controlling the system.
The worker nodes can be your frontend, backend, or middleware containers.
All nodes run containers โ and these containers are organized into pods.
You only need to manage the master node (via scripts or kubectl), and it takes care of the rest!
๐ Real-World Scenario#
Letโs say someone makes a request to your frontend (a frontend container). The API server receives this request and checks in the cluster for available containers.
This information is stored in etcd, a key-value database that stores the entire clusterโs state.
If a container is available, it schedules a pod using the scheduler.
Thereโs also a controller manager that monitors all nodes and pods. It ensures:
Pods restart if they fail
The desired number of replicas are maintained
The system self-heals
In short:
Clusters contain multiple nodes, each node contains pods, and each pod contains one or more containers.
๐งฉ Kubernetes Core Concepts#
๐น What is a Pod?#
The smallest deployable unit in Kubernetes.
Can contain one or more containers that share network and storage.
Typically contains one container in most real-world use cases.
Why use Pods?
They wrap your container and allow Kubernetes to manage them effectively.
๐น What is a Deployment?#
A higher-level object that manages pods.
Supports:
Self-healing (auto-restarts failed pods)
Rolling updates
Scaling
๐น What is a Service?#
- A way to expose your pods to the network.
Types of Services:
ClusterIPโ Internal access onlyNodePortโ Access via node IP + portLoadBalancerโ Uses an external cloud-based load balancer
๐น What is a ConfigMap?#
A ConfigMap stores key-value configuration data that your app can use.
It allows you to separate config from code, making updates easier without rebuilding your container.
๐น What is a Secret?#
A Secret is used to store sensitive information like:
Passwords
OAuth tokens
API keys
Itโs like a secure vault within your cluster for credentials.
๐น What are Rolling Updates?#
Rolling updates allow you to update applications without downtime.
It gradually replaces old pods with new ones, so some instances are always available to serve users.
๐ป Setting Up Kubernetes on Arch Linux with Minikube#
โ Why Minikube?#
Minikube is perfect for local development.
It provides a lightweight and portable environment to experiment with Kubernetes without needing a cloud provider.
Think of Minikube as a lab where you can learn Kubernetes hands-on.
โ Why not jump directly to kubectl?#
Because:
kubectlis just a command-line tool to interact with a cluster.It does not set up a cluster itself.
Minikube creates the cluster, while
kubectlcontrols it.
๐ง Install Minikube and kubectl on Arch Linux#
Run the following command:
sudo pacman -S minikube kubectl
Start Your Local Kubernetes Cluster#
Minikube uses Docker as the default driver.
Note: kubectl does not use Docker; it uses the CRI (Container Runtime Interface).
Start Minikube:
minikube start --driver=docker
This sets up:
A Kubernetes control plane
A Kubernetes node (running in a VM or container)
โ ๏ธ If errors occur, make sure your Linux headers are updated or use
modprobeto manage kernel modules.
Also ensure Docker is enabled and started:
sudo systemctl start docker
sudo systemctl enable dockerVerify Minikube is Running#
Check the status:
minikube status
Check the cluster:
kubectl get nodes
If you see something like minikube Ready, then you’re good to go!
Deploy a Simple Ubuntu Pod#
As Kubernetes uses YAML files for configuration, weโll write one to create a Pod.
๐ Create ubuntu-pod.yaml:#
apiVersion: v1
kind: Pod
metadata:
name: ubuntu-pod
spec:
containers:
- name: ubuntu-container
image: ubuntu
command: ["sleep", "3600"]Explanation:
Creates a pod using the Ubuntu image
Runs the command
sleep 3600to keep it alive for an hourApply the Pod#
kubectl apply -f ubuntu-pod.yaml
Check if itโs running:
kubectl get pods
๐ Enter the Ubuntu Pod#
kubectl exec -it ubuntu-pod -- bash
Now youโre inside the Ubuntu container. You can run normal Ubuntu commands like:
apt update ls whoamiExit the container:
exitDelete the Pod#
kubectl delete -f ubuntu-pod.yaml

## Conclusion:
So far, we have:
* Learned what Kubernetes is
* Understood its components like Pods, Deployments, and Services
* Installed and started Minikube on Arch Linux
* Deployed a simple Ubuntu container using Kubernetes
That means โ **we have successfully created our first local Kubernetes cluster** with Minikube!
P.S.
If you spot any mistakes, please don’t hesitate to point them out. We’re all here to learn together! ๐
Haris
FAST (NUCES)
BS Computer Science | Class of 2027
๐ Portfolio: zenvila.github.io
๐ GitHub: github.com/Zenvila
๐ LinkedIn: linkedin.com/in/haris-shahzad-7b8746291**
๐ Member: COLAB (Research Lab)**
