Skip to main content
Redhat Developers  Logo
  • Products

    Platforms

    • Red Hat Enterprise Linux
      Red Hat Enterprise Linux Icon
    • Red Hat AI
      Red Hat AI
    • Red Hat OpenShift
      Openshift icon
    • Red Hat Ansible Automation Platform
      Ansible icon
    • View All Red Hat Products

    Featured

    • Red Hat build of OpenJDK
    • Red Hat Developer Hub
    • Red Hat JBoss Enterprise Application Platform
    • Red Hat OpenShift Dev Spaces
    • Red Hat OpenShift Local
    • Red Hat Developer Sandbox

      Try Red Hat products and technologies without setup or configuration fees for 30 days with this shared Openshift and Kubernetes cluster.
    • Try at no cost
  • Technologies

    Featured

    • AI/ML
      AI/ML Icon
    • Linux
      Linux Icon
    • Kubernetes
      Cloud icon
    • Automation
      Automation Icon showing arrows moving in a circle around a gear
    • View All Technologies
    • Programming Languages & Frameworks

      • Java
      • Python
      • JavaScript
    • System Design & Architecture

      • Red Hat architecture and design patterns
      • Microservices
      • Event-Driven Architecture
      • Databases
    • Developer Productivity

      • Developer productivity
      • Developer Tools
      • GitOps
    • Automated Data Processing

      • AI/ML
      • Data Science
      • Apache Kafka on Kubernetes
    • Platform Engineering

      • DevOps
      • DevSecOps
      • Ansible automation for applications and services
    • Secure Development & Architectures

      • Security
      • Secure coding
  • Learn

    Featured

    • Kubernetes & Cloud Native
      Openshift icon
    • Linux
      Rhel icon
    • Automation
      Ansible cloud icon
    • AI/ML
      AI/ML Icon
    • View All Learning Resources

    E-Books

    • GitOps Cookbook
    • Podman in Action
    • Kubernetes Operators
    • The Path to GitOps
    • View All E-books

    Cheat Sheets

    • Linux Commands
    • Bash Commands
    • Git
    • systemd Commands
    • View All Cheat Sheets

    Documentation

    • Product Documentation
    • API Catalog
    • Legacy Documentation
  • Developer Sandbox

    Developer Sandbox

    • Access Red Hat’s products and technologies without setup or configuration, and start developing quicker than ever before with our new, no-cost sandbox environments.
    • Explore Developer Sandbox

    Featured Developer Sandbox activities

    • Get started with your Developer Sandbox
    • OpenShift virtualization and application modernization using the Developer Sandbox
    • Explore all Developer Sandbox activities

    Ready to start developing apps?

    • Try at no cost
  • Blog
  • Events
  • Videos

Working with Kubernetes in Podman Desktop

November 6, 2023
Stevan Le Meur
Related topics:
ContainersDeveloper ToolsKubernetes
Related products:
Developer ToolsPodman DesktopRed Hat OpenShift

