2024-09-27 04:39:44 +00:00
<!doctype html>
< html lang = "en" dir = "ltr" class = "docs-wrapper plugin-docs plugin-id-tutorial docs-version-current docs-doc-page docs-doc-id-deploying-a-kubernetes-application" data-has-hydrated = "false" >
< head >
< meta charset = "UTF-8" >
2025-11-05 20:28:25 +00:00
< meta name = "generator" content = "Docusaurus v3.9.2" >
2025-09-08 13:08:00 +00:00
< title data-rh = "true" > Deploying a Kubernetes application | Podman Desktop< / title > < meta data-rh = "true" name = "viewport" content = "width=device-width,initial-scale=1" > < meta data-rh = "true" name = "twitter:card" content = "summary_large_image" > < meta data-rh = "true" property = "og:image" content = "https://podman-desktop.io/img/banner_podman-desktop.png" > < meta data-rh = "true" name = "twitter:image" content = "https://podman-desktop.io/img/banner_podman-desktop.png" > < meta data-rh = "true" property = "og:url" content = "https://podman-desktop.io/tutorial/deploying-a-kubernetes-application" > < meta data-rh = "true" property = "og:locale" content = "en" > < meta data-rh = "true" name = "docusaurus_locale" content = "en" > < meta data-rh = "true" name = "docsearch:language" content = "en" > < meta data-rh = "true" name = "docusaurus_version" content = "current" > < meta data-rh = "true" name = "docusaurus_tag" content = "docs-tutorial-current" > < meta data-rh = "true" name = "docsearch:version" content = "current" > < meta data-rh = "true" name = "docsearch:docusaurus_tag" content = "docs-tutorial-current" > < meta data-rh = "true" property = "og:title" content = "Deploying a Kubernetes application | Podman Desktop" > < meta data-rh = "true" name = "description" content = "Deploying a Kubernetes application" > < meta data-rh = "true" property = "og:description" content = "Deploying a Kubernetes application" > < meta data-rh = "true" name = "keywords" content = "podman desktop,podman,Kubernetes" > < link data-rh = "true" rel = "icon" href = "/img/favicon.ico" > < link data-rh = "true" rel = "canonical" href = "https://podman-desktop.io/tutorial/deploying-a-kubernetes-application" > < link data-rh = "true" rel = "alternate" href = "https://podman-desktop.io/tutorial/deploying-a-kubernetes-application" hreflang = "en" > < link data-rh = "true" rel = "alternate" href = "https://podman-desktop.io/tutorial/deploying-a-kubernetes-application" hreflang = "x-default" > < link data-rh = "true" rel = "preconnect" href = "https://MR01ANKQ9S-dsn.algolia.net" crossorigin = "anonymous" > < script data-rh = "true" type = "application/ld+json" > { "@context" : "https://schema.org" , "@type" : "BreadcrumbList" , "itemListElement" : [ { "@type" : "ListItem" , "position" : 1 , "name" : "Deploying a Kubernetes application" , "item" : "https://podman-desktop.io/tutorial/deploying-a-kubernetes-application" } ] } < / script > < link rel = "alternate" type = "application/rss+xml" href = "/blog/rss.xml" title = "Podman Desktop RSS Feed" >
2024-09-27 04:39:44 +00:00
< link rel = "alternate" type = "application/atom+xml" href = "/blog/atom.xml" title = "Podman Desktop Atom Feed" >
< link rel = "alternate" type = "application/json" href = "/blog/feed.json" title = "Podman Desktop JSON Feed" >
2025-01-14 13:36:07 +00:00
2024-09-27 04:39:44 +00:00
< link rel = "search" type = "application/opensearchdescription+xml" title = "Podman Desktop" href = "/opensearch.xml" >
< link rel = "preconnect" href = "https://podman-desktop-website.goatcounter.com" >
2026-03-19 08:37:32 +00:00
< script async src = "//gc.zgo.at/count.js" data-goatcounter = "https://podman-desktop-website.goatcounter.com/count" > < / script > < link rel = "stylesheet" href = "/assets/css/styles.82f9557a.css" >
2026-03-24 07:18:11 +00:00
< script src = "/assets/js/runtime~main.fab74bb8.js" defer = "defer" > < / script >
2026-03-24 06:15:43 +00:00
< script src = "/assets/js/main.243b7aca.js" defer = "defer" > < / script >
2024-09-27 04:39:44 +00:00
< / head >
< body class = "navigation-with-keyboard" >
2025-11-05 20:28:25 +00:00
< svg style = "display: none;" > < defs >
2025-09-08 13:08:00 +00:00
< symbol id = "theme-svg-external-link" viewBox = "0 0 24 24" > < path fill = "currentColor" d = "M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z" / > < / symbol >
< / defs > < / svg >
2026-02-26 12:56:08 +00:00
< script > ! function ( ) { var t = function ( ) { try { return new URLSearchParams ( window . location . search ) . get ( "docusaurus-theme" ) } catch ( t ) { } } ( ) || function ( ) { try { return window . localStorage . getItem ( "theme" ) } catch ( t ) { } } ( ) ; document . documentElement . setAttribute ( "data-theme" , t || ( window . matchMedia ( "(prefers-color-scheme: dark)" ) . matches ? "dark" : "light" ) ) , document . documentElement . setAttribute ( "data-theme-choice" , t || "system" ) } ( ) , function ( ) { try { const c = new URLSearchParams ( window . location . search ) . entries ( ) ; for ( var [ t , e ] of c ) if ( t . startsWith ( "docusaurus-data-" ) ) { var a = t . replace ( "docusaurus-data-" , "data-" ) ; document . documentElement . setAttribute ( a , e ) } } catch ( t ) { } } ( ) < / script > < div id = "__docusaurus" > < div role = "region" aria-label = "Skip to main content" > < a class = "skipToContent_oPtH" href = "#__docusaurus_skipToContent_fallback" > Skip to main content< / a > < / div > < nav aria-label = "Main" class = "theme-layout-navbar navbar navbar--fixed-top" > < div class = "navbar__inner" > < div class = "theme-layout-navbar-left navbar__items" > < button aria-label = "Toggle navigation bar" aria-expanded = "false" class = "navbar__toggle clean-btn" type = "button" > < svg width = "30" height = "30" viewBox = "0 0 30 30" aria-hidden = "true" > < path stroke = "currentColor" stroke-linecap = "round" stroke-miterlimit = "10" stroke-width = "2" d = "M4 7h22M4 15h22M4 23h22" > < / path > < / svg > < / button > < a class = "navbar__brand" href = "/" > < div class = "navbar__logo" > < img src = "/img/logo.svg" alt = "Podman Desktop Logo" class = "themedComponent_siVc themedComponent--light_hHel" height = "56" > < img src = "/img/logo.svg" alt = "Podman Desktop Logo" class = "themedComponent_siVc themedComponent--dark_yETr" height = "56" > < / div > < b class = "navbar__title text--truncate" > podman desktop< / b > < / a > < a class = "navbar__item navbar__link" href = "/docs/intro" > Documentation< / a > < a class = "navbar__item navbar__link" href = "/downloads" > Downloads< / a > < a class = "navbar__item navbar__link" href = "/community" > Community< / a > < div class = "navbar__item dropdown dropdown--hoverable" > < a href = "#" aria-haspopup = "true" aria-expanded = "false" role = "button" class = "navbar__link" > Resources< / a > < ul class = "dropdown__menu" > < li > < a class = "dropdown__link" href = "/features" > Features< / a > < / li > < li > < a aria-current = "page" class = "dropdown__link dropdown__link--active" href = "/tutorial" > Tutorials< / a > < / li > < li > < a class = "dropdown__link" href = "/extend" > Extend< / a > < / li > < / ul > < / div > < a class = "navbar__item navbar__link" href = "/blog" > Blog< / a > < / div > < div class = "theme-layout-navbar-right navbar__items navbar__items--right" > < a href = "https://github.com/podman-desktop/podman-desktop" target = "_blank" id = "github-stars-button" rel = "noopener noreferrer" class = "navbar__item navbar__link hidden xl:flex items-center gap-2 px-4 mr-3 py-[9px] border border-black dark:border-white rounded-lg font-medium min-w-[9rem] text-base" > < svg data-prefix = "fab" data-icon = "github" class = "svg-inline--fa fa-github" role = "img" viewBox = "0 0 512 512" aria-hidden = "true" > < path fill = "currentColor" d = "M173.9 397 . 4c0 2-2 . 3 3 . 6-5 . 2 3 . 6-3 . 3 . 3-5 . 6-1 . 3-5 . 6-3 . 6 0-2 2 . 3-3 . 6 5 . 2-3 . 6 3- . 3 5 . 6 1 . 3 5 . 6 3 . 6zm-31 . 1-4 . 5c- . 7 2 1 . 3 4 . 3 4 . 3 4 . 9 2 . 6 1 5 . 6 0 6 . 2-2s-1 . 3-4 . 3-4 . 3-5 . 2c-2 . 6- . 7-5 . 5 . 3-6 . 2 2 . 3zm44 . 2-1 . 7c-2 . 9 . 7-4 . 9 2 . 6-4 . 6 4 . 9 . 3 2 2 . 9 3 . 3 5 . 9 2 . 6 2 . 9- . 7 4 . 9-2 . 6 4 . 6-4 . 6- . 3-1 . 9-3-3 . 2-5 . 9-2 . 9zM252 . 8 8c-138 . 7 0-244 . 8 105 . 3-244 . 8 244 0 110 . 9 69 . 8 205 . 8 169 . 5 239 . 2 12 . 8 2 . 3 17 . 3-5 . 6 17 . 3-12 . 1 0-6 . 2- . 3-40 . 4- . 3-61 . 4 0 0-70 15-84 . 7-29 . 8 0 0-11 . 4-29 . 1-27 . 8-36 . 6 0 0-22 . 9-15 . 7 1 . 6-15 . 4 0 0 24 . 9 2 38 . 6 25 . 8 21 . 9 38 . 6 58 . 6 27 . 5 72 . 9 20 . 9 2 . 3-16 8 . 8-27 . 1 16-33 . 7-55 . 9-6 . 2-112 . 3-14 . 3-112 . 3-110 . 5 0-27 . 5 7 . 6-41 . 3 23 . 6-58 . 9-2 . 6-6 . 5-11 . 1-33 . 3 2 . 6-67 . 9 20 . 9-6 . 5 69 27 69 27 20-5 . 6 41 . 5-8 . 5 62 . 8-8 . 5s42 . 8 2 . 9 62 . 8 8 . 5c0 0 48 . 1-33 . 6 69-27 13 . 7 34 . 7 5 . 2 61 . 4 2 . 6 67 . 9 16 17 . 7 25 . 8 31 . 5 25 . 8 58 . 9 0 96 . 5-58 . 9 104 . 2-114 . 8 110 . 5 9 . 2 7 . 9 17 22 . 9 17 46 . 4 0 33 . 7- . 3 75 . 4- . 3 83 . 6 0 6 . 5 4 . 6 14 . 4 17 . 3 12 . 1 100-33 . 2 167 . 8-128 . 1 167 . 8-239 0-138 . 7-112 . 5-244-251 . 2-244zM105 . 2 352 . 9c-1 . 3 1-1 3 . 3 . 7 5 . 2 1 . 6 1 . 6 3 . 9 2 . 3 5 . 2 1 1 . 3-1 1-3 . 3- . 7-5 . 2-1 . 6-1 . 6-3 . 9-2 . 3-5 . 2-1zm-10 . 8-8 . 1c- . 7 1 . 3 . 3 2 . 9 2 . 3 3 . 9 1 . 6 1 3 . 6 . 7 4 . 3- . 7 . 7-1 . 3- . 3-2 . 9-2 . 3-3 . 9-2- . 6-3 . 6- . 3-4 . 3 . 7zm32 . 4 35 . 6c-1 . 6 1 . 3-1 4 . 3 1 . 3 6 . 2 2 . 3 2 . 3 5 . 2 2 . 6 6 . 5 1 1 . 3-1 . 3 . 7-4 .
2024-09-27 04:39:44 +00:00
< p > This tutorial covers the following end-to-end tasks required to deploy an application in a Kubernetes cluster:< / p >
< ul >
2025-11-05 20:28:25 +00:00
< li class = "" > Set the Kubernetes context< / li >
< li class = "" > Creating a deployment< / li >
< li class = "" > Creating a service< / li >
< li class = "" > Verifying the service: port forwarding< / li >
2024-09-27 04:39:44 +00:00
< / ul >
< p > If you have multiple Kubernetes contexts, you must set the correct context in which you want to create your application resources. Within a Kubernetes cluster, you can access the application by its internal IP address. However, if you want to make your application accessible from an outside network, you must expose the pod containing your application as a Kubernetes service.
To access the service running on your Kubernetes cluster, you can use one of the following options:< / p >
< ul >
2025-11-05 20:28:25 +00:00
< li class = "" > Configure port forwarding< / li >
< li class = "" > < a class = "" href = "/docs/kind/building-an-image-and-testing-it-in-kind" > Create an ingress controller< / a > < / li >
2024-09-27 04:39:44 +00:00
< / ul >
2025-11-05 20:28:25 +00:00
< h2 class = "anchor anchorTargetStickyNavbar_tleR" id = "before-you-begin" > Before you begin< a href = "#before-you-begin" class = "hash-link" aria-label = "Direct link to Before you begin" title = "Direct link to Before you begin" translate = "no" > < / a > < / h2 >
2024-09-27 04:39:44 +00:00
< p > Make sure you have:< / p >
< ul >
2025-11-05 20:28:25 +00:00
< li class = "" > < a class = "" href = "/docs/installation" > Installed Podman Desktop< / a > .< / li >
< li class = "" > < a class = "" href = "/docs/podman/creating-a-podman-machine" > A running Podman machine< / a > .< / li >
< li class = "" > < a class = "" href = "/docs/kind/creating-a-kind-cluster" > A running Kubernetes cluster< / a > .< / li >
< li class = "" > A reachable cluster connection:<!-- -->
2025-06-10 07:20:54 +00:00
< ul >
2025-11-05 20:28:25 +00:00
< li class = "" > Go to < strong > Settings > Kubernetes< / strong > , and click < strong > Connect< / strong > in the cluster tile.< / li >
2025-06-10 07:20:54 +00:00
< / ul >
< / li >
2025-11-05 20:28:25 +00:00
< li class = "" > A developer role.< / li >
< li class = "" > Created a < code > Deployment< / code > file using the following code, if you do not have one on your machine:< / li >
2024-09-27 04:39:44 +00:00
< / ul >
2025-09-08 13:08:00 +00:00
< div class = "language-yaml codeBlockContainer_mQmQ theme-code-block" style = "--prism-color:#F8F8F2;--prism-background-color:#282A36" > < div class = "codeBlockContent_t_Hd" > < pre tabindex = "0" class = "prism-code language-yaml codeBlock_RMoD thin-scrollbar" style = "color:#F8F8F2;background-color:#282A36" > < code class = "codeBlockLines_AclH" > < span class = "token-line" style = "color:#F8F8F2" > < span class = "token key atrule" > apiVersion< / span > < span class = "token punctuation" style = "color:rgb(248, 248, 242)" > :< / span > < span class = "token plain" > apps/v1< / span > < br > < / span > < span class = "token-line" style = "color:#F8F8F2" > < span class = "token plain" > < / span > < span class = "token key atrule" > kind< / span > < span class = "token punctuation" style = "color:rgb(248, 248, 242)" > :< / span > < span class = "token plain" > Deployment< / span > < br > < / span > < span class = "token-line" style = "color:#F8F8F2" > < span class = "token plain" > < / span > < span class = "token key atrule" > metadata< / span > < span class = "token punctuation" style = "color:rgb(248, 248, 242)" > :< / span > < span class = "token plain" > < / span > < br > < / span > < span class = "token-line" style = "color:#F8F8F2" > < span class = "token plain" > < / span > < span class = "token key atrule" > name< / span > < span class = "token punctuation" style = "color:rgb(248, 248, 242)" > :< / span > < span class = "token plain" > my< / span > < span class = "token punctuation" style = "color:rgb(248, 248, 242)" > -< / span > < span class = "token plain" > nginx< / span > < br > < / span > < span class = "token-line" style = "color:#F8F8F2" > < span class = "token plain" > < / span > < span class = "token key atrule" > spec< / span > < span class = "token punctuation" style = "color:rgb(248, 248, 242)" > :< / span > < span class = "token plain" > < / span > < br > < / span > < span class = "token-line" style = "color:#F8F8F2" > < span class = "token plain" > < / span > < span class = "token key atrule" > selector< / span > < span class = "token punctuation" style = "color:rgb(248, 248, 242)" > :< / span > < span class = "token plain" > < / span > < br > < / span > < span class = "token-line" style = "color:#F8F8F2" > < span class = "token plain" > < / span > < span class = "token key atrule" > matchLabels< / span > < span class = "token punctuation" style = "color:rgb(248, 248, 242)" > :< / span > < span class = "token plain" > < / span > < br > < / span > < span class = "token-line" style = "color:#F8F8F2" > < span class = "token plain" > < / span > < span class = "token key atrule" > run< / span > < span class = "token punctuation" style = "color:rgb(248, 248, 242)" > :< / span > < span class = "token plain" > my< / span > < span class = "token punctuation" style = "color:rgb(248, 248, 242)" > -< / span > < span class = "token plain" > nginx< / span > < br > < / span > < span class = "token-line" style = "color:#F8F8F2" > < span class = "token plain" > < / span > < span class = "token key atrule" > replicas< / span > < span class = "token punctuation" style = "color:rgb(248, 248, 242)" > :< / span > < span class = "token plain" > < / span > < span class = "token number" > 2< / span > < span class = "token plain" > < / span > < br > < / span > < span class = "token-line" style = "color:#F8F8F2" > < span class = "token plain" > < / span > < span class = "token key atrule" > template< / span > < span class = "token punctuation" style = "color:rgb(248, 248, 242)" > :< / span > < span class = "token plain" > < / span > < br > < / span > < span class = "token-line" style = "color:#F8F8F2" > < span class = "token plain" > < / span > < span class = "token key atrule" > metadata< / span > < span class = "token punctuation" style = "color:rgb(248, 248, 242)" > :< / span > < span class = "token plain" > < / span > < br > < / span > < span class = "token-line" style = "color:#F8F8F2" > < span class = "token plain" > < / span > < span class = "token key atrule" > labels< / span > < span class = "token punctuation" style = "color:rgb(248, 248, 242)" > :< / span > < span class = "token plain" > < / span > < br > < / span > < span class = "token-line" style = "color:#F8F8F2" > < span class = "token plain" > < / span > < span class = "token key atrule" > run< / span > < span class = "token punctuation" style = "color:rgb(248, 248, 242)" > :< / span > < span class = "token plain" > my< / span > < span class = "token punctuation" style = "color:rgb(248, 248, 242)" > -< / span > < span class = "token plain" > nginx< / span > < br > < / span > < span class = "token-line" style = "color:#F8F8F2" > < span class = "token plain" > < / span > < span class = "token key atrule" > spec< / span > < span class = "token punctuation" style = "color:rgb(248, 248, 242)" > :< /
2024-09-27 04:39:44 +00:00
< p > This YAML configuration creates a < code > my-nginx< / code > deployment running two Nginx pods.< / p >
< ul >
2025-11-05 20:28:25 +00:00
< li class = "" > Created a < code > Service< / code > file using the following code, if you do not have one on your machine:< / li >
2024-09-27 04:39:44 +00:00
< / ul >
2025-09-08 13:08:00 +00:00
< div class = "language-yaml codeBlockContainer_mQmQ theme-code-block" style = "--prism-color:#F8F8F2;--prism-background-color:#282A36" > < div class = "codeBlockContent_t_Hd" > < pre tabindex = "0" class = "prism-code language-yaml codeBlock_RMoD thin-scrollbar" style = "color:#F8F8F2;background-color:#282A36" > < code class = "codeBlockLines_AclH" > < span class = "token-line" style = "color:#F8F8F2" > < span class = "token key atrule" > apiVersion< / span > < span class = "token punctuation" style = "color:rgb(248, 248, 242)" > :< / span > < span class = "token plain" > v1< / span > < br > < / span > < span class = "token-line" style = "color:#F8F8F2" > < span class = "token plain" > < / span > < span class = "token key atrule" > kind< / span > < span class = "token punctuation" style = "color:rgb(248, 248, 242)" > :< / span > < span class = "token plain" > Service< / span > < br > < / span > < span class = "token-line" style = "color:#F8F8F2" > < span class = "token plain" > < / span > < span class = "token key atrule" > metadata< / span > < span class = "token punctuation" style = "color:rgb(248, 248, 242)" > :< / span > < span class = "token plain" > < / span > < br > < / span > < span class = "token-line" style = "color:#F8F8F2" > < span class = "token plain" > < / span > < span class = "token key atrule" > name< / span > < span class = "token punctuation" style = "color:rgb(248, 248, 242)" > :< / span > < span class = "token plain" > my< / span > < span class = "token punctuation" style = "color:rgb(248, 248, 242)" > -< / span > < span class = "token plain" > nginx< / span > < br > < / span > < span class = "token-line" style = "color:#F8F8F2" > < span class = "token plain" > < / span > < span class = "token key atrule" > labels< / span > < span class = "token punctuation" style = "color:rgb(248, 248, 242)" > :< / span > < span class = "token plain" > < / span > < br > < / span > < span class = "token-line" style = "color:#F8F8F2" > < span class = "token plain" > < / span > < span class = "token key atrule" > run< / span > < span class = "token punctuation" style = "color:rgb(248, 248, 242)" > :< / span > < span class = "token plain" > my< / span > < span class = "token punctuation" style = "color:rgb(248, 248, 242)" > -< / span > < span class = "token plain" > nginx< / span > < br > < / span > < span class = "token-line" style = "color:#F8F8F2" > < span class = "token plain" > < / span > < span class = "token key atrule" > spec< / span > < span class = "token punctuation" style = "color:rgb(248, 248, 242)" > :< / span > < span class = "token plain" > < / span > < br > < / span > < span class = "token-line" style = "color:#F8F8F2" > < span class = "token plain" > < / span > < span class = "token key atrule" > ports< / span > < span class = "token punctuation" style = "color:rgb(248, 248, 242)" > :< / span > < span class = "token plain" > < / span > < br > < / span > < span class = "token-line" style = "color:#F8F8F2" > < span class = "token plain" > < / span > < span class = "token punctuation" style = "color:rgb(248, 248, 242)" > -< / span > < span class = "token plain" > < / span > < span class = "token key atrule" > port< / span > < span class = "token punctuation" style = "color:rgb(248, 248, 242)" > :< / span > < span class = "token plain" > < / span > < span class = "token number" > 80< / span > < span class = "token plain" > < / span > < br > < / span > < span class = "token-line" style = "color:#F8F8F2" > < span class = "token plain" > < / span > < span class = "token key atrule" > protocol< / span > < span class = "token punctuation" style = "color:rgb(248, 248, 242)" > :< / span > < span class = "token plain" > TCP< / span > < br > < / span > < span class = "token-line" style = "color:#F8F8F2" > < span class = "token plain" > < / span > < span class = "token key atrule" > targetPort< / span > < span class = "token punctuation" style = "color:rgb(248, 248, 242)" > :< / span > < span class = "token plain" > < / span > < span class = "token number" > 80< / span > < span class = "token plain" > < / span > < br > < / span > < span class = "token-line" style = "color:#F8F8F2" > < span class = "token plain" > < / span > < span class = "token key atrule" > selector< / span > < span class = "token punctuation" style = "color:rgb(248, 248, 242)" > :< / span > < span class = "token plain" > < / span > < br > < / span > < span class = "token-line" style = "color:#F8F8F2" > < span class = "token plain" > < / span > < span class = "token key atrule" > run< / span > < span class = "token punctuation" style = "color:rgb(248, 248, 242)" > :< / span > < span class = "token plain" > my< / span > < span class = "token punctuation" style = "color:rgb(248, 248, 242)" > -< / span > < span class = "token plain" > nginx< / span > < br > < / span > < / code > < / pre > < / div > < / div >
2024-09-27 04:39:44 +00:00
< p > This YAML configuration creates a service named < code > my-nginx< / code > to expose the Nginx deployment outside the Kubernetes cluster. The service listens client requests on port < code > 80< / code > and then forwards them to a target port < code > 80< / code > on the container.< / p >
2025-11-05 20:28:25 +00:00
< h2 class = "anchor anchorTargetStickyNavbar_tleR" id = "setting-the-kubernetes-context" > Setting the Kubernetes context< a href = "#setting-the-kubernetes-context" class = "hash-link" aria-label = "Direct link to Setting the Kubernetes context" title = "Direct link to Setting the Kubernetes context" translate = "no" > < / a > < / h2 >
2024-09-27 04:39:44 +00:00
< ol >
2025-11-05 20:28:25 +00:00
< li class = "" > Go to < strong > Settings > Kubernetes< / strong > .< / li >
< li class = "" > Set the current Kubernetes context. For example, if you want to use a Kind cluster, use the < strong > Set as Current Context< / strong > icon in the UI:
2025-06-10 07:20:54 +00:00
< img decoding = "async" loading = "lazy" alt = "setting context" src = "/assets/images/setting-context-98070ce1c07467a3c2fcc44b0ac9ff95.png" width = "1446" height = "404" class = "img_SS3x" > < / li >
2024-09-27 04:39:44 +00:00
< / ol >
2025-11-05 20:28:25 +00:00
< h2 class = "anchor anchorTargetStickyNavbar_tleR" id = "creating-a-deployment" > Creating a deployment< a href = "#creating-a-deployment" class = "hash-link" aria-label = "Direct link to Creating a deployment" title = "Direct link to Creating a deployment" translate = "no" > < / a > < / h2 >
2024-09-27 04:39:44 +00:00
< ol >
2025-11-05 20:28:25 +00:00
< li class = "" > Go to Kubernetes explorer from the left navigation pane.< / li >
< li class = "" > Go to < strong > Deployments< / strong > and Click < strong > Apply YAML< / strong > .
2025-04-04 13:35:35 +00:00
< img decoding = "async" loading = "lazy" alt = "apply deployment yaml" src = "/assets/images/apply-deployment-yaml-bd78e356fc977876697cd5dd8fe0ca1a.png" width = "983" height = "184" class = "img_SS3x" > < / li >
2025-11-05 20:28:25 +00:00
< li class = "" > Select the YAML configuration file and click < strong > Open< / strong > . A successful operation notification opens.
2024-09-27 04:39:44 +00:00
< img decoding = "async" loading = "lazy" alt = "notification" src = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAf0AAAC1CAYAAABVsCY9AAAACXBIWXMAAA7EAAAOxAGVKw4bAAAdWklEQVR4nO3dd3RUdf7/8WcmM5NJSDK0BEIJkNBDr4vltwqKDWGxfb9ARAFFRUUXAQvg4uq6KCwiiBRBASmKuhrgi4Iigg1EViBBQgsQEloCpJFMpv7+iMwSE0ogIcJ9Pc7xHO6de+/nfT85x9d8PrdMQEREhC8v7xTBwcE0atSQX3/dQUxMLCdOHCcrKwubz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JkyYAZGRkXFR9IiJy+WVlZZU68N25c9dFD4jPpUJfzpOYmMSQIUNxOp3ExsaQlZVFbm4usbExOJ1OhgwZyq+//npJbRQWFvLqqxNwOAqJjx9A+/btWL36S774YhWBgSaaNWvK++8v5NSpU8X2O3gwjf/85xduueVmqlWrxsKFi1i69CMAMjIyGTFiFFu2bOX666/lgQcGUq9ePWrUqH5Jtb777nu8884cgoODGTjwfnr0uNF/KQHgzTensW/fPu655y569rwJj8fDiy+OZ8WKlTRp0pghQwbTrl1batYsegGR2+2mefNmPPDAQNq2bcMXX6wqdn+BiIjImQLCwsL8d9a1aNGO1NSy31R3oRo0aIDb7SI9/eJGyyIiIlI20dEx7NixBbhMP7hz2oEDBy5ncyIiInIG/bSuiIiIQSj0RUREDEKhLyIiYhAKfREREYNQ6IuIiBiEQl9ERMQgFPoi
2025-11-05 20:28:25 +00:00
< li class = "" > Click < strong > OK< / strong > .< / li >
< li class = "" > View the newly created < code > my-nginx< / code > deployment on the same page.
2025-04-04 13:35:35 +00:00
< img decoding = "async" loading = "lazy" alt = "new deployment" src = "/assets/images/new-deployment-a17a99d6d175208da6e0d14c3d0cd1c9.png" width = "990" height = "234" class = "img_SS3x" > < / li >
2025-11-05 20:28:25 +00:00
< li class = "" > Click < strong > Pods< / strong > in the Kubernetes explorer.< / li >
< li class = "" > View the created < code > my-nginx< / code > pods.
2025-04-04 13:35:35 +00:00
< img decoding = "async" loading = "lazy" alt = "new running pods" src = "/assets/images/running-pods-e4697c060e0b491e05cc4401eab984ab.png" width = "1726" height = "522" class = "img_SS3x" > < / li >
2024-09-27 04:39:44 +00:00
< / ol >
2025-11-05 20:28:25 +00:00
< h2 class = "anchor anchorTargetStickyNavbar_tleR" id = "creating-a-service" > Creating a service< a href = "#creating-a-service" class = "hash-link" aria-label = "Direct link to Creating a service" title = "Direct link to Creating a service" translate = "no" > < / a > < / h2 >
2024-09-27 04:39:44 +00:00
< ol >
2025-11-05 20:28:25 +00:00
< li class = "" > In the Kubernetes explorer, go to < strong > Services< / strong > .< / li >
< li class = "" > Click < strong > Apply YAML< / strong > .< / li >
< li class = "" > Select the YAML configuration file and click < strong > Open< / strong > . A successful operation notification opens.< / li >
< li class = "" > Click < strong > OK< / strong > .< / li >
< li class = "" > View the newly created service on the same page.
2025-04-04 13:35:35 +00:00
< img decoding = "async" loading = "lazy" alt = "new service object" src = "/assets/images/new-service-object-12341e147dfb5c58745e03b23274f94a.png" width = "1534" height = "464" class = "img_SS3x" > < / li >
2024-09-27 04:39:44 +00:00
< / ol >
2025-11-05 20:28:25 +00:00
< h2 class = "anchor anchorTargetStickyNavbar_tleR" id = "verifying-the-service-port-forwarding" > Verifying the service: port forwarding< a href = "#verifying-the-service-port-forwarding" class = "hash-link" aria-label = "Direct link to Verifying the service: port forwarding" title = "Direct link to Verifying the service: port forwarding" translate = "no" > < / a > < / h2 >
2024-09-27 04:39:44 +00:00
< ol >
2025-11-05 20:28:25 +00:00
< li class = "" > In the Kubernetes explorer, go to < strong > Services< / strong > .< / li >
< li class = "" > Click the name of the < code > my-nginx< / code > service.< / li >
< li class = "" > Click < strong > Forward...< / strong > .
2024-11-21 10:03:00 +00:00
< img decoding = "async" loading = "lazy" alt = "forward button" src = "/assets/images/forward-button-2fc0dacd5cb17306353f4b560904c97b.png" width = "1450" height = "818" class = "img_SS3x" > < / li >
2025-11-05 20:28:25 +00:00
< li class = "" > Click < strong > Open< / strong > to view the Nginx welcome page in a web browser.
2024-11-21 10:03:00 +00:00
< img decoding = "async" loading = "lazy" alt = "welcome page" src = "/assets/images/welcome-page-6b899929eb5b581ad046b89aad7cf188.png" width = "1302" height = "556" class = "img_SS3x" > < / li >
2025-11-05 20:28:25 +00:00
< / ol > < / div > < footer class = "theme-doc-footer docusaurus-mt-lg" > < div class = "row margin-top--sm theme-doc-footer-tags-row" > < div class = "col" > < b > Tags:< / b > < ul class = "tags_Ow0B padding--none margin-left--sm" > < li class = "tag_DFxh" > < a rel = "tag" class = "tag_otG2 tagRegular_s0E1" href = "/tutorial/tags/podman-desktop" > podman-desktop< / a > < / li > < li class = "tag_DFxh" > < a rel = "tag" class = "tag_otG2 tagRegular_s0E1" href = "/tutorial/tags/deploying-a-kubernetes-application" > deploying-a-kubernetes-application< / a > < / li > < / ul > < / div > < / div > < / footer > < / article > < nav class = "docusaurus-mt-lg pagination-nav" aria-label = "Docs pages" > < a class = "pagination-nav__link pagination-nav__link--prev" href = "/tutorial/running-a-kubernetes-cluster" > < div class = "pagination-nav__sublabel" > Previous< / div > < div class = "pagination-nav__label" > Running a Kubernetes cluster< / div > < / a > < a class = "pagination-nav__link pagination-nav__link--next" href = "/tutorial/interacting-with-a-database-server" > < div class = "pagination-nav__sublabel" > Next< / div > < div class = "pagination-nav__label" > Interacting with a database server< / div > < / a > < / nav > < / div > < / div > < div class = "col col--3" > < div class = "tableOfContents_XG6w thin-scrollbar theme-doc-toc-desktop" > < ul class = "table-of-contents table-of-contents__left-border" > < li > < a href = "#before-you-begin" class = "table-of-contents__link toc-highlight" > Before you begin< / a > < / li > < li > < a href = "#setting-the-kubernetes-context" class = "table-of-contents__link toc-highlight" > Setting the Kubernetes context< / a > < / li > < li > < a href = "#creating-a-deployment" class = "table-of-contents__link toc-highlight" > Creating a deployment< / a > < / li > < li > < a href = "#creating-a-service" class = "table-of-contents__link toc-highlight" > Creating a service< / a > < / li > < li > < a href = "#verifying-the-service-port-forwarding" class = "table-of-contents__link toc-highlight" > Verifying the service: port forwarding< / a > < / li > < / ul > < / div > < / div > < / div > < / div > < / main > < / div > < / div > < / div > < footer class = "theme-layout-footer footer" > < div class = "container container-fluid" > < div class = "row footer__links" > < div class = "theme-layout-footer-column col footer__col" > < div class = "footer__title" > Documentation< / div > < ul class = "footer__items clean-list" > < li class = "footer__item" > < a class = "footer__link-item" href = "/docs/installation" > Installing Podman Desktop< / a > < / li > < li class = "footer__item" > < a class = "footer__link-item" href = "/docs/migrating-from-docker" > Migrating from Docker< / a > < / li > < li class = "footer__item" > < a class = "footer__link-item" href = "/docs/kubernetes" > Working with Kubernetes< / a > < / li > < li class = "footer__item" > < a class = "footer__link-item" href = "/docs/troubleshooting" > Troubleshooting< / a > < / li > < / ul > < / div > < div class = "theme-layout-footer-column col footer__col" > < div class = "footer__title" > Links< / div > < ul class = "footer__items clean-list" > < li class = "footer__item" > < a href = "https://github.com/podman-desktop/podman-desktop" target = "_blank" rel = "noopener noreferrer" class = "footer__link-item" > GitHub< svg width = "13.5" height = "13.5" aria-label = "(opens in new tab)" class = "iconExternalLink_nPrP" > < use href = "#theme-svg-external-link" > < / use > < / svg > < / a > < / li > < li class = "footer__item" > < a href = "https://discord.com/invite/x5GzFF6QH4" target = "_blank" rel = "noopener noreferrer" class = "footer__link-item" > Chat (bridged): #podman-desktop on Discord< svg width = "13.5" height = "13.5" aria-label = "(opens in new tab)" class = "iconExternalLink_nPrP" > < use href = "#theme-svg-external-link" > < / use > < / svg > < / a > < / li > < li class = "footer__item" > < a href = "https://github.com/podman-desktop/podman-desktop#communication" target = "_blank" rel = "noopener noreferrer" class = "footer__link-item" > Other ways to Communicate< svg width = "13.5" height = "13.5" aria-label = "(opens in new tab)" class = "iconExternalLink_nPrP" > < use href = "#theme-svg-external-link" > < / use > < / svg > < / a > < / li > < li class = "footer__item" > < a href = "https://github.com/orgs/podman-desktop/projects/4/views/3" target = "_blank" rel = "noopener noreferrer" class = "footer__link-item" > Current Sprint< svg width = "13.5" height = "13.5" aria-label = "(opens in new tab)" class = "iconExternalLink_nPrP" > < use href = "#theme-svg-external-link" > < / use > < / svg > < / a > < / li > < / ul > < / div > < / div > < div class = "footer__bott
2025-04-14 17:49:47 +00:00
< div class = "flex flex-col items-start text-left gap-4" >
< div class = "w-96 mt-8 mb-8" >
< img class = "dark:hidden" alt = "Cloud Native Computing Foundation" src = "/img/cncf-logo.svg" >
< img class = "hidden dark:inline" alt = "Cloud Native Computing Foundation" src = "/img/cncf-logo-dark.svg" >
< / div >
< div class = "text-sm" >
< p class = "mb-1" > We are a < a href = "https://cncf.io/" class = "underline" > Cloud Native Computing Foundation< / a > sandbox project.< / p >
2026-01-02 09:09:39 +00:00
< p class = "mb-1" > © Copyright Podman Desktop Contributors 2026. © 2026 The Linux Foundation. All rights reserved.< / p >
2025-04-14 17:49:47 +00:00
< p class = "mb-1" > The Linux Foundation has registered trademarks and uses trademarks.
For a list of trademarks of The Linux Foundation, please see our
< a href = "https://www.linuxfoundation.org/trademark-usage/" class = "underline" > Trademark Usage< / a > page.< / p >
< / div >
< / div >
< / div > < / div > < / div > < / footer > < / div >
2024-09-27 04:39:44 +00:00
< / body >
< / html >