MicroShift can be run on the host or inside a Bootc container. This document describes how to run MicroShift inside a Bootc container.
See MicroShift Host Deployment on how to run MicroShift on the host.
Run make run to start MicroShift inside a Bootc container.
The following options can be specified in the make command line using the NAME=VAL format.
| Name | Required | Default | Comments |
|---|---|---|---|
| LVM_VOLSIZE | no | 1G | TopoLVM CSI backend volume |
| ISOLATED_NETWORK | no | 0 | Use --network none podman option |
This step creates a single-node MicroShift cluster. The cluster can be extended using make add-node to add one node at a time.
This step includes:
- Loading the
openvswitchmodule required when OVN-K CNI driver is used when compiled with the non-defaultWITH_KINDNET=0image build option. - Preparing a TopoLVM CSI backend (default 1GB, configurable via
LVM_VOLSIZE) on the host to be used by MicroShift when compiled with the defaultWITH_TOPOLVM=1image build option. - Creating a podman network for easier multi-node cluster support with name resolution.
make runSpecify the
ISOLATED_NETWORK=1make option to run MicroShift inside a Bootc container without Internet access.Such a setup requires a MicroShift Bootc image built with
make image EMBED_CONTAINER_IMAGES=1. This ensures all the required container image runtime dependencies are embedded and the operating system network settings are adjusted to allow a successful MicroShift operation.See the config_isolated_net.sh script for more information.
Log into the container by running the following command. The command is displayed as
part of the summary from make run and make add-node command output.
For example, the first node in a cluster is named microshift-okd-1:
sudo podman exec -it microshift-okd-1 /bin/bash -lVerify that all the MicroShift services are up and running successfully.
export KUBECONFIG=/var/lib/microshift/resources/kubeadmin/kubeconfig
kubectl get nodes
kubectl get pods -ATo create a multi-node cluster, you can add additional nodes after creating the
initial cluster with make run.
make add-nodeNote: The
add-nodetarget requires a non-isolated network (ISOLATED_NETWORK=0). Each additional node will be automatically joined to the cluster.
Run the following commands to check the status of your MicroShift cluster.
# Wait until the MicroShift service is ready (checks all nodes)
make run-ready
# Wait until the MicroShift service is healthy (checks all nodes)
make run-healthy
# Show current cluster status including nodes and pods
make run-statusRun the following command to stop the MicroShift cluster.
make stopIf you have stopped the MicroShift cluster, you can start it again using the following command.
make startRun the following command to stop the MicroShift cluster and clean up the LVM volume used by the TopoLVM CSI backend.
make cleanRun the following command to perform a full cleanup, including the MicroShift Bootc images.
make clean-all