Skip to main content
Redhat Developers  Logo
  • Products

    Featured

    • Red Hat Enterprise Linux
      Red Hat Enterprise Linux Icon
    • Red Hat OpenShift AI
      Red Hat OpenShift AI
    • Red Hat Enterprise Linux AI
      Linux icon inside of a brain
    • Image mode for Red Hat Enterprise Linux
      RHEL image mode
    • Red Hat OpenShift
      Openshift icon
    • Red Hat Ansible Automation Platform
      Ansible icon
    • Red Hat Developer Hub
      Developer Hub
    • View All Red Hat Products
    • Linux

      • Red Hat Enterprise Linux
      • Image mode for Red Hat Enterprise Linux
      • Red Hat Universal Base Images (UBI)
    • Java runtimes & frameworks

      • JBoss Enterprise Application Platform
      • Red Hat build of OpenJDK
    • Kubernetes

      • Red Hat OpenShift
      • Microsoft Azure Red Hat OpenShift
      • Red Hat OpenShift Virtualization
      • Red Hat OpenShift Lightspeed
    • Integration & App Connectivity

      • Red Hat Build of Apache Camel
      • Red Hat Service Interconnect
      • Red Hat Connectivity Link
    • AI/ML

      • Red Hat OpenShift AI
      • Red Hat Enterprise Linux AI
    • Automation

      • Red Hat Ansible Automation Platform
      • Red Hat Ansible Lightspeed
    • Developer tools

      • Red Hat Trusted Software Supply Chain
      • Podman Desktop
      • Red Hat OpenShift Dev Spaces
    • Developer Sandbox

      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
    • Secure Development & Architectures

      • Security
      • Secure coding
    • Platform Engineering

      • DevOps
      • DevSecOps
      • Ansible automation for applications and services
    • Automated Data Processing

      • AI/ML
      • Data Science
      • Apache Kafka on Kubernetes
      • View All Technologies
    • Start exploring in the Developer Sandbox for free

      sandbox graphic
      Try Red Hat's products and technologies without setup or configuration.
    • Try at no cost
  • Learn

    Featured

    • Kubernetes & Cloud Native
      Openshift icon
    • Linux
      Rhel icon
    • Automation
      Ansible cloud icon
    • Java
      Java 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

    • API Catalog
    • Product Documentation
    • Legacy Documentation
    • Red Hat Learning

      Learning image
      Boost your technical skills to expert-level with the help of interactive lessons offered by various Red Hat Learning programs.
    • Explore Red Hat Learning
  • 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

Deploy and test Kubernetes containers using Podman Desktop

June 9, 2023
Cedric Clyburn
Related topics:
ContainersKubernetes
Related products:
Developer SandboxPodman DesktopRed Hat OpenShift

