{"id":3967,"date":"2024-04-02T17:29:05","date_gmt":"2024-04-02T17:29:05","guid":{"rendered":"https:\/\/code2deploy.com\/blog\/?p=3967"},"modified":"2024-04-02T17:29:06","modified_gmt":"2024-04-02T17:29:06","slug":"kubernetes-deployment","status":"publish","type":"post","link":"https:\/\/code2deploy.com\/blog\/kubernetes-deployment\/","title":{"rendered":"Kubernetes Deployment"},"content":{"rendered":"\n<ol class=\"wp-block-list\">\n<li>Deployment controller provides declarative updates for Pods and it manages stateless applications running on your cluster.<\/li>\n\n\n\n<li>Deployments represent a set of multiple, identical Pods and upgrade them in a controlled way, performing a rolling update by default.<\/li>\n\n\n\n<li>A Deployment runs multiple replicas of your application and automatically replaces any instances that fail or become unresponsive.<\/li>\n\n\n\n<li>In this way, Deployments ensure that one or more instances of your application are available to serve user requests.<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image\"><img data-dominant-color=\"000000\" data-has-transparency=\"false\" style=\"--dominant-color: #000000;\" loading=\"lazy\" decoding=\"async\" width=\"1\" height=\"1\" sizes=\"auto, (max-width: 1px) 100vw, 1px\" src=\"https:\/\/code2deploy.com\/blog\/wp-content\/uploads\/2024\/04\/image.png\" alt=\"\" class=\"wp-image-3968 not-transparent\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Create a deployment Yaml File:<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Follow the following statute and copy the pod template from the nginx-pod that you have created before.&nbsp;<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img data-dominant-color=\"242121\" data-has-transparency=\"false\" style=\"--dominant-color: #242121;\" loading=\"lazy\" decoding=\"async\" width=\"594\" height=\"433\" sizes=\"auto, (max-width: 594px) 100vw, 594px\" src=\"https:\/\/code2deploy.com\/blog\/wp-content\/uploads\/2024\/04\/image-1.png\" alt=\"\" class=\"wp-image-3969 not-transparent\" srcset=\"https:\/\/code2deploy.com\/blog\/wp-content\/uploads\/2024\/04\/image-1.png 594w, https:\/\/code2deploy.com\/blog\/wp-content\/uploads\/2024\/04\/image-1-300x219.png 300w\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Note: Deployment file writing tips are at the end of this deployment section, so do learn more.&nbsp;<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td><strong>$<\/strong><strong> sudo vim nginx-deployment.yaml<\/strong><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Enter the following manifest&nbsp;<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td><strong>apiVersion<\/strong><strong>: apps\/v1<\/strong><strong><br><\/strong><strong>kind<\/strong><strong>: Deployment<\/strong><strong><br><\/strong><strong>metadata<\/strong><strong>:<\/strong><strong><br><\/strong><strong> <\/strong><strong>name<\/strong><strong>: nginx-deployment<\/strong><strong><br><\/strong><strong> <\/strong><strong>labels<\/strong><strong>:<\/strong><strong><br><\/strong><strong> &nbsp; <\/strong><strong>app<\/strong><strong>: nginx<\/strong><strong><br><\/strong><strong>spec<\/strong><strong>:<\/strong><strong><br><\/strong><strong> <\/strong><strong>replicas<\/strong><strong>: <\/strong><strong>2<\/strong><strong><br><\/strong><strong> <\/strong><strong>selector<\/strong><strong>:<\/strong><strong><br><\/strong><strong> &nbsp; <\/strong><strong>matchLabels<\/strong><strong>:<\/strong><strong><br><\/strong><strong> &nbsp; &nbsp; <\/strong><strong>app<\/strong><strong>: nginx<\/strong><strong><br><\/strong><strong> <\/strong><strong>template<\/strong><strong>:<\/strong><strong><br><\/strong><strong> &nbsp; <\/strong><strong>metadata<\/strong><strong>:<\/strong><strong><br><\/strong><strong>&nbsp; &nbsp; <\/strong><strong>labels<\/strong><strong>:<\/strong><strong><br><\/strong><strong>&nbsp; &nbsp; &nbsp; <\/strong><strong>app<\/strong><strong>: nginx<\/strong><strong><br><\/strong><strong> &nbsp; <\/strong><strong>spec<\/strong><strong>:<\/strong><strong><br><\/strong><strong> &nbsp; &nbsp; <\/strong><strong>containers<\/strong><strong>:<\/strong><strong><br><\/strong><strong> &nbsp; &nbsp; &#8211; <\/strong><strong>name<\/strong><strong>: nginx<\/strong><strong><br><\/strong><strong> &nbsp; &nbsp; &nbsp; <\/strong><strong>image<\/strong><strong>: <\/strong><strong>nginx<\/strong><strong>:latest<\/strong><strong><br><\/strong><strong> &nbsp; &nbsp; &nbsp; <\/strong><strong>imagePullPolicy<\/strong><strong>: IfNotPresent<\/strong><strong><br><\/strong><strong> &nbsp; &nbsp; &nbsp; <\/strong><strong>ports<\/strong><strong>:<\/strong><strong><br><\/strong><strong> &nbsp; &nbsp; &nbsp; &#8211; <\/strong><strong>containerPort<\/strong><strong>: <\/strong><strong>80<\/strong><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Let\u2019s Create the nginx deployment:<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>$ kubectl create -f nginx-deployment.yaml<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">deployment.apps &#8220;nginx-deployment&#8221; created<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Display your deployments:<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>$ kubectl get deployments<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Expected Output:&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">NAME &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; READY &nbsp; UP-TO-DATE &nbsp; AVAILABLE &nbsp; AGE<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">nginx-deployment &nbsp; 2\/2 &nbsp; &nbsp; 2&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 2 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 10m<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Get details of a deployment:<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>$ kubectl describe deployment nginx-deployment<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Check the Pods:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>$ kubectl get pods<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Expected Output:&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">NAME&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; READY &nbsp; STATUS&nbsp; &nbsp; RESTARTS &nbsp; AGE<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">nginx-deployment-54b6f7ddf9-t9vct &nbsp; 1\/1 &nbsp; &nbsp; Running &nbsp; 0&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 12m<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">nginx-deployment-54b6f7ddf9-z77r2 &nbsp; 1\/1 &nbsp; &nbsp; Running &nbsp; 0&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 12m<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Check the status of the deployment:<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Note: <\/strong>Kubernetes deployment <strong>rollout<\/strong> is the process of<strong> <\/strong><strong><em>updating or replacing existing pods<\/em><\/strong> in a Kubernetes deployment. It is a crucial part of managing containerized applications in a Kubernetes environment. The rollout process can be performed using the <strong><em>&#8220;kubectl rollout&#8221;<\/em><\/strong> command or through the Kubernetes API. There are various strategies for deployment rollout, including <a href=\"https:\/\/code2deploy.com\/blog\/lets-know-about-blue-green-deployment\/\"><strong>blue-green<\/strong><\/a><strong> and canary deployments<\/strong>. It&#8217;s essential to understand the rollout process and plan it carefully to minimize downtime and ensure high availability of applications.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>$ kubectl rollout status deployment\/nginx-deployment<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">deployment &#8220;nginx-deployment&#8221; successfully rolled out<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Update the deployment:<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>$ kubectl set image deployment\/nginx-deployment nginx=nginx:latest<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">deployment.apps &#8220;nginx-deployment&#8221; image updated<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Rollback to previous revision:<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>$ kubectl rollout undo deployment\/nginx-deployment<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">deployment.apps &#8220;nginx-deployment&#8221;<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>$ kubectl rollout status deployment\/nginx-deployment<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">deployment &#8220;nginx-deployment&#8221; successfully rolled out<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Check Rollout history:<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>$ kubectl rollout history deployment\/nginx-deployment<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">deployments &#8220;nginx-deployment&#8221;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">REVISION&nbsp; CHANGE-CAUSE<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">2 &nbsp; &nbsp; &nbsp; &nbsp; &lt; none &gt;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">3 &nbsp; &nbsp; &nbsp; &nbsp; &lt; none &gt;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Scale a deployment:<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>$ kubectl scale deployment\/nginx-deployment &#8211;replicas=5<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">deployment.apps &#8220;nginx-deployment&#8221; scaled<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>$ kubectl get pods<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">NAME&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; READY &nbsp; STATUS&nbsp; &nbsp; RESTARTS &nbsp; AGE<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">nginx-deployment-54b6f7ddf9-6glt7 &nbsp; 1\/1 &nbsp; &nbsp; Running &nbsp; 0&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 4s<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">nginx-deployment-54b6f7ddf9-89bdn &nbsp; 1\/1 &nbsp; &nbsp; Running &nbsp; 0&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 2m8s<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">nginx-deployment-54b6f7ddf9-kx75w &nbsp; 1\/1 &nbsp; &nbsp; Running &nbsp; 0&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 2m9s<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">nginx-deployment-54b6f7ddf9-v49xn &nbsp; 1\/1 &nbsp; &nbsp; Running &nbsp; 0&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 4s<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">nginx-deployment-54b6f7ddf9-v6b7j &nbsp; 1\/1 &nbsp; &nbsp; Running &nbsp; 0&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 4s<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Edit a deployment:<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>$ kubectl edit deployment nginx-deployment<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Delete a deployment:<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>$ kubectl delete deployment nginx-deployment<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Writing a Deployment Spec<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">A Deployment manifest needs<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>apiVersion<\/li>\n\n\n\n<li>kind<\/li>\n\n\n\n<li>metadata<\/li>\n\n\n\n<li>spec<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>fields. <\/strong>The metadata field has <strong><em>names, labels, annotations<\/em><\/strong>, and other information.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The spec field has <strong>replicas<\/strong>, <strong>deployment strategy<\/strong>, <strong>pod template<\/strong>, <strong>selector<\/strong>, and other details.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Pod Template<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The<strong> spec.template<\/strong> is the only required field of the <strong>.spec.<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The <strong><em>spec.template <\/em><\/strong>is a pod template. It has the same schema as a Pod, except it is nested and does not have an apiVersion or kind.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>spec:<br>&nbsp; template:<br>&nbsp; &nbsp; metadata:<br>&nbsp; &nbsp; &nbsp; labels:<br>&nbsp; &nbsp; &nbsp; &nbsp; app: frontend<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Restart Policy<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Only a <strong><em>spec.template.spec.restartPolicy<\/em><\/strong> equal to Always is allowed, which is the default if not specified.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>spec:<br>&nbsp; template:<br>&nbsp; &nbsp; metadata:<br>&nbsp; &nbsp; &nbsp; labels:<br>&nbsp; &nbsp; &nbsp; &nbsp; app: frontend<br>&nbsp; &nbsp; spec:<br>&nbsp; &nbsp; &nbsp; restartPolicy : Always<br>&nbsp; &nbsp; &nbsp; containers:<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Replicas<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong><em>spec.replicas<\/em><\/strong> is an optional field that <strong>specifies the number of desired Pods<\/strong>. It defaults to 1.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>spec:<br>&nbsp; &nbsp; replicas: 3<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Selector<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong><em>spec.selector<\/em><\/strong> is an optional field that <strong>specifies a label selector for the Pods targeted by this deploymen<\/strong>t.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>spec:<br>&nbsp; &nbsp; replicas: 3<br>&nbsp; &nbsp; selector:<br>&nbsp; &nbsp; &nbsp; matchLabels:<br>&nbsp; &nbsp; &nbsp; &nbsp; app: fronted<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><strong><em>spec.selector<\/em><\/strong> <strong>must match<\/strong> .spec.template .metadata.labels, or it will be rejected by the API.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>spec:<br>&nbsp; replicas: 3<br>&nbsp; selector:<br>&nbsp; &nbsp; matchLabels:<br>&nbsp; &nbsp; &nbsp; app: fronted<br>&nbsp; template:<br>&nbsp; &nbsp; metadata:<br>&nbsp; &nbsp; &nbsp; labels:<br>&nbsp; &nbsp; &nbsp; &nbsp; app: fronted<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Strategy<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong><em>spec.strategy<\/em><\/strong> specifies the strategy used to replace old Pods by new ones. spec.strategy.type can be &#8220;Recreate&#8221; or &#8220;RollingUpdate&#8221;. &#8220;RollingUpdate&#8221; is the default value.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>spec:<br>&nbsp; replicas: 3<br>&nbsp; strategy:<br>&nbsp; &nbsp; type: RollingUpdate<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Deployment Failure<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Your Deployment may get stuck trying to deploy its newest ReplicaSet without ever completing it.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This can occur due to some of the following factors:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Insufficient quota<\/li>\n\n\n\n<li>Readiness probe failures<\/li>\n\n\n\n<li>Image pull errors<\/li>\n\n\n\n<li>Insufficient permissions<\/li>\n\n\n\n<li>Limit ranges<\/li>\n\n\n\n<li>Application run-time misconfiguration<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>kubernetes deployment more details with yaml manifest, creation, deletion,rollout, Rollback, Rollout history, and scaling.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[219,9,217],"tags":[462,11,464,463,15],"class_list":["post-3967","post","type-post","status-publish","format-standard","hentry","category-deployment","category-kubernetes","category-yaml","tag-deployment-manifest","tag-kubernetes-deployment","tag-rollback","tag-rollout","tag-yaml-manifest"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Kubernetes Deployment - code2deploy.com<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/blog.code2deploy.com\/kubernetes-deployment\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Kubernetes Deployment - code2deploy.com\" \/>\n<meta property=\"og:description\" content=\"kubernetes deployment more details with yaml manifest, creation, deletion,rollout, Rollback, Rollout history, and scaling.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/blog.code2deploy.com\/kubernetes-deployment\/\" \/>\n<meta property=\"og:site_name\" content=\"code2deploy.com\" \/>\n<meta property=\"article:published_time\" content=\"2024-04-02T17:29:05+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-04-02T17:29:06+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/blog.code2deploy.com\/wp-content\/uploads\/2024\/04\/image.png\" \/>\n<meta name=\"author\" content=\"enam\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"enam\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/blog.code2deploy.com\\\/kubernetes-deployment\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/blog.code2deploy.com\\\/kubernetes-deployment\\\/\"},\"author\":{\"name\":\"enam\",\"@id\":\"https:\\\/\\\/code2deploy.com\\\/blog\\\/#\\\/schema\\\/person\\\/e46930c19b999a87f12566fa8357481b\"},\"headline\":\"Kubernetes Deployment\",\"datePublished\":\"2024-04-02T17:29:05+00:00\",\"dateModified\":\"2024-04-02T17:29:06+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/blog.code2deploy.com\\\/kubernetes-deployment\\\/\"},\"wordCount\":940,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/code2deploy.com\\\/blog\\\/#\\\/schema\\\/person\\\/e46930c19b999a87f12566fa8357481b\"},\"image\":{\"@id\":\"https:\\\/\\\/blog.code2deploy.com\\\/kubernetes-deployment\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/code2deploy.com\\\/blog\\\/wp-content\\\/uploads\\\/2024\\\/04\\\/image.png\",\"keywords\":[\"deployment manifest\",\"Kubernetes deployment\",\"Rollback\",\"rollout\",\"YAML Manifest\"],\"articleSection\":[\"Deployment\",\"Kubernetes\",\"YAML\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/blog.code2deploy.com\\\/kubernetes-deployment\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/blog.code2deploy.com\\\/kubernetes-deployment\\\/\",\"url\":\"https:\\\/\\\/blog.code2deploy.com\\\/kubernetes-deployment\\\/\",\"name\":\"Kubernetes Deployment - code2deploy.com\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/code2deploy.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/blog.code2deploy.com\\\/kubernetes-deployment\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/blog.code2deploy.com\\\/kubernetes-deployment\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/code2deploy.com\\\/blog\\\/wp-content\\\/uploads\\\/2024\\\/04\\\/image.png\",\"datePublished\":\"2024-04-02T17:29:05+00:00\",\"dateModified\":\"2024-04-02T17:29:06+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/blog.code2deploy.com\\\/kubernetes-deployment\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/blog.code2deploy.com\\\/kubernetes-deployment\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/blog.code2deploy.com\\\/kubernetes-deployment\\\/#primaryimage\",\"url\":\"https:\\\/\\\/code2deploy.com\\\/blog\\\/wp-content\\\/uploads\\\/2024\\\/04\\\/image.png\",\"contentUrl\":\"https:\\\/\\\/code2deploy.com\\\/blog\\\/wp-content\\\/uploads\\\/2024\\\/04\\\/image.png\",\"width\":1,\"height\":1},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/blog.code2deploy.com\\\/kubernetes-deployment\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/code2deploy.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Kubernetes Deployment\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/code2deploy.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/code2deploy.com\\\/blog\\\/\",\"name\":\"code2deploy.com\\\/blog\",\"description\":\"TechOps\",\"publisher\":{\"@id\":\"https:\\\/\\\/code2deploy.com\\\/blog\\\/#\\\/schema\\\/person\\\/e46930c19b999a87f12566fa8357481b\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/code2deploy.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/code2deploy.com\\\/blog\\\/#\\\/schema\\\/person\\\/e46930c19b999a87f12566fa8357481b\",\"name\":\"enam\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/d864e2f082f4499f8f1b33f004ec166eea77b9e94738553b120b6dca2410f203?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/d864e2f082f4499f8f1b33f004ec166eea77b9e94738553b120b6dca2410f203?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/d864e2f082f4499f8f1b33f004ec166eea77b9e94738553b120b6dca2410f203?s=96&d=mm&r=g\",\"caption\":\"enam\"},\"logo\":{\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/d864e2f082f4499f8f1b33f004ec166eea77b9e94738553b120b6dca2410f203?s=96&d=mm&r=g\"},\"sameAs\":[\"https:\\\/\\\/code2deploy.com\\\/blog\"],\"url\":\"https:\\\/\\\/code2deploy.com\\\/blog\\\/author\\\/enam\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Kubernetes Deployment - code2deploy.com","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/blog.code2deploy.com\/kubernetes-deployment\/","og_locale":"en_US","og_type":"article","og_title":"Kubernetes Deployment - code2deploy.com","og_description":"kubernetes deployment more details with yaml manifest, creation, deletion,rollout, Rollback, Rollout history, and scaling.","og_url":"https:\/\/blog.code2deploy.com\/kubernetes-deployment\/","og_site_name":"code2deploy.com","article_published_time":"2024-04-02T17:29:05+00:00","article_modified_time":"2024-04-02T17:29:06+00:00","og_image":[{"url":"https:\/\/blog.code2deploy.com\/wp-content\/uploads\/2024\/04\/image.png","type":"","width":"","height":""}],"author":"enam","twitter_card":"summary_large_image","twitter_misc":{"Written by":"enam","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/blog.code2deploy.com\/kubernetes-deployment\/#article","isPartOf":{"@id":"https:\/\/blog.code2deploy.com\/kubernetes-deployment\/"},"author":{"name":"enam","@id":"https:\/\/code2deploy.com\/blog\/#\/schema\/person\/e46930c19b999a87f12566fa8357481b"},"headline":"Kubernetes Deployment","datePublished":"2024-04-02T17:29:05+00:00","dateModified":"2024-04-02T17:29:06+00:00","mainEntityOfPage":{"@id":"https:\/\/blog.code2deploy.com\/kubernetes-deployment\/"},"wordCount":940,"commentCount":0,"publisher":{"@id":"https:\/\/code2deploy.com\/blog\/#\/schema\/person\/e46930c19b999a87f12566fa8357481b"},"image":{"@id":"https:\/\/blog.code2deploy.com\/kubernetes-deployment\/#primaryimage"},"thumbnailUrl":"https:\/\/code2deploy.com\/blog\/wp-content\/uploads\/2024\/04\/image.png","keywords":["deployment manifest","Kubernetes deployment","Rollback","rollout","YAML Manifest"],"articleSection":["Deployment","Kubernetes","YAML"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/blog.code2deploy.com\/kubernetes-deployment\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/blog.code2deploy.com\/kubernetes-deployment\/","url":"https:\/\/blog.code2deploy.com\/kubernetes-deployment\/","name":"Kubernetes Deployment - code2deploy.com","isPartOf":{"@id":"https:\/\/code2deploy.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/blog.code2deploy.com\/kubernetes-deployment\/#primaryimage"},"image":{"@id":"https:\/\/blog.code2deploy.com\/kubernetes-deployment\/#primaryimage"},"thumbnailUrl":"https:\/\/code2deploy.com\/blog\/wp-content\/uploads\/2024\/04\/image.png","datePublished":"2024-04-02T17:29:05+00:00","dateModified":"2024-04-02T17:29:06+00:00","breadcrumb":{"@id":"https:\/\/blog.code2deploy.com\/kubernetes-deployment\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/blog.code2deploy.com\/kubernetes-deployment\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/blog.code2deploy.com\/kubernetes-deployment\/#primaryimage","url":"https:\/\/code2deploy.com\/blog\/wp-content\/uploads\/2024\/04\/image.png","contentUrl":"https:\/\/code2deploy.com\/blog\/wp-content\/uploads\/2024\/04\/image.png","width":1,"height":1},{"@type":"BreadcrumbList","@id":"https:\/\/blog.code2deploy.com\/kubernetes-deployment\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/code2deploy.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Kubernetes Deployment"}]},{"@type":"WebSite","@id":"https:\/\/code2deploy.com\/blog\/#website","url":"https:\/\/code2deploy.com\/blog\/","name":"code2deploy.com\/blog","description":"TechOps","publisher":{"@id":"https:\/\/code2deploy.com\/blog\/#\/schema\/person\/e46930c19b999a87f12566fa8357481b"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/code2deploy.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/code2deploy.com\/blog\/#\/schema\/person\/e46930c19b999a87f12566fa8357481b","name":"enam","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/d864e2f082f4499f8f1b33f004ec166eea77b9e94738553b120b6dca2410f203?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/d864e2f082f4499f8f1b33f004ec166eea77b9e94738553b120b6dca2410f203?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/d864e2f082f4499f8f1b33f004ec166eea77b9e94738553b120b6dca2410f203?s=96&d=mm&r=g","caption":"enam"},"logo":{"@id":"https:\/\/secure.gravatar.com\/avatar\/d864e2f082f4499f8f1b33f004ec166eea77b9e94738553b120b6dca2410f203?s=96&d=mm&r=g"},"sameAs":["https:\/\/code2deploy.com\/blog"],"url":"https:\/\/code2deploy.com\/blog\/author\/enam\/"}]}},"_links":{"self":[{"href":"https:\/\/code2deploy.com\/blog\/wp-json\/wp\/v2\/posts\/3967","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/code2deploy.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/code2deploy.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/code2deploy.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/code2deploy.com\/blog\/wp-json\/wp\/v2\/comments?post=3967"}],"version-history":[{"count":1,"href":"https:\/\/code2deploy.com\/blog\/wp-json\/wp\/v2\/posts\/3967\/revisions"}],"predecessor-version":[{"id":3970,"href":"https:\/\/code2deploy.com\/blog\/wp-json\/wp\/v2\/posts\/3967\/revisions\/3970"}],"wp:attachment":[{"href":"https:\/\/code2deploy.com\/blog\/wp-json\/wp\/v2\/media?parent=3967"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/code2deploy.com\/blog\/wp-json\/wp\/v2\/categories?post=3967"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/code2deploy.com\/blog\/wp-json\/wp\/v2\/tags?post=3967"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}