Podman Desktop Integration with MicroShift in a RHEL Virtual Machine

November 13, 2023

This blog elaborates on how to configure Podman Desktop to be used together with MicroShift in a RHEL virtual machine (VM).

Please note that the presented setup is not supported by Red Hat.

1. Introduction and use case

One of the challenges in software development is a difference between development environment and target production. In other words, developers test their applications on the platforms which are not the same as in production. This situation often results in a need for the significant adjustment of developed applications for production platforms.  

To overcome this situation, a reconciliation of the development and production environment is pursued. Thus, the software development departments endeavour to bring conditions and platforms of the production environment closer to the developer. The same is true also for development of containerised applications. 

According to this strategy, when dealing with containerised applications a container management platform has to be a part of the development environment.

One of the valid options for setting up a development environment is a VM where all required tools are pre-installed. An appropriate tool set for testing of containerised applications which are intended to run on Red Hat OpenShift can look like following: 

  • Podman 
  • Podman Desktop
  • MicroShift

Podman is a widely used well known container runtime. Podman Desktop can be considered as an intuitive GUI for Podman. 

What is MicroShift and why do we want to use it? 

Red Hat MicroShift is a container orchestration platform which is a small, single-node, resource-saving version of Kubernetes. Well known OpenShift is not an option for this use case since OpenShift typical installation is a cluster of multiple nodes. OpenShift can also be deployed on a single-node but it’s high resources requirements make them not a best solution for edge devices. Another option would be OpenShift Local which is a single-node version of OpenShift with moderate resources requirement. However, OpenShift Local is embedded in a VM. Therefore OpenShift Local deployment in a RHEL VM would result in nested virtualisation, which is an unsupported use case. 

Therefore, the suggested way to build a development VM with limited resources which is as close as possible to production with OpenShift is to utilize MicroShift. 

Next section describes how to install and integrate Podman Desktop with MicroShift in a RHEL 9 VM. 

2. Configuration steps

a. RHEL 9 VM installation 

Install a RHEL 9 VM considering MicroShift requirements from: https://access.redhat.com/documentation/en-us/red_hat_build_of_microshift/4.14/html/installing/microshift-install-rpm

Make sure you will install RHEL 9 from the image based on the one of following supported OS architectures:  x86_64 or ARM64.

b. Volume group (VG) configuration

Check if a VG is configured on the created VM with at least 10G free space. 

sudo vgs

Example output:

VG   #PV #LV #SN Attr   VSize    VFree rhel   1   2   0 wz--n- <127.00g 54.94g

If VG is not prepared, configure LG with logical volume manager (LVM) according to the example from the link below.
https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/logical_volume_manager_administration/lvm_examples

3. Install Podman Desktop on RHEL VM

https://podman-desktop.io/

4. Install MicroShift as RPM package

Install MicroShift as RPM package as described in:

https://access.redhat.com/documentation/en-us/red_hat_build_of_microshift/4.14/html/installing/microshift-install-rpm

Check the MicroShift status after installation with: 

oc get all -A

All pods must be in running status. 

5. Create one or more namespaces in MicroShift via RHEL shell

Create a namespace with the following command:

oc create namespace <name>

Verify namespace creation with: 

oc get namespaces

6. Connect Podman Desktop with MicroShift

a. Fill .kube/config according to the MicroShift installation guide: 

https://access.redhat.com/documentation/en-us/red_hat_build_of_microshift/4.13/html/installing/microshift-install-rpm#accessing-microshift-cluster-locally_microshift-install-rpm

b. Restart Podman Desktop.

c. “microshift” should appear in the status bar at the bottom of the Podman Desktop window.

d. Podman Desktop is now connected to MicroShift via .kube/config. To see the pods from a certain namespace in Podmad Desktop, put this namespace into .kube/config. Replace “default” namespace with the name of your namespace.  

7. Deploy pod from Podman Desktop into MicroShift in following way

a. Use following image to test Podman Desktop and MicroShift integration:

registry.access.redhat.com/ubi8

In Podman Desktop, pull this image.

In Podman Desktop, create container out of this image.

b. Create a pod and deploy them to MicroShift in following way:
Make sure “microshift” context is selected in following steps:

  • Right click on previously created container
  • Select “Deploy to kubernetes”

c. Perform following: 

  • Select all three check boxes
  • Select one of namespaces you created 

8. Check the status of pods via RHEL shell

oc get all

oc get pods

All pods must be in running status. 

9. Summary

Congratulations. You have a RHEL VM with running Podman Desktop connected to MicroShift.

One reply on “Podman Desktop Integration with MicroShift in a RHEL Virtual Machine”

Leave a Reply

close

Subscribe to our newsletter.

Please select all the ways you would like to hear from Open Sourcerers:

You can unsubscribe at any time by clicking the link in the footer of our emails. For information about our privacy practices, please visit our website.

We use Mailchimp as our newsletter platform. By clicking below to subscribe, you acknowledge that your information will be transferred to Mailchimp for processing. Learn more about Mailchimp's privacy practices here.