Share:

    Podman Desktop (now generally available) is an amazing tool for building, running, and managing containerized applications locally—but in a real-world environment, you need to deploy your applications on container orchestration platforms such as Kubernetes. If you’re looking for an enterprise-grade Kubernetes, look no further than Red Hat OpenShift. 

    Let’s deploy and test a containerized application from your desktop to the free Developer Sandbox for Red Hat OpenShift using Podman Desktop’s Developer Sandbox for Red Hat OpenShift extension.

    Getting started

    If you haven’t already installed Podman Desktop (Figure 1), head to podman-desktop.io to download the latest release to your machine, compatible with Windows, macOS, or Linux.

    Podman Desktop dashboard interface
    Figure 1: The Podman Desktop dashboard.

    This tutorial uses the Developer Sandbox for Red Hat OpenShift extension, which allows you to deploy your containerized applications to a free, cloud-based OpenShift cluster for 30 days.  Using this extension, you can easily sign up for the Developer Sandbox and easily deploy pods or YAML to the hosted OpenShift environment without a local installation or leaving Podman Desktop.

    Install the Developer Sandbox extension

    To install the Developer Sandbox extension for Podman Desktop, navigate to the Settings button on the lower-left corner of Podman Desktop. Next, select Extensions from the left-hand menu. From there, install the Developer Sandbox extension from the list of featured extensions (Figure 2). Podman Desktop also provides functionality to install new extensions from OCI images or even Docker Desktop extensions!

    Podman Desktop extensions page
    Figure 2: Installing the Developer Sandbox extension from the Extensions tab.

    After you click the button to install the Developer Sandbox extension, you'll notice a new section under the Extensions section on the left-hand side of the panel. Click the Red Hat Developer Sandbox extension (Figure 3), and this is where you can see information related to the extension's status (as well as start, stop, or remove the extension).

    Podman Desktop extension status
    Figure 3: Viewing details about the Developer Sandbox extension once installed.

    Register and connect to the Developer Sandbox

    For this tutorial, you can use the Developer Sandbox for Red Hat OpenShift to get a free OpenShift cluster for 30 days to deploy and test your applications. To get started, visit the Resources section on the left-hand side of the Settings. This is where you can connect to your Developer Sandbox environment using your OpenShift authentication token. For now, let's click the link to Sign up for the Developer Sandbox, as shown in Figure 4). (If you already have a Developer Sandbox instance, you can skip to the next section.)

    Podman Desktop Developer Sandbox signup
    Figure 4: Click the link on the Resources tab to navigate to the Developer Sandbox sign-up page.

    The Developer Sandbox for Red Hat OpenShift gives you access to a shared OpenShift and Kubernetes cluster at no cost, with 14 GB RAM and 40 GB storage. Simply log in using your Red Hat account and complete the phone verification process (Figure 5).

    Developer Sandbox signup page
    Figure 5: Log in to the Developer Sandbox for Red Hat OpenShift.

    Once you've logged into the Developer Sandbox, you can connect Podman Desktop to the OpenShift cluster. On the top right-hand side of your OpenShift cluster, select the drop-down menu under your Red Hat username and click Copy login command. Click the Display token button to reveal your cluster URL and token and copy the entire command, as illustrated in Figure 6.

    Developer Sandbox authentication token
    Figure 6: Retrieving the OpenShift authentication token from the OpenShift web console.

    Return to Podman Desktop and select Create new Developer Sandbox on the Resources settings page. Here, you select a context name for your Developer Sandbox instance to easily find it within Podman Desktop, as well as paste in the full login command from the OpenShift web console. When you're ready, just click the Create button to authenticate to your Red Hat OpenShift cluster (Figure 7).

    Podman Desktop New Developer Sandbox form
    Figure 7: Authenticate to your OpenShift cluster.

    Deploy your application to the OpenShift cluster

    Now that you’ve connected to your OpenShift cluster through the Developer Sandbox extension for Podman Desktop, it’s time to deploy a containerized application. While this guide won’t cover building a container image from a Containerfile, you can use Podman Desktop to pull an image down from a container registry before deploying it on the Developer Sandbox.

    Pull an image from a container registry

    Let’s go ahead and pull an example image from Quay.io, an open-source public container registry similar to the Docker Hub. Within Podman Desktop, select the Images tab from the left-hand side of the panel. Here, select Pull an image in the upper right-hand corner of Podman Desktop.

    For the image to pull, you can use a basic Quarkus demo application with the tag quay.io/rhdevelopers/quarkus-demo:v1. Select Pull image to begin the downloading process (Figure 8).

    Podman Desktop Quarkus Image
    Figure 8: Using Podman Desktop to pull an image.

    With the image pulled to Podman Desktop, you can now run the image as a container, delete the image, or view the image’s history. Let's begin checking out this container locally before we go and deploy it to our Developer Sandbox. Testing locally allows you to ensure your applications will run smoothly in a Kubernetes or OpenShift environment before deploying them.

    Back in the Images section of the left-hand menu, select the newly downloaded Image, and click the Run Image icon, as shown in Figure 9. Here, we'll select the default configuration and select Start . Next, select the new container from the Containers section, and you can view various information about the running container, including logs, access to the container's shell using a terminal, and even the Kubernetes YAML needed to create a running pod on your cluster of your container.

    Podman Desktop running a container
    Figure 9: Test and view details about the running container.

    Deploying your container to the Developer Sandbox

    With your container either running or stopped, we can now deploy it to our Developer Sandbox using the registered cluster information in your local kubeconfig file. Before doing so, let's ensure that we've selected the correct Kubernetes namespace first by clicking the Podman Desktop Tray, selecting Kubernetes, and choosing the Developer Sandbox context (or another custom name). See Figure 10. Back in Podman Desktop, select the Deploy button (rocket emoji) to generate a Kubernetes pod on your cluster.

    Podman Desktop deploying to Kubernetes
    Figure 10: Switching the Kubernetes context and deploying the Pod.


    You can use the default generated Pod Name, review the Kubernetes YAML, select Create OpenShift routes, and click Deploy again to start the process of pod creation on your Developer Sandbox (Figure 11). The Developer Sandbox extension will handle the creation of the deployment, service, and route in deploying this container to our cluster.

    Podman Desktop Deploy Button
    Figure 11: Click Deploy to create the pod in your Developer Sandbox.

    Verify deployment status using the OpenShift web console

    Now that your container has been deployed to the cluster using the Developer Sandbox extension for Podman Desktop, let’s take a look at the OpenShift web console to make sure everything looks right.

    Back in the Developer Sandbox, head to the Developer view and select the Topology tab from the left-hand side menu. Here, you can see details about the new Quarkus application deployment, the service that has just been created, the running pod, and a link to the route created in order to access your application (Figure 12). Select the link to view the application in your browser.

    Developer Sandbox verification of pod deployment
    Figure 12: View the application in your browser.

    Additionally, you can also select the Pod name to view relevant details like metrics, logs, and use the terminal, just how we did using Podman Desktop (Figure 13).

    Developer Sandbox viewing of logs
    Figure 13: View Pod details in the OpenShift web console.

    Conclusion

    Congratulations! You’ve just learned how to deploy a container image to the no-cost Developer Sandbox for Red Hat OpenShift directly from Podman Desktop using the Developer Sandbox extension. For more information, check out the Podman Desktop documentation.

    Explore other Podman and container resources on Red Hat Developer:

    • What is Podman Desktop? A developer's introduction
    • Remote container development with VS Code and Podman
    • Podman expands to the Desktop
    Last updated: February 7, 2024

    Related Posts

    • How to transition from Docker to Podman

    • Podman expands to the Desktop

    • Remote container development with VS Code and Podman

    • What is Podman Desktop? A developer's introduction

    • Podman basics: Resources for beginners and experts

    Recent Posts

    • How to run a fraud detection AI model on RHEL CVMs

    • How we use software provenance at Red Hat

    • Alternatives to creating bootc images from scratch

    • How to update OpenStack Services on OpenShift

    • How to integrate vLLM inference into your macOS and iOS apps

    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

    Red Hat legal and privacy links

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

    Report a website issue