Skip to main content

Deploying a pod to Kubernetes

With Podman Desktop, you can deploy a pod to your Kubernetes cluster.

Prerequisites

  • Your are using the Podman container engine.
  • Your pod, running or stopped, is available on the Pods page: <your_pod>.
  • You registered the Kubernetes cluster in your kubeconfig file: <your_kubernetes_cluster>. For example, Creating a kind cluster.
  • The Kubernetes namespace to deploy to already exists.

Procedure

  1. Click Podman Desktop tray > Kubernetes > Context > <your_kubernetes_cluster> to set your Kubernetes context.
  2. Open Podman Desktop dashboard > Pods > <your_pod> to see the Pod Details page.
  3. Click to generate a Kubernetes pod.
  4. On the Deploy generated pod to Kubernetes screen, choose your options:
    1. Pod Name: edit the proposed name.
    2. Use Kubernetes Services: enable or disable Replace hostPort exposure on containers by Services. It is the recommended way to expose ports, as a cluster policy might prevent to use hostPort.
    3. Kubernetes namespace: select in the list the namespace to deploy the pod to.
  5. Click the Deploy button.

Verification

  • On the Deploy generated pod to Kubernetes screen, the created pod status is Phase: Running

    Deploying a pod

  • Go to Pods: your pod is in the list.