Podman Desktop 1.1

Devconf.cz, Brno, 2023-06-17 (Morning, Afternoon)

Challenging movements between local developer environments and production deployments

generated_from-dev-to-prod

Why: current challenges

challenges dev prod

Vision: simplifying the onboarding

simplistic onboarding

Introducing Podman Desktop 1.1 Community Edition

Containers and Kubernetes for Application Developers

podman desktop dashboard 4k

Podman, Kubernetes, OpenShift Local

  • Install and run anywhere: Windows, macOS and Linux

  • Keep up-to-date

podman desktop website downloads

Containers and pods

  • Build, run, manage

  • Pods in your container engine

  • Multiple container engines

  • Compatible with Docker Compose

podman desktop pods list

Ready for the enterprise

  • VPN and proxy

  • Image registry

  • Install in a restricted environment

podman desktop settings proxy

Bridge between local and remote

  • Connect and deploy to remote OpenShift/Kubernetes clusters

podman desktop systray kubernetes context

The basics

  1. Creating a Podman machine (On Windows and macOS).

  2. Pulling an image.

  3. Starting a container.

  4. Building an image.

Initializing and running Podman

Prerequisites
  • Windows or macOS.

  • Podman (binary) is installed.

Procedure
  1. Go to Dashboard.

  2. On the Podman tile, click Initialize and start.

Verification
  1. Go to  Settings > Resources.

  2. On the Podman tile, your Podman Machine is running.

  3. The Restart and Stop buttons are active.

    podman resources

Initializing and running Podman

Initializing and running a Podman machine with root privileges

Procedure
  1. Go to  Settings > Resources.

  2. On the Podman tile, click Create new.

    1. Machine with root privileges: set to Enabled.

    2. Click Create.

creating a podman machine with root privileges

Pulling an image

Procedure
  1. Go to  Images.

  2.  Pull an image.

    1. Image to Pull: enter: redis.

    2. Click Pull image.

  3. Click Done.

Verification
  1. Go to  Images.

  2. Click the docker.io/library/redis image.

  3. Go to Summary.

  4. Go to History.

    1. Click the output area.

    2. Enter Ctrl + F to search the content.

  5. Go to Inspect.

    1. Click the output area.

    2. Enter Ctrl + F to search the content.

Pulling an image (screenshot)

Pulling the `redis` image

Pulling an image (screencast)

Pulling an image and starting a container

Starting a container

Prerequisites
  • The  Images list contains docker.io/library/redis.

Procedure
  1. Go to  Images.

  2. On the docker.io/library/redis line, click .

  3. In the Create a container screen, review the configuration:

    1. Container name: enter redis.

  4. Click  Start Container.

Verification
  1. Go to  Containers.

  2. Click the redis container.

  3. Go to Terminal.

  4. Click the content area to activate the terminal.

  5. Enter:

    $ redis-cli
    $ SET hello podman
    $ GET hello
  6. You see redis-cli answer:

    "podman"

Starting a redis container (screenshot)

Pulling the `redis` image

Starting a redis container (screencast)

Pulling an image and starting a redis container

Starting a container from an image that exposes a port

Prerequisites
  • The  Images list contains docker.io/library/nginx.

Procedure
  1. Go to  Images.

  2. Pull an image.

  3. Enter: nginx.

  4. Start container.

Verification
  1. Go to  Containers.

  2. Click the container based on the nginx image.

  3. Click Open Browser.

  4. Your browser opens http://localhost:9000 and displays:

    Welcome to nginx!

Starting a nginx container (screenshot)

Podman Desktop window displaying nginx container logs

Starting a nginx container (screencast)

Building an image from Containerfile

Prerequisites
  • A Containerfile or Dockerfile on your local filesystem.

Procedure
  1. Go to  Images.

  2. Click Build an image.

    1. Containerfile path: select the Containerfile to build.

    2. Image Name: enter your image name, such as quay.io/themr0c/podman-desktop-demos.

  3. Click Build.

  4. Click Done.

Verification
  1. Click the line with your image name.

  2. You see the image Summary.

  3. Click History.

  4. Click the content area.

  5. Enter Ctrl + F to search the content.

  6. Click Inspect.

  7. Click the content area.

  8. Enter Ctrl + F to search the content.

  9. Click .

  10. You see the Create a container screen.

Building an image from Containerfile (screenshot)

Building an image

Building an image from Containerfile (screencast)

Support for OCI Registries

  1. Configuring registries.

  2. Pulling images.

  3. Building and tagging images.

  4. Pushing images.

Configuring a pre-configured registry