Share:

    Podman Desktop simplifies the transition from development to production by adopting production standards early on, ensuring workloads meet production criteria from the start. This approach brings predictability in deployments as it minimizes problems and saves time and resources. It also provides a structured environment for developers to work with Kubernetes in a comprehensive way to progressively grow their skills.

    This article provides a quick overview of the Kubernetes capabilities offered in Podman Desktop. We'll cover the following areas:

    • Kubernetes support with Podman
    • Setting up a Kubernetes Local environment using Kind or minikube extensions
    • Interacting with your workload and inspecting your applications

    Kubernetes support with Podman

    Podman is a daemonless container engine for managing and running OCI containers on your Linux system. With Podman Desktop, developers benefit from a graphical user interface to easily manage and interact with containers from Windows, macOS, and Linux. 

    From its inception, Podman was designed with a keen awareness of the Kubernetes ecosystem and its prevalent role in the container orchestration landscape. In fact, even the name "Podman" is derived from POD Manager, and in this context, POD refers to the concept of pods in Kubernetes (the smallest deployable unit in Kubernetes).

    As a result, Podman's design philosophy was to handle pods just as it handles containers, in a way that is consistent with Kubernetes architectures. This dual approach not only positions Podman as a versatile tool for managing containers but also as a fairly practical platform for developing and testing Kubernetes applications, bridging the gap between local development environments and large-scale Kubernetes deployments.

    While Podman is great for its effectiveness in a development environment, it’s also a perfect solution to run pods (and other Kubernetes constructs) in a production environment, where simplicity and security are the primary needs. Podman is well known for its tight integration with systemd, enabling reliable and rock-solid deployments of containerized workloads on different targets. I invite you to read the following articles if you are interested in using Podman for production workloads:

    • Make systemd better for Podman with Quadlet 
    • Keeping services alive with custom healthcheck actions.

    If you are targeting to deploy your containers on Kubernetes, Podman provides key features making the transition to Kubernetes easier: its rootless containers align with Kubernetes' security practices, while Podman’s daemonless architecture echoes Kubernetes' container management approach. Additionally, its networking and volume management mimic Kubernetes’ approach. More interestingly for developers, Podman provides Kubernetes YAML compatibility:

    • Run Kubernetes objects: Enables running objects defined in Kubernetes YAML files using the podman play kube command. This feature is useful for testing Kubernetes configurations locally without needing a full Kubernetes cluster.
    • Generate Kubernetes manifests: Enables generating Kubernetes-compatible YAML files from existing Podman containers or pods with the podman generate kube command. This allows for easy transition of local container setups to a Kubernetes environment.

    In Podman Desktop, these capabilities are directly exposed to the end user and natively integrated in the UI. For instance, for any container or pod created with Podman, you can easily get its Kubernetes YAML. A Kube tab is available on the details page of a container (or pod), as shown in Figure 1. This feature leverages the generate kube command from Podman.

    The Kube tab in the Podman Desktop Container Details page.
    Figure 1: Viewing the Kubernetes YAML in Podman Desktop's Kube tab.

     

    Similarly, you can display all your pods running with Podman and Play Kubernetes YAML from the list of pods (Figure 2).

    The Play Kubernetes YAML option shown in the Podman Desktop UI.
    Figure 2: Viewing the running pods.

     

    Transitioning containers into pods

    With Podman Desktop, you can easily transition your containers into pods, as illustrated in the following video. This feature is called Podify; it allows you to select multiple containers and group them together as a single unit of deployment for Kubernetes. 

    Setting up a local Kubernetes environment from Podman Desktop

    For developers who need to run Kubernetes locally and reproduce an environment close to production for development and experimentation purposes, Podman Desktop allows users to easily set up that environment on a local machine. There are two distincts extensions providing the capability to configure a Kubernetes cluster locally, you can either choose between Kind or minikube.

    If you are not familiar with Kind, Kind is an open source project that allows to run Kubernetes clusters in a container engine (could be Docker or Podman or others). This is usually quite helpful for development and testing purposes, as you can run a Kubernetes locally in a lightweight fashion. Similarly, the minikube extension allows running Kubernetes in containers as well. Both solutions are completely viable. 

    I recommend you watch the following video to learn about how you can set up a Kind environment from Podman Desktop.

    Podman Desktop’s documentation provides guides for setup:

    • Kind
    • minikube

    To interact with your clusters, there are actually two different ways to do it. You can either:

    • Use kubectl if you have it installed and configured on your local workstation,
    • Use the integrated terminal provided in Podman Desktop, accessible from the details of Kind or minikube cluster’s control plane (Figure 3).
    The Terminal tab in the Podman Desktop UI.
    Figure 3: Interacting with a cluster via the Terminal tab in the cluster's control plane.

     

    Selecting a Kubernetes context from Podman Desktop

    Once you have a Kubernetes cluster configured and running locally, your Kube context will list that particular cluster. From Podman Desktop, you can viewyour Kube contexts and select the one you want to be defined for your local environment.

    To do that, you can click on the Kubernetes icon in the status bar; it will display a menu with the list of available Kubernetes contexts, as shown in Figure 4.

    Viewing available Kubernetes contexts in Podman Desktop
    Figure 4: Selecting a Kubernetes context via the Kubernetes icon in the status bar.

     

    Alternatively, you can check it from Podman Desktop tray’s menu (Figure 5).

    Viewing available Kubernetes contexts in Podman Desktop via the tray icon.
    Figure 5: Selecting a Kubernetes context via the Podman Desktop tray menu.

     

    Running an application in Kubernetes from Podman Desktop

    Finally, Podman Desktop enables you to run an application in a Kubernetes environment. To do that, you can use the Play Kubernetes feature that allows you to select a YAML file describing your application. 

    For instance, you can run the following NGNIX environment in a pod running in Kind:

    apiVersion: v1
    kind: Pod
    metadata:
     name: nginx
    spec:
     containers:
     - name: nginx
       image: nginx:1.14.2
       ports:
       - containerPort: 80

    You just have to go through the  Pods screen, click the Play Kubernetes YAML button, and select the file to be used (Figure 6). At this time, you can either choose to play the YAML file with Podman or use your Kubernetes environment.

    The Play Kubernetes YAML feature shown in the Podman Desktop UI.
    Figure 6: Running an application with Play Kubernetes YAML in Podman Desktop.

     

    Once your file is executed, you’ll see the pod in the list of pods (Figure 7).

    The Pods page shows the file has been executed.
    Figure 7: Viewing the executed YAML file after running the Play Kubernetes YAML feature.

     

    Pushing a local image from Podman to your Kubernetes environment

    When building an application in your local environment, you’ll build new versions of your application’s images. If you want to test your application in a Kubernetes environment, you need to make this image available in that environment. 

    If you are using the Kind or minikube extension, you can do that directly from the UI of Podman Desktop. Select your image, click on the kebab menu, and select Push image to Kind cluster for instance (Figure 8). This will start the process of making your image available to the Kind environment.

    The Push image to Kind cluster option is shown for the example application image.
    Figure 8: Pushing an application image via the Podman Desktop UI.

     

    Note: We are working on a feature that will make an image built locally with Podman will automatically available in your minikube environments. That will boost your turnarounds and ability to quickly test your application. 

    Working with remote Kubernetes clusters

    Podman Desktop reads the Kubecontexts configured on your local environment. As soon as you have a remote Kubernetes cluster configured, you’ll be able to interact with the resources running there from Podman Desktop.

    In this context, it’s completely possible to deploy a container or a pod to your remote environments, as shown in the following video.

    What’s next?

    In this article, you explored the seamless integration of Kubernetes with Podman Desktop. The tool is crafted to enhance the developer’s experience with containers and Kubernetes. With developer workflows aligning production standards early on, Podman Desktop streamlines the journey of your applications from development to deployment. With each new release, Podman Desktop commits to further refine these capabilities and introduce new features on that mission. Upcoming updates will expand the UI to encompass more Kubernetes objects, offering a more granular and interactive control over your application's objects. 

    Stay tuned as Podman Desktop continues to evolve, but even better—become a part of that evolution. Engage with us, contribute your ideas, and help shape the future features to unlock the full potential of Kubernetes with Podman Desktop.

    • Website: http://podman-desktop.io
    • GitHub: http://github.com/containers/podman-desktop
    • Chat: https://discord.com/invite/x5GzFF6QH4
    Last updated: January 29, 2024

    Related Posts

    • Deploy and test Kubernetes containers using Podman Desktop

    • Podman Desktop 1.0: Local container development made easy

    • What is Podman Desktop? A developer's introduction

    • How to install and use Podman Desktop on Windows

    • Managing Java containers with Quarkus and Podman Desktop

    • Containerize a Spring Boot application with Podman Desktop

    Recent Posts

    • What qualifies for Red Hat Developer Subscription for Teams?

    • How to run OpenAI's gpt-oss models locally with RamaLama

    • Using DNS over TLS in OpenShift to secure communications

    • Scaling DeepSeek and Sparse MoE models in vLLM with llm-d

    • Multicluster authentication with Ansible Automation Platform

    What’s up next?

    Podman in action e-book share image

    Read Podman in Action for easy-to-follow examples to help you learn Podman quickly, including steps to deploy a complete containerized web service.

    Get the e-book
    Red Hat Developers logo LinkedIn YouTube Twitter Facebook

    Products

    • Red Hat Enterprise Linux
    • Red Hat OpenShift
    • Red Hat Ansible Automation Platform

    Build

    • Developer Sandbox
    • Developer Tools
    • Interactive Tutorials
    • API Catalog

    Quicklinks

    • Learning Resources
    • E-books
    • Cheat Sheets
    • Blog
    • Events
    • Newsletter

    Communicate

    • About us
    • Contact sales
    • Find a partner
    • Report a website issue
    • Site Status Dashboard
    • Report a security problem

    RED HAT DEVELOPER

    Build here. Go anywhere.

    We serve the builders. The problem solvers who create careers with code.

    Join us if you’re a developer, software engineer, web designer, front-end designer, UX designer, computer scientist, architect, tester, product manager, project manager or team lead.

    Sign me up

    Red Hat legal and privacy links

    • About Red Hat
    • Jobs
    • Events
    • Locations
    • Contact Red Hat
    • Red Hat Blog
    • Inclusion at Red Hat
    • Cool Stuff Store
    • Red Hat Summit
    © 2025 Red Hat

    Red Hat legal and privacy links

    • Privacy statement
    • Terms of use
    • All policies and guidelines
    • Digital accessibility

    Report a website issue