In my previous tutorial, I demonstrated how easy it was to Deploy a Confluence Server in a Podman pod using containers. In this article, I’m going to show you how you can use Podman and the Confluence pod you created in the first article to generate a YAML manifest that can be deployed on Kubernetes. I focus on using Podman to generate the YAML manifest, with a detour to generate a set of systemd unit files in the process!

Buckle up! Let’s hit the road!


To follow along, you need an x64 Linux instance (physical or virtual) to deploy the Confluence container. You also must have Podman installed and configured on your Linux instance. If you need to accomplish this, see the References section.

Before trying the steps in this tutorial, you must step through the first article so that you have Confluence Server and Postgres containers and a pod.

Use Podman to generate a Kubernetes YAML manifest

You can use the podman generate kube command to export the running configuration of your confluence-pod pod as a YAML manifest. You can use that to create a copy of your confluence-pod pod in Kubernetes.

First, take a look at the podman generate command:

The podman generate command creates both YAML manifests for Kubernetes and systemd unit files you can use to manage Podman containers in systemd.

Generate a YAML manifest first:

Use redirection to create a file for the YAML configuration:

You need to edit the YAML manifest. I use vi, but you can use your favorite editor:

You need to change one or two things in the manifest:

  • Remove timestamps and other unneeded metadata.
  • Confirm the data paths. I’m using ~/confluence/site1 as specified in my first article, but if you’re using something different then you must ensure that the data paths are correct.

In the end, you have something like this:

You now have a YAML manifest for your confluence-pod pod!

Export a pod configuration to a systemd unit file

While you have a running confluence-pod pod , you’re going to use Podman to generate a systemd unit file, which you can set aside for now. Take another look at the podman generate command:

Give the podman generate systemd command a try:

We can see that we get three unit files, one for the confluence-pod pod and one each for our confluence-postgres and confluence-server containers.

Let’s put that into a file:

Set the consolidated systemd unit file aside for now. I’ll cover that in a future article.

Tearing down your Confluence Server

Before you test the YAML manifest, you must delete the existing confluence-server containers and the confluence-pod pod. Testing the YAML manifest creates objects with the same name in Podman, so if these objects already exist the process would fail.

Delete the pod:

Verify that no containers or pods are found:

Looking great! Now you’re ready to test the YAML manifest.

Test a pod manifest with Podman

You can use the podman play kube command to test your YAML manifest:

Verify your work:

If you point your web browser at your host on port 8290, you see the Confluence licensing page, as expected.

Confluence initial screen

The YAML manifest works great with Podman! Success!

Tearing down the Confluence Server

Before wrapping up, delete the test confluence-server containers and the test confluence-pod pod:

Verify your work. No containers or pods are listed:


Deploying a self-hosted Confluence server doesn’t have to be a pain. You’ve stood up a hosted instance of Confluence in short order, using the power of Podman, pods and containers. And then you used that to generate a YAML manifest, based on your pod’s running configuration in Podman. Finally, you used Podman to test the YAML manifest.

In addition, you generated a set of systemd unit files for your Confluence pod.

Our manifest is looking good and passes the Podman test! In my next article, I’ll show you how to run it on Kubernetes!



Tom Dean

Just a guy, learning all the Kubernetes things and automating the world!


Leave a Reply

Avatar placeholder

Your email address will not be published. Required fields are marked *