How to Install and Configure MicroShift on Fedora: Deploying an Ultra-Lightweight OpenShift Cluster for Lab and Edge Computing

Fedora tutorial - IT technology blog
Fedora tutorial - IT technology blog

Spinning up a standard OpenShift Container Platform (OCP) cluster on a laptop or low-spec lab server is nearly impossible. Your machine will freeze or run out of RAM right during initialization. A full OCP cluster brings along the Web Console, Prometheus/Alertmanager, an internal registry, and requires at least 3 master nodes with tens of GBs of RAM. Even OpenShift Local (CRC) consumes 9 GB to 16 GB of RAM for a bulky virtual machine.

That footprint is far too heavy if you just want to learn, test OpenShift-specific manifests like Route or SCC, or run apps on resource-constrained Edge devices. MicroShift was built to solve this exact bottleneck. Developed as an open-source project by Red Hat, it strips down OpenShift to run directly on a single Linux node. Personally, I have been using Fedora as my daily driver for over two years. Using Fedora directly for a MicroShift lab saves me from having to spin up a new VM, and I can get a working cluster up for testing in about 10 minutes.

Comparing Ultra-Lightweight OpenShift and Kubernetes Options

On a single Fedora machine, you typically have 3 popular options for running container orchestration:

Criteria OpenShift Local (CRC) K3s / Minikube MicroShift on Fedora
Minimum RAM consumption 9 GB – 16 GB 512 MB – 1 GB 1.5 GB – 2 GB
Runtime architecture Pre-packaged KVM/QEMU virtual machine Standalone binary or container Native systemd service via RPM + CRI-O
OpenShift API compatibility Full (includes Web Console) None (standard Kubernetes only) Core APIs included (Route, SCC, etc.)
Suitable for Edge Computing No Yes (K3s) Highly suitable

Quick Evaluation of Each Option

1. OpenShift Local (CRC)

CRC delivers an experience nearly identical to a production OpenShift cluster, including the Web Console. In return, it runs inside a fairly heavy dedicated VM. Suppose you use a 16 GB RAM laptop or an Intel N100 mini PC (16 GB RAM) as a home lab. Once you allocate 10 GB of RAM to CRC, there is barely any room left for your IDE, Docker, or browser.

2. K3s or Minikube

K3s is ultra-lightweight and boots in seconds. However, if your work revolves around the Red Hat/OpenShift ecosystem, K3s lacks OpenShift-specific resources like Route or the SCC security mechanism. Manifests that work fine on K3s will still need significant adjustments before deploying to a real OpenShift cluster.

3. MicroShift on Fedora

MicroShift strips out the heavy Web Console and operators that are unnecessary in edge environments. It retains only the Kubernetes core, essential OpenShift APIs, and runs on the cri-o container runtime.

  • Pros: Low RAM and CPU footprint (around 800 MB – 1.2 GB RAM at idle), boots as fast as a regular systemd service, and supports Route and SCC out of the box.
  • Cons: No built-in web UI; everything is managed via the oc or kubectl CLI. You also need to pre-configure LVM if you want dynamic Persistent Volumes.

Which Option Should You Choose for Lab and Edge Computing?

Installing MicroShift directly on Fedora hits the sweet spot. You can practice real-world OpenShift concepts while using the exact same configuration on modest Edge hardware (2 vCPUs, 2–4 GB RAM). You don’t lose performance to a virtualization layer like CRC, while retaining the API compatibility that K3s lacks.

This guide is tested on Fedora 40/41 (either Server or Workstation works) with sudo privileges. Your lab machine needs at least 2 vCPUs, 2 GB of RAM, and 20 GB of free disk space.

Step-by-Step Guide to Installing MicroShift on Fedora

Step 1: Prepare LVM Storage for Persistent Volumes

MicroShift uses LVMS (LVM Storage) to dynamically provision storage for Pods. By default, it looks for a Volume Group (VG) named rhel. If your lab machine doesn’t have a separate unused partition, you can quickly create a virtual disk file (loopback device) to simulate one.

# Install the lvm2 package if not already installed
sudo dnf install -y lvm2

# Create a 10GB file as a virtual disk for LVM
sudo mkdir -p /var/lib/microshift-storage
sudo truncate -s 10G /var/lib/microshift-storage/lvm-disk.img

# Attach the file to a loopback device and create a Volume Group named rhel
LOOP_DEV=$(sudo losetup --find --show /var/lib/microshift-storage/lvm-disk.img)
sudo pvcreate $LOOP_DEV
sudo vgcreate rhel $LOOP_DEV

