4 reasons I use Cockpit to manage my Podman containers

1 month ago 2

I’ve been a Docker enthusiast for ages. It’s easy to use, has a solid collection of images, and boasts a sleek ecosystem comprising add-ons, desktop apps, and a decent orchestration platform. But a few weeks ago, I began using Podman as my primary container runtime, and it’s a decision I don’t regret. After all, Podman is a lot more secure than Docker, supports systemd automation, and can run containers inside pods.

I’ve mostly used Portainer to manage my container suite, but the limitations of the free version have started to become more apparent as I work on complex projects. Since I’d already stepped out of my comfort zone, I figured I might as well switch to a different container management UI and began using Cockpit to control my Podman workstation. To my surprise, Cockpit is a highly useful control panel for my Podman-based container suite.

Running Podman inside Proxmox

Related

A beginner's guide to containerization with Podman

Looking for a secure, daemonless alternative to Docker? Podman has got your back

4 Cockpit-Podman makes container management a cinch

And it’s far from the only add-on at my disposal

By default, Cockpit is an administration panel for servers and includes all the networking, storage, and logging utilities you could ask for in a sysadmin platform. However, it’s compatible with a host of unique add-ons that extend its functionality to the next level. Cockpit-Podman is one such add-on that lets you pair your Podman environment with the Cockpit instance, allowing you to manage your container suite from the latter’s web UI.

And I don’t just mean deploying containers. The add-on brings a dedicated Podman Containers tab to the Cockpit UI, which lets you tweak every aspect of your containers, including storage volumes, port mapping, image repos, environment variables, and network settings. For folks who end up breaking containers as often as I do, you can check the container logs and even execute commands using a built-in terminal.

3 Pods view lets me work with closely-linked containers

Especially useful for my web development projects

Creating a pod using Cockpit

Pod support was a driving factor behind my transition to Podman, and it remains an underrated aspect despite being a part of the container runtime’s very name. A pod essentially provides a common namespace, storage provisions, and networking stack to a collection of containers.

Since I often work with web development projects, I use pods to share resources between a database, reverse proxy, and scripting language containers while leaving this holy trinity isolated from the rest of the services in my workstation. Thankfully, the Cockpit-Podman add-on lets me manage my pod setup from Cockpit’s neat UI. For someone who has to switch between a couple of languages, being able to kick a container out of a pod and replace it with another is a godsend.

2 Supports Kubernetes clusters

Podman and K8s are a match made in container heaven

Running a Kubernetes cluster on a Raspberry Pi

Ask any DevOps enthusiast (including my nerdy self) about their favorite container orchestration platform, and you should be prepared to hear them talk about Kubernetes for 15 minutes (or half an hour, if you had the misfortune of asking me). As an industry-grade platform, Kubernetes has top-tier auto-scaling, high availability, and automation provisions. And that's before you include the extra tools that extend its utility evn further. Plus, it’s a terrific companion for Podman lovers looking to deploy a hardcore containerization suite.

The MicroK8s Dashboard running on Ubuntu

Related

7 of the best tools for Kubernetes

Take your Kubernetes cluster to the next level with these must-have utilities

While K8s has its own dashboard, Cockpit makes it easy to manage my Podman containers and Kubernetes pods. Heck, Cockpit is even compatible with OpenShift, making it quite useful if you plan to leverage Red Hat’s cloud-based Kubernetes platform on your workstation.

1 Capable of monitoring the host machine

So I don’t allocate too many resources to my Podman stack

When you’re in the middle of self-hosting the most obscure services out there, it’s easy to lose track of the resources available on your server. That’s a problem I often face when I use my Raspberry Pi, N100 mini-PCs, and other low-power devices for my self-hosting projects. While a little bit of overprovisioning doesn’t hurt anyone, you could end up with degraded performance if multiple Podman containers try to siphon system resources (and yes, I speak from experience).

Considering that Cockpit is an administration platform for servers first and foremost, it’s armed with enough monitoring tools to help you keep an eye on your workstation. On my high-end rigs, I often run virtual machines in tandem with my Podman container suite, and Cockpit makes it easy to track resource utilization on each server.

Cockpit is a versatile dashboard for home labbers

A Cockpit server running on a Proxmox machine

Although I’ve only just started using Cockpit to manage my Podman setup, it’s my go-to utility for managing my Raspberry Pi cluster. Its built-in terminal is a godsend for practically every project, and I love the detailed logging system in Cockpit’s UI. I recently found out that Cockpit also supports Tailscale, which is my favorite utility for connecting to my home lab from external networks. With this groundbreaking revelation, I feel like I’ll end up switching to Cockpit’s UI to manage my entire home lab.

Read Entire Article