Prerequisites
  • You have credentials on a pre-configured image registry:

    • Red Hat Quay

    • Docker Hub

    • GitHub

    • Google Container registry

  • (For the verification) Image built with the fully qualified name, such as quay.io/themr0c/podman-desktop-demos.

Procedure
  1. Go to  Settings > Registries.

  2. On your registry line, click Configure.

    1. User name: Enter your user name.

    2. Password: Enter your password or OAuth secret.

Verification
  1. Go to  Images

  2. Click .

  3. The contextual menu has a  Push Image entry.

Configuring a registry (screenshot)

Configuring a registry

Configuring a registry and pushing an image to the registry (screencast)

Pushing an image to a registry

Prerequisites
  • Registry is configured.

  • Image built with the fully qualified name, such as quay.io/themr0c/podman-desktop-demos.

Procedure
  1. Go to  Images.

  2. On your image line, click >  Push image.

  3. Select the Image tag for your registry, such as quay.io/themr0c/podman-desktop-demos.

  4. Click  Push image.

  5. Click Done.

Verification
  1. Go to your container registry, and find your image.

Pushing an image context menu

Pushing an image context menu

Pushing an image: selecting image tag

Selecting image tag

Podman pods

  1. Selecting containers to run in a pod.

  2. Generating Kubernetes YAML from a pod.

  3. Starting a pod from a Kubernetes YAML file.

Selecting containers to run in a pod

Prerequisites
  • Two containers (running or stopped):

    • redis from image: quay.io/centos7/redis-5-centos7:latest

    • python-app from image: quay.io/slemeur/python-app:latest

Procedure
  1. Go to  Containers.

  2. Click the checkbox in the container line for redis and python-app.

  3. Click .

  4. Copy containers to a pod:

    • Name of the pod: enter python-app-pod.

    • All selected ports will be exposed:

      • Select python-app.

      • Unselect redis.

  5. Click  Create Pod.

Verification
  1. Go to  Pods.

  2. Click python-app-pod.

  3. Go to Logs: see the combined logs from the two containers.

  4. Go to Summary: see the containers.

  5. Click python-app-podified.

  6. Click .

  7. Your browser opens http://localhost:8080 and displays Hello World! I have been seen 1 times.

  8. Go to  Containers: see the running containers.

Selecting containers to run in a pod (screencast)

Selecting containers to run in a pod (screencast)

Selecting containers to run in a pod (screencast)

Generating Kubernetes YAML from a pod

Prerequisites
  • A pod.

Procedure
  1. Go to  Pods.

  2. Click the pod.

  3. Go to Kube.

  4. Select and copy all the content.

Generatin Kubernetes YAML from a pod

Starting a pod from a Kubernetes YAML file

Prerequisites
  • A Kubernetes YAML file on your local machine.

Procedure
  1. Go to  Pods.

  2. Click Play Kubernetes YAML.

  3. Select file: select your Kubernetes YAML file (pods/redis-pod.yaml).

  4. Select runtime: select Using a Podman container engine.

  5. Click Play.

  6. Click Done.

Verification
  1. Go to  Pods.

  2. Click the pod you created.

  3. Go to Logs

  4. Go to Summary

  5. Go to Inspect

  6. Go to Terminal:

  7. Enter:

    redis-cli
    SET hello podman
    Get hello
  8. See "podman".

Starting a pod from Kubernetes YAML (screencast)

Podman Desktop extensions

  • Podman

  • Docker

  • Lima

  • OpenShift Local

  • Kind

  • Developer Sandbox

podman desktop extensions

Installing software from Podman Desktop

  • Podman

  • Kind

  • OpenShift Local

  • Docker Compose

  • Docker extensions

Choosing a Kubernetes distribution

generated_choosing-your-kubernetes-distribution

Developer Sandbox

Installing Developer Sandbox

Configuring Developer Sandbox

Deploying a pod to Developer Sandbox (screencast)

OpenShift Local

Installing OpenShift Local (screencast)

Playing Kubernetes YAML on OpenShift Local

Deploying to OpenShift Local

Pushing an image to OpenShift Local

Kind

Prerequisites
  • Podman with root privileges.

Procedure
  1. In the status bar, click on Kind

  2. Follow the prompts to install the kind CLI.

  3. Go to Settings > Resources.

  4. In the Kind tile, click on the Create new button.

  5. Enable the ingress controller option, and click Create.

Creating a Kind cluster (screenshot)

creating a kind cluster

Kind in the resources screen

kind resources

Creating a Kind cluster (screencast)

Working with a Kind cluster (screencast)

Playing Kubernetes YAML on Kind (screencast)

Deploying a pod to a Kind cluster (screencast)

Pushing an image to a Kind cluster (screencast)