# Verify the newly created Volume Group
sudo vgs

Note for lab setups: After a reboot, the loopback device may not reattach automatically. In a production Edge environment, you should use a dedicated physical disk partition or add a small systemd service to run losetup before MicroShift starts.

Step 2: Enable the Repository and Install MicroShift and OpenShift CLI

The Red Hat Emerging Technologies team maintains a Copr repository for MicroShift on Fedora. Simply enable this repo and install microshift (which pulls in cri-o) along with openshift-clients for the oc command.

# Enable the Copr repo containing MicroShift packages for Fedora
sudo dnf copr enable -y @redhat-et/microshift

# Install MicroShift and the oc CLI tool
sudo dnf install -y microshift openshift-clients

If the default repositories cannot find the openshift-clients package, download the oc binary directly from the official OpenShift mirror and copy it to /usr/local/bin/oc.

Step 3: Configure Firewall (firewalld) and Start the Service

Next, open the internal Pod subnets along with the API server port (6443) and HTTP/HTTPS (80/443) in firewalld so the cluster can communicate properly:

# Allow internal Pod subnets through the firewall
sudo firewall-cmd --permanent --zone=trusted --add-source=10.42.0.0/16
sudo firewall-cmd --permanent --zone=trusted --add-source=169.254.169.1/32

# Open the Kubernetes API port and HTTP/HTTPS for OpenShift Router
sudo firewall-cmd --permanent --zone=public --add-port=6443/tcp
sudo firewall-cmd --permanent --zone=public --add-service=http
sudo firewall-cmd --permanent --zone=public --add-service=https
sudo firewall-cmd --reload

# Enable and start MicroShift
sudo systemctl enable --now microshift

The first startup takes about 1–3 minutes as the system pulls core images like CoreDNS, Ingress Router, and LVMS. You can follow the live logs with:

sudo journalctl -u microshift -f

Step 4: Configure kubeconfig and Verify the Cluster

MicroShift generates the admin kubeconfig file at /var/lib/microshift/resources/kubeadmin/kubeconfig. Copy it to your home directory so you can run oc commands without typing sudo every time:

mkdir -p ~/.kube
sudo cp /var/lib/microshift/resources/kubeadmin/kubeconfig ~/.kube/config
sudo chown $(id -u):$(id -g) ~/.kube/config
chmod 600 ~/.kube/config

# Check node status and system pods
oc get nodes
oc get pods -A

Once the node shows Ready and all pods in the openshift-ingress, openshift-dns, and openshift-storage namespaces are in the Running state, your cluster is ready for workloads.

Step 5: Deploy a Test Application with OpenShift Route

Let’s verify the cluster by creating a new project, deploying an Nginx container, and exposing it via an OpenShift Route:

# Create a new project (namespace)
oc new-project lab-demo

# Create a deployment and service
oc create deployment web-test --image=nginxinc/nginx-unprivileged:alpine
oc expose deployment/web-test --port=8080

# Create a Route for internal domain access
oc expose service/web-test
oc get route web-test

Here I chose the nginxinc/nginx-unprivileged image running on port 8080 instead of the default nginx image (which runs as root on port 80). MicroShift inherits OpenShift’s restricted-v2 SCC policy, which blocks containers from running as root by default. This is one of the most valuable real-world lessons you get when practicing on MicroShift compared to vanilla Kubernetes.

Grab the hostname returned by oc get route (for example, web-test-lab-demo.apps.example.com) and test it with curl:

curl -H "Host: $(oc get route web-test -o jsonpath='{.spec.host}')" http://127.0.0.1

Common Troubleshooting Tips for Your Lab

  • Pods in openshift-storage stuck in Pending or CrashLoopBackOff: Usually caused by forgetting to create the rhel Volume Group or a typo in the VG name. Check with sudo vgs and then run sudo systemctl restart microshift.
  • Cannot reach the API server from another machine on the LAN: Double-check port 6443/tcp in firewalld. When copying the kubeconfig file to another machine, remember to update the server address from 127.0.0.1 to your Fedora machine’s LAN IP.
  • Root partition running out of space: Container images are stored in /var/lib/containers. Periodically clean up unused images with sudo crictl rmi --prune.

Using less than 2 GB of RAM right on Fedora, this MicroShift cluster is compact enough for testing OpenShift manifests daily, running small CI/CD pipelines, or deploying directly to production Edge nodes.

Share: