Deploying a pod or container to Kubernetes
With Podman Desktop, you can deploy a pod to your Kubernetes cluster with an active connection. Any container that is part of a pod is also deployable to your cluster.
Prerequisites
- You 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 cluster is reachable.
- Go to Settings > Kubernetes, and click Connect in the cluster tile.
- The Kubernetes namespace to deploy to already exists.
- Your container has a port that is exposed correctly to generate a service.
Procedure
-
Select your Kubernetes context.
-
Go to the Pods or Containers component page.
-
Click the overflow menu icon corresponding to the pod or container.
-
Select the Deploy to Kubernetes option from the dropdown list.
-
Select the checkbox to expose the service locally by using the default ingress controller.
-
Conditional: When you configure custom port mapping while running an image, you have the option to select an Ingress host port from the dropdown list.
Otherwise, you do not see the option.
-
Optional: Select a namespace from the dropdown list.
noteBy default, your pod or container is deployed to the
default
namespace. -
Click Deploy and then Done.
Verification
-
On the Deploy generated pod to Kubernetes screen, the created pod status is Phase: Running
-
Go to Kubernetes > Pods: your Kubernetes pod is in the list.
-
Optional: Check the running service on the Kubernetes > Services page.