<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Thu Kha Kyawe</title>
    <description>The latest articles on DEV Community by Thu Kha Kyawe (@thukhakyawe_cloud).</description>
    <link>https://dev.to/thukhakyawe_cloud</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3601335%2Fd44a63a0-36bb-4c80-a1f0-1d55fd8ccc1c.png</url>
      <title>DEV Community: Thu Kha Kyawe</title>
      <link>https://dev.to/thukhakyawe_cloud</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/thukhakyawe_cloud"/>
    <language>en</language>
    <item>
      <title>10.Troubleshoot Deployment issues in Kubernetes</title>
      <dc:creator>Thu Kha Kyawe</dc:creator>
      <pubDate>Wed, 22 Apr 2026 23:30:00 +0000</pubDate>
      <link>https://dev.to/thukhakyawe_cloud/10troubleshoot-deployment-issues-in-kubernetes-o18</link>
      <guid>https://dev.to/thukhakyawe_cloud/10troubleshoot-deployment-issues-in-kubernetes-o18</guid>
      <description>&lt;h1&gt;
  
  
  Lab Information
&lt;/h1&gt;

&lt;p&gt;Last week, the Nautilus DevOps team deployed a redis app on Kubernetes cluster, which was working fine so far. This morning one of the team members was making some changes in this existing setup, but he made some mistakes and the app went down. We need to fix this as soon as possible. Please take a look.&lt;/p&gt;

&lt;p&gt;The deployment name is redis-deployment. The pods are not in running state right now, so please look into the issue and fix the same.&lt;/p&gt;

&lt;p&gt;Note: The kubectl utility on jump_host has been configured to work with the kubernetes cluster.&lt;/p&gt;

&lt;h1&gt;
  
  
  Lab Solutions
&lt;/h1&gt;

&lt;h1&gt;
  
  
  Step 1: Check the Current State of the Deployment
&lt;/h1&gt;

&lt;p&gt;First, let's see the current status of the Redis deployment and pods:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl get deployments
kubectl get pods
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fg3zxpz29b1d1ip3hrns8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fg3zxpz29b1d1ip3hrns8.png" alt=" " width="648" height="129"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Step 2: Examine the Pod Details
&lt;/h1&gt;

&lt;p&gt;Check the detailed status of the pods to identify the issue:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl describe pods
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Output&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;thor@jumphost ~$ kubectl describe pods 
Name:             redis-deployment-54cdf4f76d-pg2f5
Namespace:        default
Priority:         0
Service Account:  default
Node:             kodekloud-control-plane/172.17.0.2
Start Time:       Tue, 28 Oct 2025 13:05:03 +0000
Labels:           app=redis
                  pod-template-hash=54cdf4f76d
Annotations:      &amp;lt;none&amp;gt;
Status:           Pending
IP:               
IPs:              &amp;lt;none&amp;gt;
Controlled By:    ReplicaSet/redis-deployment-54cdf4f76d
Containers:
  redis-container:
    Container ID:   
    Image:          redis:alpin
    Image ID:       
    Port:           6379/TCP
    Host Port:      0/TCP
    State:          Waiting
      Reason:       ContainerCreating
    Ready:          False
    Restart Count:  0
    Requests:
      cpu:        300m
    Environment:  &amp;lt;none&amp;gt;
    Mounts:
      /redis-master from config (rw)
      /redis-master-data from data (rw)
      /var/run/secrets/kubernetes.io/serviceaccount from kube-api-access-nj6db (ro)
Conditions:
  Type              Status
  Initialized       True 
  Ready             False 
  ContainersReady   False 
  PodScheduled      True 
Volumes:
  data:
    Type:       EmptyDir (a temporary directory that shares a pod's lifetime)
    Medium:     
    SizeLimit:  &amp;lt;unset&amp;gt;
  config:
    Type:      ConfigMap (a volume populated by a ConfigMap)
    Name:      redis-conig
    Optional:  false
  kube-api-access-nj6db:
    Type:                    Projected (a volume that contains injected data from multiple sources)
    TokenExpirationSeconds:  3607
    ConfigMapName:           kube-root-ca.crt
    ConfigMapOptional:       &amp;lt;nil&amp;gt;
    DownwardAPI:             true
QoS Class:                   Burstable
Node-Selectors:              &amp;lt;none&amp;gt;
Tolerations:                 node.kubernetes.io/not-ready:NoExecute op=Exists for 300s
                             node.kubernetes.io/unreachable:NoExecute op=Exists for 300s
Events:
  Type     Reason       Age                 From               Message
  ----     ------       ----                ----               -------
  Normal   Scheduled    115s                default-scheduler  Successfully assigned default/redis-deployment-54cdf4f76d-pg2f5 to kodekloud-control-plane
  Warning  FailedMount  51s (x8 over 115s)  kubelet            MountVolume.SetUp failed for volume "config" : configmap "redis-conig" not found
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  Step 3: Check Pod Logs
&lt;/h1&gt;

&lt;p&gt;Examine the logs to see what errors are occurring:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl logs $(kubectl get pods -o name | grep redis)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7lit1eaczwrgrdif33c4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7lit1eaczwrgrdif33c4.png" alt=" " width="800" height="49"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Step 4: Common Issues and Fixes
&lt;/h1&gt;

&lt;p&gt;First, let's patch the deployment to use the correct Redis image:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl patch deployment redis-deployment -p '{"spec":{"template":{"spec":{"containers":[{"name":"redis-container","image":"redis:alpine"}]}}}}'
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fg4zygrg00x37ydgycm1v.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fg4zygrg00x37ydgycm1v.png" alt=" " width="800" height="54"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Step 5: Check if the ConfigMap is Required
&lt;/h1&gt;

&lt;p&gt;Let's see if we can remove the ConfigMap volume mount since it's causing the pod to fail:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl get configmaps
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdjsghfmfbbwkzr0o2vwn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdjsghfmfbbwkzr0o2vwn.png" alt=" " width="344" height="81"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Step 6: Fix the ConfigMap Name in the Deployment
&lt;/h1&gt;

&lt;p&gt;Let's patch the deployment to use the correct ConfigMap name:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl patch deployment redis-deployment -p '{"spec":{"template":{"spec":{"volumes":[{"name":"config","configMap":{"name":"redis-config"}}]}}}}'
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F95b1nos23zd04189y639.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F95b1nos23zd04189y639.png" alt=" " width="800" height="49"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Step 7: Verify the Pod Status
&lt;/h1&gt;

&lt;p&gt;Check if the pod is now starting properly:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl get pods
kubectl get deployment redis-deployment
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Faf1akpt4w5brmoclg0nx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Faf1akpt4w5brmoclg0nx.png" alt=" " width="621" height="143"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h5&gt;
  
  
  &lt;strong&gt;Resources &amp;amp; Next Steps&lt;/strong&gt;
&lt;/h5&gt;

&lt;h5&gt;
  
  
  📦 Full Code Repository: &lt;a href="https://github.com/thukhakyawe/100-Days-Of-DevOps-KodeKloud-Challenges-Solutions" rel="noopener noreferrer"&gt;KodeKloud Learning Labs&lt;/a&gt;
&lt;/h5&gt;

&lt;h5&gt;
  
  
  📖 More Deep Dives: &lt;a href="https://thukhakyawe.hashnode.dev/" rel="noopener noreferrer"&gt;Whispering Cloud Insights&lt;/a&gt; - Read other technical articles
&lt;/h5&gt;

&lt;h5&gt;
  
  
  💬 Join Discussion: &lt;a href="https://dev.to/thukhakyawe_cloud"&gt;DEV Community&lt;/a&gt; - Share your thoughts and questions
&lt;/h5&gt;

&lt;h5&gt;
  
  
  💼 Let's Connect: &lt;a href="https://www.linkedin.com/in/thukhakyawe/" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt; - I'd love to connect with you
&lt;/h5&gt;




&lt;h5&gt;
  
  
  &lt;strong&gt;Credits&lt;/strong&gt;
&lt;/h5&gt;

&lt;h5&gt;
  
  
  • All labs are from: &lt;a href="https://kodekloud.com/" rel="noopener noreferrer"&gt;KodeKloud&lt;/a&gt;
&lt;/h5&gt;

&lt;h5&gt;
  
  
  • I sincerely appreciate your provision of these valuable resources.
&lt;/h5&gt;




</description>
      <category>kodekloud</category>
      <category>kubernetes</category>
    </item>
    <item>
      <title>9.Deploy Node App on Kubernetes</title>
      <dc:creator>Thu Kha Kyawe</dc:creator>
      <pubDate>Wed, 22 Apr 2026 15:36:42 +0000</pubDate>
      <link>https://dev.to/thukhakyawe_cloud/9deploy-node-app-on-kubernetes-54o4</link>
      <guid>https://dev.to/thukhakyawe_cloud/9deploy-node-app-on-kubernetes-54o4</guid>
      <description>&lt;h1&gt;
  
  
  Lab Information
&lt;/h1&gt;

&lt;p&gt;The Nautilus development team has completed development of one of the node applications, which they are planning to deploy on a Kubernetes cluster. They recently had a meeting with the DevOps team to share their requirements. Based on that, the DevOps team has listed out the exact requirements to deploy the app. Find below more details:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Create a deployment using gcr.io/kodekloud/centos-ssh-enabled:node image, replica count must be 2.

Create a service to expose this app, the service type must be NodePort, targetPort must be 8080 and nodePort should be 30012.

Make sure all the pods are in Running state after the deployment.

You can check the application by clicking on NodeApp button on top bar.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;You can use any labels as per your choice.&lt;/p&gt;

&lt;p&gt;Note: The kubectl on jump_host has been configured to work with the kubernetes cluster.&lt;/p&gt;

&lt;h1&gt;
  
  
  Lab Solutions
&lt;/h1&gt;

&lt;h1&gt;
  
  
  Step 1: Create the Node.js Deployment YAML file
&lt;/h1&gt;

&lt;p&gt;Create the deployment configuration file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cat &amp;gt; node-deployment.yaml &amp;lt;&amp;lt; EOF
apiVersion: apps/v1
kind: Deployment
metadata:
  name: node-app-deployment
  labels:
    app: node-app
spec:
  replicas: 2
  selector:
    matchLabels:
      app: node-app
  template:
    metadata:
      labels:
        app: node-app
    spec:
      containers:
      - name: node-container
        image: gcr.io/kodekloud/centos-ssh-enabled:node
        ports:
        - containerPort: 8080
        resources:
          requests:
            memory: "256Mi"
            cpu: "100m"
          limits:
            memory: "512Mi"
            cpu: "500m"
EOF
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  Step 2: Create the Node.js Service YAML file
&lt;/h1&gt;

&lt;p&gt;Create the service configuration file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cat &amp;gt; node-service.yaml &amp;lt;&amp;lt; EOF
apiVersion: v1
kind: Service
metadata:
  name: node-app-service
  labels:
    app: node-app
spec:
  type: NodePort
  ports:
  - port: 8080
    targetPort: 8080
    nodePort: 30012
  selector:
    app: node-app
EOF
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  Step 3: Deploy the Node.js Deployment
&lt;/h1&gt;

&lt;p&gt;Apply the deployment to your Kubernetes cluster:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl apply -f node-deployment.yaml
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  Step 4: Deploy the Node.js Service
&lt;/h1&gt;

&lt;p&gt;Apply the service configuration:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl apply -f node-service.yaml
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fen8662kxspxb8xmw08j6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fen8662kxspxb8xmw08j6.png" alt=" " width="452" height="81"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Step 5: Verify the Deployment
&lt;/h1&gt;

&lt;p&gt;Check if the deployment was created successfully:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl get deployments
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  Step 6: Verify the Service
&lt;/h1&gt;

&lt;p&gt;Check if the service is running:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl get services
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fn8wz8u99ct5cybgr7fba.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fn8wz8u99ct5cybgr7fba.png" alt=" " width="675" height="136"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Step 7: Check the Pod Status
&lt;/h1&gt;

&lt;p&gt;Verify that both pods are running:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl get pods -l app=node-app
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpi09x7ak2l2i9gchdzzv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpi09x7ak2l2i9gchdzzv.png" alt=" " width="595" height="82"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Step 8: Test the Application
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5czrkn0l83p0gy0d8w91.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5czrkn0l83p0gy0d8w91.png" alt=" " width="800" height="350"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h5&gt;
  
  
  &lt;strong&gt;Resources &amp;amp; Next Steps&lt;/strong&gt;
&lt;/h5&gt;

&lt;h5&gt;
  
  
  📦 Full Code Repository: &lt;a href="https://github.com/thukhakyawe/100-Days-Of-DevOps-KodeKloud-Challenges-Solutions" rel="noopener noreferrer"&gt;KodeKloud Learning Labs&lt;/a&gt;
&lt;/h5&gt;

&lt;h5&gt;
  
  
  📖 More Deep Dives: &lt;a href="https://thukhakyawe.hashnode.dev/" rel="noopener noreferrer"&gt;Whispering Cloud Insights&lt;/a&gt; - Read other technical articles
&lt;/h5&gt;

&lt;h5&gt;
  
  
  💬 Join Discussion: &lt;a href="https://dev.to/thukhakyawe_cloud"&gt;DEV Community&lt;/a&gt; - Share your thoughts and questions
&lt;/h5&gt;

&lt;h5&gt;
  
  
  💼 Let's Connect: &lt;a href="https://www.linkedin.com/in/thukhakyawe/" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt; - I'd love to connect with you
&lt;/h5&gt;




&lt;h5&gt;
  
  
  &lt;strong&gt;Credits&lt;/strong&gt;
&lt;/h5&gt;

&lt;h5&gt;
  
  
  • All labs are from: &lt;a href="https://kodekloud.com/" rel="noopener noreferrer"&gt;KodeKloud&lt;/a&gt;
&lt;/h5&gt;

&lt;h5&gt;
  
  
  • I sincerely appreciate your provision of these valuable resources.
&lt;/h5&gt;




</description>
      <category>kodekloud</category>
      <category>kubernetes</category>
    </item>
    <item>
      <title>8.Deploy Tomcat App on Kubernetes</title>
      <dc:creator>Thu Kha Kyawe</dc:creator>
      <pubDate>Tue, 21 Apr 2026 15:29:49 +0000</pubDate>
      <link>https://dev.to/thukhakyawe_cloud/8deploy-tomcat-app-on-kubernetes-1njk</link>
      <guid>https://dev.to/thukhakyawe_cloud/8deploy-tomcat-app-on-kubernetes-1njk</guid>
      <description>&lt;h1&gt;
  
  
  Lab Information
&lt;/h1&gt;

&lt;p&gt;A new java-based application is ready to be deployed on a Kubernetes cluster. The development team had a meeting with the DevOps team to share the requirements and application scope. The team is ready to setup an application stack for it under their existing cluster. Below you can find the details for this:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Create a namespace named tomcat-namespace-xfusion.

Create a deployment for tomcat app which should be named as tomcat-deployment-xfusion under the same namespace you created. Replica count should be 1, the container should be named as tomcat-container-xfusion, its image should be gcr.io/kodekloud/centos-ssh-enabled:tomcat and its container port should be 8080.

Create a service for tomcat app which should be named as tomcat-service-xfusion under the same namespace you created. Service type should be NodePort and nodePort should be 32227.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Before clicking on Check button please make sure the application is up and running.&lt;/p&gt;

&lt;p&gt;You can use any labels as per your choice.&lt;/p&gt;

&lt;p&gt;Note: The kubectl on jump_host has been configured to work with the kubernetes cluster.&lt;/p&gt;

&lt;h1&gt;
  
  
  Lab Solutions
&lt;/h1&gt;

&lt;h1&gt;
  
  
  Step 1: Create the Namespace
&lt;/h1&gt;

&lt;p&gt;First, create the required namespace:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl create namespace tomcat-namespace-xfusion
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Verify the namespace was created:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl get namespaces | grep tomcat-namespace-xfusion
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6daseb09zoam9ecy3zhs.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6daseb09zoam9ecy3zhs.png" alt=" " width="594" height="116"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Step 2: Create the Tomcat Deployment YAML file
&lt;/h1&gt;

&lt;p&gt;Create the deployment configuration file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cat &amp;gt; tomcat-deployment.yaml &amp;lt;&amp;lt; EOF
apiVersion: apps/v1
kind: Deployment
metadata:
  name: tomcat-deployment-xfusion
  namespace: tomcat-namespace-xfusion
  labels:
    app: tomcat-app
    team: xfusion
spec:
  replicas: 1
  selector:
    matchLabels:
      app: tomcat-app
      team: xfusion
  template:
    metadata:
      labels:
        app: tomcat-app
        team: xfusion
    spec:
      containers:
      - name: tomcat-container-xfusion
        image: gcr.io/kodekloud/centos-ssh-enabled:tomcat
        ports:
        - containerPort: 8080
        resources:
          requests:
            memory: "256Mi"
            cpu: "100m"
          limits:
            memory: "512Mi"
            cpu: "500m"
EOF
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  Step 3: Create the Tomcat Service YAML file
&lt;/h1&gt;

&lt;p&gt;Create the service configuration file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cat &amp;gt; tomcat-service.yaml &amp;lt;&amp;lt; EOF
apiVersion: v1
kind: Service
metadata:
  name: tomcat-service-xfusion
  namespace: tomcat-namespace-xfusion
  labels:
    app: tomcat-app
    team: xfusion
spec:
  type: NodePort
  ports:
  - port: 8080
    targetPort: 8080
    nodePort: 32227
  selector:
    app: tomcat-app
    team: xfusion
EOF
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  Step 4: Deploy the Tomcat Deployment
&lt;/h1&gt;

&lt;p&gt;Apply the deployment to your Kubernetes cluster:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl apply -f tomcat-deployment.yaml
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  Step 5: Deploy the Tomcat Service
&lt;/h1&gt;

&lt;p&gt;Apply the service configuration:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl apply -f tomcat-service.yaml
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F65fgi5zdn785ymitm64r.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F65fgi5zdn785ymitm64r.png" alt=" " width="472" height="83"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Step 6: Verify the Deployment (Namespace-specific)
&lt;/h1&gt;

&lt;p&gt;Check if the deployment was created successfully in the correct namespace:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl get deployments -n tomcat-namespace-xfusion
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fd3e0dir7ol0ml4g02lz9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fd3e0dir7ol0ml4g02lz9.png" alt=" " width="562" height="63"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Step 7: Verify the Service (Namespace-specific)
&lt;/h1&gt;

&lt;p&gt;Check if the service is running in the correct namespace:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl get services -n tomcat-namespace-xfusion
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fshi5tb0qinjbzqr2z9cu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fshi5tb0qinjbzqr2z9cu.png" alt=" " width="712" height="66"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Step 8: Check the Pod Status (Namespace-specific)
&lt;/h1&gt;

&lt;p&gt;Verify that the Tomcat pod is running:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl get pods -n tomcat-namespace-xfusion -l app=tomcat-app
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6p4awyc05xqkp0g029o0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6p4awyc05xqkp0g029o0.png" alt=" " width="637" height="65"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Step 9: Verify Application is Running
&lt;/h1&gt;

&lt;p&gt;Check the pod logs to ensure Tomcat is running properly:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl logs -n tomcat-namespace-xfusion -l app=tomcat-app --tail=10
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0fdow6h419ahw4cxiyj9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0fdow6h419ahw4cxiyj9.png" alt=" " width="800" height="247"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Step 10: Test Service Accessibility
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fj1sfx9gtv2aclyo7zshv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fj1sfx9gtv2aclyo7zshv.png" alt=" " width="800" height="114"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h5&gt;
  
  
  &lt;strong&gt;Resources &amp;amp; Next Steps&lt;/strong&gt;
&lt;/h5&gt;

&lt;h5&gt;
  
  
  📦 Full Code Repository: &lt;a href="https://github.com/thukhakyawe/100-Days-Of-DevOps-KodeKloud-Challenges-Solutions" rel="noopener noreferrer"&gt;KodeKloud Learning Labs&lt;/a&gt;
&lt;/h5&gt;

&lt;h5&gt;
  
  
  📖 More Deep Dives: &lt;a href="https://thukhakyawe.hashnode.dev/" rel="noopener noreferrer"&gt;Whispering Cloud Insights&lt;/a&gt; - Read other technical articles
&lt;/h5&gt;

&lt;h5&gt;
  
  
  💬 Join Discussion: &lt;a href="https://dev.to/thukhakyawe_cloud"&gt;DEV Community&lt;/a&gt; - Share your thoughts and questions
&lt;/h5&gt;

&lt;h5&gt;
  
  
  💼 Let's Connect: &lt;a href="https://www.linkedin.com/in/thukhakyawe/" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt; - I'd love to connect with you
&lt;/h5&gt;




&lt;h5&gt;
  
  
  &lt;strong&gt;Credits&lt;/strong&gt;
&lt;/h5&gt;

&lt;h5&gt;
  
  
  • All labs are from: &lt;a href="https://kodekloud.com/" rel="noopener noreferrer"&gt;KodeKloud&lt;/a&gt;
&lt;/h5&gt;

&lt;h5&gt;
  
  
  • I sincerely appreciate your provision of these valuable resources.
&lt;/h5&gt;




</description>
      <category>kodekloud</category>
      <category>kubernetes</category>
    </item>
    <item>
      <title>50% Off Official AWS Exam Vouchers (Professional &amp; Specialty Certifications)</title>
      <dc:creator>Thu Kha Kyawe</dc:creator>
      <pubDate>Tue, 21 Apr 2026 03:26:26 +0000</pubDate>
      <link>https://dev.to/thukhakyawe_cloud/50-off-official-aws-exam-vouchers-professional-specialty-certifications-3d1d</link>
      <guid>https://dev.to/thukhakyawe_cloud/50-off-official-aws-exam-vouchers-professional-specialty-certifications-3d1d</guid>
      <description>&lt;p&gt;Noticed a strong offer from Pearson VUE, the official AWS exam provider: vouchers for AWS Professional and Specialty certifications appear to be discounted from $300 to $150.&lt;/p&gt;

&lt;p&gt;That’s especially notable because while many candidates receive a 50% retake/next-exam benefit after passing another certification, it’s less common to see this level of discount available directly through official voucher purchase.&lt;/p&gt;

&lt;p&gt;A few important notes:&lt;br&gt;
• Applies to Professional &amp;amp; Specialty exams&lt;br&gt;
• No discount shown for Foundational or Associate exams&lt;br&gt;
• Vouchers are valid for 12 months&lt;br&gt;
• Always review the full terms and conditions before purchasing&lt;/p&gt;

&lt;p&gt;My advice: don’t buy a voucher just because it’s discounted. Only purchase if you’re genuinely committed to the study plan and ready to sit the exam.&lt;/p&gt;

&lt;p&gt;Here is &lt;a href="https://awsstore.pearsonvue.com/shop/exam-vouchers" rel="noopener noreferrer"&gt;Official Link&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fywceauac4y237x4tszoi.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fywceauac4y237x4tszoi.png" alt=" " width="800" height="600"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbtf9lmx6j9yll2m1in31.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbtf9lmx6j9yll2m1in31.png" alt=" " width="800" height="529"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>aws</category>
      <category>exam</category>
      <category>certifications</category>
    </item>
    <item>
      <title>7.Deploy Grafana on Kubernetes Cluster</title>
      <dc:creator>Thu Kha Kyawe</dc:creator>
      <pubDate>Tue, 14 Apr 2026 14:03:22 +0000</pubDate>
      <link>https://dev.to/thukhakyawe_cloud/7deploy-grafana-on-kubernetes-cluster-20ch</link>
      <guid>https://dev.to/thukhakyawe_cloud/7deploy-grafana-on-kubernetes-cluster-20ch</guid>
      <description>&lt;h1&gt;
  
  
  Lab Information
&lt;/h1&gt;

&lt;p&gt;The Nautilus DevOps teams is planning to set up a Grafana tool to collect and analyze analytics from some applications. They are planning to deploy it on Kubernetes cluster. Below you can find more details.&lt;/p&gt;

&lt;p&gt;1.) Create a deployment named grafana-deployment-devops using any grafana image for Grafana app. Set other parameters as per your choice.&lt;/p&gt;

&lt;p&gt;2.) Create NodePort type service with nodePort 32000 to expose the app.&lt;/p&gt;

&lt;p&gt;You need not to make any configuration changes inside the Grafana app once deployed, just make sure you are able to access the Grafana login page.&lt;/p&gt;

&lt;p&gt;Note: The kubectl on jump_host has been configured to work with kubernetes cluster.&lt;/p&gt;

&lt;h1&gt;
  
  
  Lab Solutions
&lt;/h1&gt;

&lt;h1&gt;
  
  
  Step 1: Create the Grafana Deployment YAML file
&lt;/h1&gt;

&lt;p&gt;First, create a deployment configuration file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="s"&gt;cat &amp;gt; grafana-deployment.yaml &amp;lt;&amp;lt; EOF&lt;/span&gt;
&lt;span class="na"&gt;apiVersion&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;apps/v1&lt;/span&gt;
&lt;span class="na"&gt;kind&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Deployment&lt;/span&gt;
&lt;span class="na"&gt;metadata&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;grafana-deployment-devops&lt;/span&gt;
  &lt;span class="na"&gt;labels&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;app&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;grafana&lt;/span&gt;
&lt;span class="na"&gt;spec&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;replicas&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1&lt;/span&gt;
  &lt;span class="na"&gt;selector&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;matchLabels&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;app&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;grafana&lt;/span&gt;
  &lt;span class="na"&gt;template&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;metadata&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;labels&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
        &lt;span class="na"&gt;app&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;grafana&lt;/span&gt;
    &lt;span class="na"&gt;spec&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;containers&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;grafana&lt;/span&gt;
        &lt;span class="na"&gt;image&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;grafana/grafana:latest&lt;/span&gt;
        &lt;span class="na"&gt;ports&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
        &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;containerPort&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;3000&lt;/span&gt;
        &lt;span class="na"&gt;env&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
        &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;GF_SECURITY_ADMIN_PASSWORD&lt;/span&gt;
          &lt;span class="na"&gt;value&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;admin123"&lt;/span&gt;
        &lt;span class="na"&gt;resources&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
          &lt;span class="na"&gt;requests&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
            &lt;span class="na"&gt;memory&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;256Mi"&lt;/span&gt;
            &lt;span class="na"&gt;cpu&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;100m"&lt;/span&gt;
          &lt;span class="na"&gt;limits&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
            &lt;span class="na"&gt;memory&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;512Mi"&lt;/span&gt;
            &lt;span class="na"&gt;cpu&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;500m"&lt;/span&gt;
&lt;span class="s"&gt;EOF&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  Step 2: Create the NodePort Service YAML file
&lt;/h1&gt;

&lt;p&gt;Now create the service configuration:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="s"&gt;cat &amp;gt; grafana-service.yaml &amp;lt;&amp;lt; EOF&lt;/span&gt;
&lt;span class="na"&gt;apiVersion&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;v1&lt;/span&gt;
&lt;span class="na"&gt;kind&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Service&lt;/span&gt;
&lt;span class="na"&gt;metadata&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;grafana-service&lt;/span&gt;
  &lt;span class="na"&gt;labels&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;app&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;grafana&lt;/span&gt;
&lt;span class="na"&gt;spec&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;NodePort&lt;/span&gt;
  &lt;span class="na"&gt;ports&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;port&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;3000&lt;/span&gt;
    &lt;span class="na"&gt;targetPort&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;3000&lt;/span&gt;
    &lt;span class="na"&gt;nodePort&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;32000&lt;/span&gt;
  &lt;span class="na"&gt;selector&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;app&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;grafana&lt;/span&gt;
&lt;span class="s"&gt;EOF&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  Step 3: Deploy the Grafana Deployment
&lt;/h1&gt;

&lt;p&gt;Apply the deployment to your Kubernetes cluster:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl apply &lt;span class="nt"&gt;-f&lt;/span&gt; grafana-deployment.yaml
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  Step 4: Deploy the NodePort Service
&lt;/h1&gt;

&lt;p&gt;Apply the service configuration:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl apply &lt;span class="nt"&gt;-f&lt;/span&gt; grafana-service.yaml
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2m99fa8i6bkc3mdyiake.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2m99fa8i6bkc3mdyiake.png" alt=" "&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Step 5: Verify the Deployment
&lt;/h1&gt;

&lt;p&gt;Check if the deployment was created successfully:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl get deployments
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4sbwkl7pqcxens2ny1i1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4sbwkl7pqcxens2ny1i1.png" alt=" "&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Step 6: Verify the Service
&lt;/h1&gt;

&lt;p&gt;Check if the service is running:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl get services
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Faliiozk6mynb8w4chkj3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Faliiozk6mynb8w4chkj3.png" alt=" "&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Step 7: Check the Pod Status
&lt;/h1&gt;

&lt;p&gt;Verify that the Grafana pod is running:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl get pods &lt;span class="nt"&gt;-l&lt;/span&gt; &lt;span class="nv"&gt;app&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;grafana
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F31yjbtcwrmuc6y9b98j7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F31yjbtcwrmuc6y9b98j7.png" alt=" "&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Step 8: Access Grafana
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fc7qgs1jycsqh1d79po3z.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fc7qgs1jycsqh1d79po3z.png" alt=" "&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h5&gt;
  
  
  &lt;strong&gt;Resources &amp;amp; Next Steps&lt;/strong&gt;
&lt;/h5&gt;

&lt;h5&gt;
  
  
  📦 Full Code Repository: &lt;a href="https://github.com/thukhakyawe/100-Days-Of-DevOps-KodeKloud-Challenges-Solutions" rel="noopener noreferrer"&gt;KodeKloud Learning Labs&lt;/a&gt;
&lt;/h5&gt;

&lt;h5&gt;
  
  
  📖 More Deep Dives: &lt;a href="https://thukhakyawe.hashnode.dev/" rel="noopener noreferrer"&gt;Whispering Cloud Insights&lt;/a&gt; - Read other technical articles
&lt;/h5&gt;

&lt;h5&gt;
  
  
  💬 Join Discussion: &lt;a href="https://dev.to/thukhakyawe_cloud"&gt;DEV Community&lt;/a&gt; - Share your thoughts and questions
&lt;/h5&gt;

&lt;h5&gt;
  
  
  💼 Let's Connect: &lt;a href="https://www.linkedin.com/in/thukhakyawe/" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt; - I'd love to connect with you
&lt;/h5&gt;




&lt;h5&gt;
  
  
  &lt;strong&gt;Credits&lt;/strong&gt;
&lt;/h5&gt;

&lt;h5&gt;
  
  
  • All labs are from: &lt;a href="https://kodekloud.com/" rel="noopener noreferrer"&gt;KodeKloud&lt;/a&gt;
&lt;/h5&gt;

&lt;h5&gt;
  
  
  • I sincerely appreciate your provision of these valuable resources.
&lt;/h5&gt;




</description>
      <category>kodekloud</category>
      <category>kubernetes</category>
    </item>
    <item>
      <title>6.Deploy Jenkins on Kubernetes</title>
      <dc:creator>Thu Kha Kyawe</dc:creator>
      <pubDate>Mon, 13 Apr 2026 05:35:54 +0000</pubDate>
      <link>https://dev.to/thukhakyawe_cloud/6deploy-jenkins-on-kubernetes-5450</link>
      <guid>https://dev.to/thukhakyawe_cloud/6deploy-jenkins-on-kubernetes-5450</guid>
      <description>&lt;h1&gt;
  
  
  Lab Information
&lt;/h1&gt;

&lt;p&gt;The Nautilus DevOps team is planning to set up a Jenkins CI server to create/manage some deployment pipelines for some of the projects. They want to set up the Jenkins server on Kubernetes cluster. Below you can find more details about the task:&lt;/p&gt;

&lt;p&gt;1) Create a namespace jenkins&lt;/p&gt;

&lt;p&gt;2) Create a Service for jenkins deployment. Service name should be jenkins-service under jenkins namespace, type should be NodePort, nodePort should be 30008&lt;/p&gt;

&lt;p&gt;3) Create a Jenkins Deployment under jenkins namespace, It should be name as jenkins-deployment , labels app should be jenkins , container name should be jenkins-container , use jenkins/jenkins image , containerPort should be 8080 and replicas count should be 1.&lt;/p&gt;

&lt;p&gt;Make sure to wait for the pods to be in running state and make sure you are able to access the Jenkins login screen in the browser before hitting the Check button.&lt;/p&gt;

&lt;p&gt;Note: The kubectl utility on jump_host has been configured to work with the kubernetes cluster.&lt;/p&gt;

&lt;h1&gt;
  
  
  Lab Solutions
&lt;/h1&gt;

&lt;h1&gt;
  
  
  Step 1: Create the Jenkins Namespace
&lt;/h1&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl create namespace jenkins
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  Step 2: Create the Jenkins Service
&lt;/h1&gt;

&lt;p&gt;Create a YAML file for the NodePort service:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cat &amp;gt; jenkins-service.yaml &amp;lt;&amp;lt; EOF
apiVersion: v1
kind: Service
metadata:
  name: jenkins-service
  namespace: jenkins
spec:
  type: NodePort
  selector:
    app: jenkins
  ports:
    - protocol: TCP
      port: 8080
      targetPort: 8080
      nodePort: 30008
EOF
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Apply the service:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl apply -f jenkins-service.yaml
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwdvfdw59nrliesvamd48.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwdvfdw59nrliesvamd48.png" alt=" " width="480" height="420"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Step 3: Create the Jenkins Deployment
&lt;/h1&gt;

&lt;p&gt;Create a YAML file for the deployment:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cat &amp;gt; jenkins-deployment.yaml &amp;lt;&amp;lt; EOF
apiVersion: apps/v1
kind: Deployment
metadata:
  name: jenkins-deployment
  namespace: jenkins
spec:
  replicas: 1
  selector:
    matchLabels:
      app: jenkins
  template:
    metadata:
      labels:
        app: jenkins
    spec:
      containers:
      - name: jenkins-container
        image: jenkins/jenkins
        ports:
        - containerPort: 8080
EOF
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Apply the deployment:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl apply -f jenkins-deployment.yaml
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fokwfhhm1kkd2x2e96i52.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fokwfhhm1kkd2x2e96i52.png" alt=" " width="528" height="459"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Step 4: Monitor the Deployment Progress
&lt;/h1&gt;

&lt;p&gt;Check the status of the pod:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl get pods -n jenkins 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Wait until the pod status shows Running. This might take a few minutes as the Jenkins image needs to be pulled and the container needs to start up.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flm5b3ueno4s5l7ahemos.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flm5b3ueno4s5l7ahemos.png" alt=" " width="596" height="60"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can also check the deployment status:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl get deployment -n jenkins
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fz60curkzn3jmmqt0222v.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fz60curkzn3jmmqt0222v.png" alt=" " width="492" height="69"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Step 5: Verify Service Configuration
&lt;/h1&gt;

&lt;p&gt;Check that the service is properly configured:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl get svc -n jenkins
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwqn6h5gg5ws1ud26uaal.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwqn6h5gg5ws1ud26uaal.png" alt=" " width="656" height="62"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Step 7: Access Jenkins
&lt;/h1&gt;

&lt;p&gt;Once the pod is in Running state, you can access Jenkins:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmeix28x6hofs1f4vcr9h.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmeix28x6hofs1f4vcr9h.png" alt=" " width="800" height="422"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Step 8: Final Verification Commands
&lt;/h1&gt;

&lt;p&gt;Run these commands to verify everything is set up correctly:&lt;/p&gt;

&lt;h1&gt;
  
  
  Check all resources in jenkins namespace
&lt;/h1&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl get all -n jenkins
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  Verify pod details
&lt;/h1&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl describe pod -l app=jenkins -n jenkins
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  Verify service details
&lt;/h1&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl describe svc jenkins-service -n jenkins
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwpvq9l89et90vhskekvt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwpvq9l89et90vhskekvt.png" alt=" " width="800" height="614"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h5&gt;
  
  
  &lt;strong&gt;Resources &amp;amp; Next Steps&lt;/strong&gt;
&lt;/h5&gt;

&lt;h5&gt;
  
  
  📦 Full Code Repository: &lt;a href="https://github.com/thukhakyawe/100-Days-Of-DevOps-KodeKloud-Challenges-Solutions" rel="noopener noreferrer"&gt;KodeKloud Learning Labs&lt;/a&gt;
&lt;/h5&gt;

&lt;h5&gt;
  
  
  📖 More Deep Dives: &lt;a href="https://thukhakyawe.hashnode.dev/" rel="noopener noreferrer"&gt;Whispering Cloud Insights&lt;/a&gt; - Read other technical articles
&lt;/h5&gt;

&lt;h5&gt;
  
  
  💬 Join Discussion: &lt;a href="https://dev.to/thukhakyawe_cloud"&gt;DEV Community&lt;/a&gt; - Share your thoughts and questions
&lt;/h5&gt;

&lt;h5&gt;
  
  
  💼 Let's Connect: &lt;a href="https://www.linkedin.com/in/thukhakyawe/" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt; - I'd love to connect with you
&lt;/h5&gt;




&lt;h5&gt;
  
  
  &lt;strong&gt;Credits&lt;/strong&gt;
&lt;/h5&gt;

&lt;h5&gt;
  
  
  • All labs are from: &lt;a href="https://kodekloud.com/" rel="noopener noreferrer"&gt;KodeKloud&lt;/a&gt;
&lt;/h5&gt;

&lt;h5&gt;
  
  
  • I sincerely appreciate your provision of these valuable resources.
&lt;/h5&gt;




</description>
      <category>kodekloud</category>
      <category>kubernetes</category>
    </item>
    <item>
      <title>5.Rolling Updates And Rolling Back Deployments in Kubernetes</title>
      <dc:creator>Thu Kha Kyawe</dc:creator>
      <pubDate>Mon, 13 Apr 2026 05:20:58 +0000</pubDate>
      <link>https://dev.to/thukhakyawe_cloud/5rolling-updates-and-rolling-back-deployments-in-kubernetes-3bkc</link>
      <guid>https://dev.to/thukhakyawe_cloud/5rolling-updates-and-rolling-back-deployments-in-kubernetes-3bkc</guid>
      <description>&lt;h1&gt;
  
  
  Lab Information
&lt;/h1&gt;

&lt;p&gt;There is a production deployment planned for next week. The Nautilus DevOps team wants to test the deployment update and rollback on Dev environment first so that they can identify the risks in advance. Below you can find more details about the plan they want to execute.&lt;/p&gt;

&lt;p&gt;Create a namespace devops. Create a deployment called httpd-deploy under this new namespace, It should have one container called httpd, use httpd:2.4.25 image and 3 replicas. The deployment should use RollingUpdate strategy with maxSurge=1, and maxUnavailable=2. Also create a NodePort type service named httpd-service and expose the deployment on nodePort: 30008.&lt;/p&gt;

&lt;p&gt;Now upgrade the deployment to version httpd:2.4.43 using a rolling update.&lt;/p&gt;

&lt;p&gt;Finally, once all pods are updated undo the recent update and roll back to the previous/original version.&lt;/p&gt;

&lt;p&gt;Note:&lt;/p&gt;

&lt;p&gt;a. The kubectl utility on jump_host has been configured to work with the kubernetes cluster.&lt;/p&gt;

&lt;p&gt;b. Please make sure you only use the specified image(s) for this deployment and as per the sequence mentioned in the task description. If you mistakenly use a wrong image and fix it later, that will also distort the revision history which can eventually fail this task.&lt;/p&gt;

&lt;h1&gt;
  
  
  Lab Solutions
&lt;/h1&gt;

&lt;h1&gt;
  
  
  Step 1: Create the Namespace
&lt;/h1&gt;

&lt;p&gt;First, create the devops namespace:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl create namespace devops
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  Step 2: Create the Deployment
&lt;/h1&gt;

&lt;p&gt;Create a YAML file for the deployment with the specified configuration:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cat &amp;gt; httpd-deploy.yaml &amp;lt;&amp;lt; EOF
apiVersion: apps/v1
kind: Deployment
metadata:
  name: httpd-deploy
  namespace: devops
spec:
  replicas: 3
  strategy:
    type: RollingUpdate
    rollingUpdate:
      maxSurge: 1
      maxUnavailable: 2
  selector:
    matchLabels:
      app: httpd
  template:
    metadata:
      labels:
        app: httpd
    spec:
      containers:
      - name: httpd
        image: httpd:2.4.25
        ports:
        - containerPort: 80
EOF
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Apply the deployment:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl apply -f httpd-deploy.yaml
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fk874uhwrn252ux1jfs5z.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fk874uhwrn252ux1jfs5z.png" alt=" " width="448" height="605"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Step 3: Create the Service
&lt;/h1&gt;

&lt;p&gt;Create a YAML file for the NodePort service:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cat &amp;gt; httpd-service.yaml &amp;lt;&amp;lt; EOF
apiVersion: v1
kind: Service
metadata:
  name: httpd-service
  namespace: devops
spec:
  type: NodePort
  selector:
    app: httpd
  ports:
    - protocol: TCP
      port: 80
      targetPort: 80
      nodePort: 30008
EOF
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Apply the service:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl apply -f httpd-service.yaml
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffdxa56j3z5ag1t47lrzq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffdxa56j3z5ag1t47lrzq.png" alt=" " width="449" height="348"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Step 4: Verify Initial Deployment
&lt;/h1&gt;

&lt;p&gt;Check that everything is running correctly:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl get all -n devops
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6ohrjwf00gbr0er1sj07.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6ohrjwf00gbr0er1sj07.png" alt=" " width="692" height="268"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Step 5: Upgrade the Deployment
&lt;/h1&gt;

&lt;p&gt;Upgrade to the new image version using rolling update:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl set image deployment/httpd-deploy httpd=httpd:2.4.43 -n devops
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Monitor the rolling update progress:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl rollout status deployment/httpd-deploy -n devops
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Verify the upgrade:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl get pods -n devops -o wide
kubectl describe deployment httpd-deploy -n devops
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fszehd6z0wytdxij7rrno.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fszehd6z0wytdxij7rrno.png" alt=" " width="800" height="635"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Step 6: Rollback to Previous Version
&lt;/h1&gt;

&lt;p&gt;Undo the recent update and roll back to the original version:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl rollout undo deployment/httpd-deploy -n devops
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Monitor the rollback progress:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl rollout status deployment/httpd-deploy -n devops
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  Step 7: Final Verification
&lt;/h1&gt;

&lt;p&gt;Verify that the rollback was successful:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl get pods -n devops -o wide
kubectl describe deployment httpd-deploy -n devops
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvtmoktosc79awn8n6bk4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvtmoktosc79awn8n6bk4.png" alt=" " width="800" height="617"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Check the rollout history:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl rollout history deployment/httpd-deploy -n devops
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcikrvklzcp316qe0g1jh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcikrvklzcp316qe0g1jh.png" alt=" " width="632" height="102"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h5&gt;
  
  
  &lt;strong&gt;Resources &amp;amp; Next Steps&lt;/strong&gt;
&lt;/h5&gt;

&lt;h5&gt;
  
  
  📦 Full Code Repository: &lt;a href="https://github.com/thukhakyawe/100-Days-Of-DevOps-KodeKloud-Challenges-Solutions" rel="noopener noreferrer"&gt;KodeKloud Learning Labs&lt;/a&gt;
&lt;/h5&gt;

&lt;h5&gt;
  
  
  📖 More Deep Dives: &lt;a href="https://thukhakyawe.hashnode.dev/" rel="noopener noreferrer"&gt;Whispering Cloud Insights&lt;/a&gt; - Read other technical articles
&lt;/h5&gt;

&lt;h5&gt;
  
  
  💬 Join Discussion: &lt;a href="https://dev.to/thukhakyawe_cloud"&gt;DEV Community&lt;/a&gt; - Share your thoughts and questions
&lt;/h5&gt;

&lt;h5&gt;
  
  
  💼 Let's Connect: &lt;a href="https://www.linkedin.com/in/thukhakyawe/" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt; - I'd love to connect with you
&lt;/h5&gt;




&lt;h5&gt;
  
  
  &lt;strong&gt;Credits&lt;/strong&gt;
&lt;/h5&gt;

&lt;h5&gt;
  
  
  • All labs are from: &lt;a href="https://kodekloud.com/" rel="noopener noreferrer"&gt;KodeKloud&lt;/a&gt;
&lt;/h5&gt;

&lt;h5&gt;
  
  
  • I sincerely appreciate your provision of these valuable resources.
&lt;/h5&gt;




</description>
      <category>kodekloud</category>
      <category>kubernetes</category>
    </item>
    <item>
      <title>4.Print Environment Variables</title>
      <dc:creator>Thu Kha Kyawe</dc:creator>
      <pubDate>Mon, 13 Apr 2026 05:14:55 +0000</pubDate>
      <link>https://dev.to/thukhakyawe_cloud/4print-environment-variables-4fop</link>
      <guid>https://dev.to/thukhakyawe_cloud/4print-environment-variables-4fop</guid>
      <description>&lt;h1&gt;
  
  
  Lab Information
&lt;/h1&gt;

&lt;p&gt;The Nautilus DevOps team is working on to setup some pre-requisites for an application that will send the greetings to different users. There is a sample deployment, that needs to be tested. Below is a scenario which needs to be configured on Kubernetes cluster. Please find below more details about it.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Create a pod named print-envars-greeting.

Configure spec as, the container name should be print-env-container and use bash image.

Create three environment variables:
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;a. GREETING and its value should be Welcome to&lt;/p&gt;

&lt;p&gt;b. COMPANY and its value should be DevOps&lt;/p&gt;

&lt;p&gt;c. GROUP and its value should be Datacenter&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Use command ["/bin/sh", "-c", 'echo "$(GREETING) $(COMPANY) $(GROUP)"'] (please use this exact command), also set its restartPolicy policy to Never to avoid crash loop back.

You can check the output using kubectl logs -f print-envars-greeting command.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Note: The kubectl utility on jump_host has been configured to work with the kubernetes cluster.&lt;/p&gt;

&lt;h1&gt;
  
  
  Lab Solutions
&lt;/h1&gt;

&lt;h1&gt;
  
  
  Step 1: Create the Pod YAML configuration
&lt;/h1&gt;

&lt;p&gt;Create a file named print-envars-greeting.yaml:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="s"&gt;cat &amp;gt; print-envars-greeting.yaml &amp;lt;&amp;lt; 'EOF'&lt;/span&gt;
&lt;span class="na"&gt;apiVersion&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;v1&lt;/span&gt;
&lt;span class="na"&gt;kind&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Pod&lt;/span&gt;
&lt;span class="na"&gt;metadata&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;print-envars-greeting&lt;/span&gt;
&lt;span class="na"&gt;spec&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;containers&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;print-env-container&lt;/span&gt;
    &lt;span class="na"&gt;image&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;bash&lt;/span&gt;
    &lt;span class="na"&gt;command&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;/bin/sh"&lt;/span&gt;&lt;span class="pi"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;-c"&lt;/span&gt;&lt;span class="pi"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;echo&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;"$GREETING&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;$COMPANY&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;$GROUP"'&lt;/span&gt;&lt;span class="pi"&gt;]&lt;/span&gt;
    &lt;span class="na"&gt;env&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;GREETING&lt;/span&gt;
      &lt;span class="na"&gt;value&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Welcome&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;to"&lt;/span&gt;
    &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;COMPANY&lt;/span&gt;
      &lt;span class="na"&gt;value&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;DevOps"&lt;/span&gt;
    &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;GROUP&lt;/span&gt;
      &lt;span class="na"&gt;value&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Datacenter"&lt;/span&gt;
  &lt;span class="na"&gt;restartPolicy&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Never&lt;/span&gt;
&lt;span class="s"&gt;EOF&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  Step 2: Create the Pod
&lt;/h1&gt;

&lt;p&gt;Apply the configuration to create the pod:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl apply &lt;span class="nt"&gt;-f&lt;/span&gt; print-envars-greeting.yaml
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fs0wtpw71e623gjz3rj9a.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fs0wtpw71e623gjz3rj9a.png" alt=" "&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Step 3: Check the Pod Status
&lt;/h1&gt;

&lt;p&gt;Monitor the pod status to see when it completes:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl get pod print-envars-greeting
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You'll see the status change from Pending → Running → Completed (or Succeeded).&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0d11obyffttxgbjfwe16.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0d11obyffttxgbjfwe16.png" alt=" "&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Step 4: View the Output
&lt;/h1&gt;

&lt;p&gt;Check the logs to see the output of the command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl logs print-envars-greeting
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffwz3bs0zozaugr3edilm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffwz3bs0zozaugr3edilm.png" alt=" "&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h5&gt;
  
  
  &lt;strong&gt;Resources &amp;amp; Next Steps&lt;/strong&gt;
&lt;/h5&gt;

&lt;h5&gt;
  
  
  📦 Full Code Repository: &lt;a href="https://github.com/thukhakyawe/100-Days-Of-DevOps-KodeKloud-Challenges-Solutions" rel="noopener noreferrer"&gt;KodeKloud Learning Labs&lt;/a&gt;
&lt;/h5&gt;

&lt;h5&gt;
  
  
  📖 More Deep Dives: &lt;a href="https://thukhakyawe.hashnode.dev/" rel="noopener noreferrer"&gt;Whispering Cloud Insights&lt;/a&gt; - Read other technical articles
&lt;/h5&gt;

&lt;h5&gt;
  
  
  💬 Join Discussion: &lt;a href="https://dev.to/thukhakyawe_cloud"&gt;DEV Community&lt;/a&gt; - Share your thoughts and questions
&lt;/h5&gt;

&lt;h5&gt;
  
  
  💼 Let's Connect: &lt;a href="https://www.linkedin.com/in/thukhakyawe/" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt; - I'd love to connect with you
&lt;/h5&gt;




&lt;h5&gt;
  
  
  &lt;strong&gt;Credits&lt;/strong&gt;
&lt;/h5&gt;

&lt;h5&gt;
  
  
  • All labs are from: &lt;a href="https://kodekloud.com/" rel="noopener noreferrer"&gt;KodeKloud&lt;/a&gt;
&lt;/h5&gt;

&lt;h5&gt;
  
  
  • I sincerely appreciate your provision of these valuable resources.
&lt;/h5&gt;




</description>
      <category>kodekloud</category>
      <category>kubernetes</category>
    </item>
    <item>
      <title>3.Deploy Nginx Web Server on Kubernetes Cluster</title>
      <dc:creator>Thu Kha Kyawe</dc:creator>
      <pubDate>Sun, 12 Apr 2026 15:10:17 +0000</pubDate>
      <link>https://dev.to/thukhakyawe_cloud/3deploy-nginx-web-server-on-kubernetes-cluster-2178</link>
      <guid>https://dev.to/thukhakyawe_cloud/3deploy-nginx-web-server-on-kubernetes-cluster-2178</guid>
      <description>&lt;h1&gt;
  
  
  Lab Information
&lt;/h1&gt;

&lt;p&gt;Some of the Nautilus team developers are developing a static website and they want to deploy it on Kubernetes cluster. They want it to be highly available and scalable. Therefore, based on the requirements, the DevOps team has decided to create a deployment for it with multiple replicas. Below you can find more details about it:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Create a deployment using nginx image with latest tag only and remember to mention the tag i.e nginx:latest. Name it as nginx-deployment. The container should be named as nginx-container, also make sure replica counts are 3.

Create a NodePort type service named nginx-service. The nodePort should be 30011.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Note: The kubectl utility on jump_host has been configured to work with the kubernetes cluster.&lt;/p&gt;

&lt;h1&gt;
  
  
  Lab Solutions
&lt;/h1&gt;

&lt;h1&gt;
  
  
  Step 1: Create the Deployment YAML configuration
&lt;/h1&gt;

&lt;p&gt;Create a file named nginx-deployment.yaml:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cat &amp;gt; nginx-deployment.yaml &amp;lt;&amp;lt; EOF
apiVersion: apps/v1
kind: Deployment
metadata:
  name: nginx-deployment
spec:
  replicas: 3
  selector:
    matchLabels:
      app: nginx
  template:
    metadata:
      labels:
        app: nginx
    spec:
      containers:
      - name: nginx-container
        image: nginx:latest
        ports:
        - containerPort: 80
EOF
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  Step 2: Create the Deployment
&lt;/h1&gt;

&lt;p&gt;Apply the deployment configuration:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl apply -f nginx-deployment.yaml
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkbvje57fz65s014dbu20.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkbvje57fz65s014dbu20.png" alt=" " width="537" height="476"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Step 3: Verify the Deployment
&lt;/h1&gt;

&lt;p&gt;Check if the deployment is created and all replicas are running:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl get deployment nginx-deployment
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  Step 4: Verify the Pods
&lt;/h1&gt;

&lt;p&gt;Check the pods created by the deployment:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl get pods -l app=nginx
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fs2knkb5gghn35pl2jy6s.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fs2knkb5gghn35pl2jy6s.png" alt=" " width="590" height="231"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Step 5: Create the Service YAML configuration
&lt;/h1&gt;

&lt;p&gt;Create a file named nginx-service.yaml:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cat &amp;gt; nginx-service.yaml &amp;lt;&amp;lt; EOF
apiVersion: v1
kind: Service
metadata:
  name: nginx-service
spec:
  type: NodePort
  selector:
    app: nginx
  ports:
    - protocol: TCP
      port: 80
      targetPort: 80
      nodePort: 30011
EOF
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  Step 6: Create the Service
&lt;/h1&gt;

&lt;p&gt;Apply the service configuration:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl apply -f nginx-service.yaml
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Femgvrz2wgdzsu769psiu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Femgvrz2wgdzsu769psiu.png" alt=" " width="505" height="323"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Step 7: Verify the Service
&lt;/h1&gt;

&lt;p&gt;Check if the service is created correctly:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl get service nginx-service
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  Step 8: Detailed Service Verification
&lt;/h1&gt;

&lt;p&gt;Get more details about the service:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl describe service nginx-service
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F75fo25d50juejadoaubx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F75fo25d50juejadoaubx.png" alt=" " width="625" height="402"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Step 9: Test the Setup
&lt;/h1&gt;

&lt;p&gt;Test if the service is working by accessing it. Since this is a Kubernetes cluster, you can test using:&lt;/p&gt;

&lt;p&gt;Using curl from inside the cluster&lt;/p&gt;

&lt;h1&gt;
  
  
  Get the Cluster IP of the service
&lt;/h1&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;CLUSTER_IP=$(kubectl get service nginx-service -o jsonpath='{.spec.clusterIP}')
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  Test access using Cluster IP
&lt;/h1&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl run test-pod --image=nginx:latest --rm -it --restart=Never -- bash -c "curl http://$CLUSTER_IP"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjiqdzwz06nyy1i40e9d5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjiqdzwz06nyy1i40e9d5.png" alt=" " width="800" height="425"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Step 10: Verify Endpoints
&lt;/h1&gt;

&lt;p&gt;Check that the service is correctly targeting all 3 pods:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl get endpoints nginx-service
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhipdqnesjd0tbm3cvk21.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhipdqnesjd0tbm3cvk21.png" alt=" " width="548" height="64"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h5&gt;
  
  
  &lt;strong&gt;Resources &amp;amp; Next Steps&lt;/strong&gt;
&lt;/h5&gt;

&lt;h5&gt;
  
  
  📦 Full Code Repository: &lt;a href="https://github.com/thukhakyawe/100-Days-Of-DevOps-KodeKloud-Challenges-Solutions" rel="noopener noreferrer"&gt;KodeKloud Learning Labs&lt;/a&gt;
&lt;/h5&gt;

&lt;h5&gt;
  
  
  📖 More Deep Dives: &lt;a href="https://thukhakyawe.hashnode.dev/" rel="noopener noreferrer"&gt;Whispering Cloud Insights&lt;/a&gt; - Read other technical articles
&lt;/h5&gt;

&lt;h5&gt;
  
  
  💬 Join Discussion: &lt;a href="https://dev.to/thukhakyawe_cloud"&gt;DEV Community&lt;/a&gt; - Share your thoughts and questions
&lt;/h5&gt;

&lt;h5&gt;
  
  
  💼 Let's Connect: &lt;a href="https://www.linkedin.com/in/thukhakyawe/" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt; - I'd love to connect with you
&lt;/h5&gt;




&lt;h5&gt;
  
  
  &lt;strong&gt;Credits&lt;/strong&gt;
&lt;/h5&gt;

&lt;h5&gt;
  
  
  • All labs are from: &lt;a href="https://kodekloud.com/" rel="noopener noreferrer"&gt;KodeKloud&lt;/a&gt;
&lt;/h5&gt;

&lt;h5&gt;
  
  
  • I sincerely appreciate your provision of these valuable resources.
&lt;/h5&gt;




</description>
      <category>kodekloud</category>
      <category>kubernetes</category>
    </item>
    <item>
      <title>2.Kubernetes Sidecar Containers</title>
      <dc:creator>Thu Kha Kyawe</dc:creator>
      <pubDate>Sun, 12 Apr 2026 15:03:43 +0000</pubDate>
      <link>https://dev.to/thukhakyawe_cloud/2kubernetes-sidecar-containers-346b</link>
      <guid>https://dev.to/thukhakyawe_cloud/2kubernetes-sidecar-containers-346b</guid>
      <description>&lt;h1&gt;
  
  
  Task Information
&lt;/h1&gt;

&lt;p&gt;We have a web server container running the nginx image. The access and error logs generated by the web server are not critical enough to be placed on a persistent volume. However, Nautilus developers need access to the last 24 hours of logs so that they can trace issues and bugs. Therefore, we need to ship the access and error logs for the web server to a log-aggregation service. Following the separation of concerns principle, we implement the Sidecar pattern by deploying a second container that ships the error and access logs from nginx. Nginx does one thing, and it does it well—serving web pages. The second container also specializes in its task—shipping logs. Since containers are running on the same Pod, we can use a shared emptyDir volume to read and write logs.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Create a pod named webserver.

Create an emptyDir volume shared-logs.

Create two containers from nginx and ubuntu images with latest tag only and remember to mention tag i.e nginx:latest, nginx container name should be nginx-container and ubuntu container name should be sidecar-container on webserver pod.

Add command on sidecar-container "sh","-c","while true; do cat /var/log/nginx/access.log /var/log/nginx/error.log; sleep 30; done"

Mount the volume shared-logs on both containers at location /var/log/nginx, all containers should be up and running.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Note: The kubectl utility on jump_host has been configured to work with the kubernetes cluster.&lt;/p&gt;

&lt;h1&gt;
  
  
  Task Solutions
&lt;/h1&gt;

&lt;h1&gt;
  
  
  Step 1: Create the Pod YAML configuration
&lt;/h1&gt;

&lt;p&gt;Create a file named webserver-pod.yaml:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="s"&gt;cat &amp;gt; webserver-pod.yaml &amp;lt;&amp;lt; EOF&lt;/span&gt;
&lt;span class="na"&gt;apiVersion&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;v1&lt;/span&gt;
&lt;span class="na"&gt;kind&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Pod&lt;/span&gt;
&lt;span class="na"&gt;metadata&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;webserver&lt;/span&gt;
&lt;span class="na"&gt;spec&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;containers&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;nginx-container&lt;/span&gt;
    &lt;span class="na"&gt;image&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;nginx:latest&lt;/span&gt;
    &lt;span class="na"&gt;volumeMounts&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;shared-logs&lt;/span&gt;
      &lt;span class="na"&gt;mountPath&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;/var/log/nginx&lt;/span&gt;

  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;sidecar-container&lt;/span&gt;
    &lt;span class="na"&gt;image&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;ubuntu:latest&lt;/span&gt;
    &lt;span class="na"&gt;command&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;sh"&lt;/span&gt;&lt;span class="pi"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;-c"&lt;/span&gt;&lt;span class="pi"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;while&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;true;&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;do&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;cat&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;/var/log/nginx/access.log&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;/var/log/nginx/error.log;&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;sleep&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;30;&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;done"&lt;/span&gt;&lt;span class="pi"&gt;]&lt;/span&gt;
    &lt;span class="na"&gt;volumeMounts&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;shared-logs&lt;/span&gt;
      &lt;span class="na"&gt;mountPath&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;/var/log/nginx&lt;/span&gt;

  &lt;span class="na"&gt;volumes&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;shared-logs&lt;/span&gt;
    &lt;span class="na"&gt;emptyDir&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;{}&lt;/span&gt;
&lt;span class="s"&gt;EOF&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  Step 2: Create the pod
&lt;/h1&gt;

&lt;p&gt;Apply the configuration to create the pod:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl apply &lt;span class="nt"&gt;-f&lt;/span&gt; webserver-pod.yaml
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbvd7tptm7b3uyxro2gyj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbvd7tptm7b3uyxro2gyj.png" alt=" " width="800" height="466"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Step 3: Verify the pod is running
&lt;/h1&gt;

&lt;p&gt;Check if the pod is created and both containers are running:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl get pod webserver
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  Step 4: Check the detailed status of the pod
&lt;/h1&gt;

&lt;p&gt;Verify both containers are properly configured:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl describe pod webserver
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fg26eu8ftsxorq31c3rp5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fg26eu8ftsxorq31c3rp5.png" alt=" " width="800" height="591"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Step 5: Test the sidecar container logs
&lt;/h1&gt;

&lt;p&gt;Check the logs of the sidecar container to see if it's reading the nginx logs:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl logs webserver &lt;span class="nt"&gt;-c&lt;/span&gt; sidecar-container
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fozgntvbmxhyaprevhv3h.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fozgntvbmxhyaprevhv3h.png" alt=" " width="699" height="581"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Step 6: Generate some web traffic to create logs
&lt;/h1&gt;

&lt;p&gt;Let's generate some access to the nginx server to create log entries:&lt;/p&gt;

&lt;h1&gt;
  
  
  First, find the nginx container's IP
&lt;/h1&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl get pod webserver &lt;span class="nt"&gt;-o&lt;/span&gt; wide
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then access the nginx server (you can use the pod IP or port-forward):&lt;/p&gt;

&lt;p&gt;Using port-forward&lt;/p&gt;

&lt;h1&gt;
  
  
  In one terminal, set up port forwarding
&lt;/h1&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl port-forward webserver 8080:80
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxrbu0y8iipnte8ap7pc1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxrbu0y8iipnte8ap7pc1.png" alt=" " width="800" height="98"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Step 7: Verify the sidecar is shipping logs
&lt;/h1&gt;

&lt;p&gt;After generating some traffic, check the sidecar container logs again:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl logs webserver &lt;span class="nt"&gt;-c&lt;/span&gt; sidecar-container
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F45pqf5makwf30ccar5v3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F45pqf5makwf30ccar5v3.png" alt=" " width="671" height="599"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Step 8: Verify volume mounting
&lt;/h1&gt;

&lt;p&gt;Check that both containers have the volume mounted correctly:&lt;/p&gt;

&lt;h1&gt;
  
  
  Check nginx container
&lt;/h1&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl &lt;span class="nb"&gt;exec&lt;/span&gt; &lt;span class="nt"&gt;-it&lt;/span&gt; webserver &lt;span class="nt"&gt;-c&lt;/span&gt; nginx-container &lt;span class="nt"&gt;--&lt;/span&gt; &lt;span class="nb"&gt;ls&lt;/span&gt; &lt;span class="nt"&gt;-la&lt;/span&gt; /var/log/nginx/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  Check sidecar container
&lt;/h1&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl &lt;span class="nb"&gt;exec&lt;/span&gt; &lt;span class="nt"&gt;-it&lt;/span&gt; webserver &lt;span class="nt"&gt;-c&lt;/span&gt; sidecar-container &lt;span class="nt"&gt;--&lt;/span&gt; &lt;span class="nb"&gt;ls&lt;/span&gt; &lt;span class="nt"&gt;-la&lt;/span&gt; /var/log/nginx/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1fsu4gn3ejo148uwzbuf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1fsu4gn3ejo148uwzbuf.png" alt=" " width="748" height="230"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h5&gt;
  
  
  &lt;strong&gt;Resources &amp;amp; Next Steps&lt;/strong&gt;
&lt;/h5&gt;

&lt;h5&gt;
  
  
  📦 Full Code Repository: &lt;a href="https://github.com/thukhakyawe/100-Days-Of-DevOps-KodeKloud-Challenges-Solutions" rel="noopener noreferrer"&gt;KodeKloud Learning Labs&lt;/a&gt;
&lt;/h5&gt;

&lt;h5&gt;
  
  
  📖 More Deep Dives: &lt;a href="https://thukhakyawe.hashnode.dev/" rel="noopener noreferrer"&gt;Whispering Cloud Insights&lt;/a&gt; - Read other technical articles
&lt;/h5&gt;

&lt;h5&gt;
  
  
  💬 Join Discussion: &lt;a href="https://dev.to/thukhakyawe_cloud"&gt;DEV Community&lt;/a&gt; - Share your thoughts and questions
&lt;/h5&gt;

&lt;h5&gt;
  
  
  💼 Let's Connect: &lt;a href="https://www.linkedin.com/in/thukhakyawe/" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt; - I'd love to connect with you
&lt;/h5&gt;




&lt;h5&gt;
  
  
  &lt;strong&gt;Credits&lt;/strong&gt;
&lt;/h5&gt;

&lt;h5&gt;
  
  
  • All labs are from: &lt;a href="https://kodekloud.com/" rel="noopener noreferrer"&gt;KodeKloud&lt;/a&gt;
&lt;/h5&gt;

&lt;h5&gt;
  
  
  • I sincerely appreciate your provision of these valuable resources.
&lt;/h5&gt;




</description>
      <category>kubernetes</category>
      <category>kodekloud</category>
    </item>
    <item>
      <title>1.Kubernetes Shared Volumes</title>
      <dc:creator>Thu Kha Kyawe</dc:creator>
      <pubDate>Mon, 06 Apr 2026 14:32:03 +0000</pubDate>
      <link>https://dev.to/thukhakyawe_cloud/1kubernetes-shared-volumes-4ph7</link>
      <guid>https://dev.to/thukhakyawe_cloud/1kubernetes-shared-volumes-4ph7</guid>
      <description>&lt;h1&gt;
  
  
  Lab Information
&lt;/h1&gt;

&lt;p&gt;We are working on an application that will be deployed on multiple containers within a pod on Kubernetes cluster. There is a requirement to share a volume among the containers to save some temporary data. The Nautilus DevOps team is developing a similar template to replicate the scenario. Below you can find more details about it.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Create a pod named volume-share-devops.

For the first container, use image fedora with latest tag only and remember to mention the tag i.e fedora:latest, container should be named as volume-container-devops-1, and run a sleep command for it so that it remains in running state. Volume volume-share should be mounted at path /tmp/beta.

For the second container, use image fedora with the latest tag only and remember to mention the tag i.e fedora:latest, container should be named as volume-container-devops-2, and again run a sleep command for it so that it remains in running state. Volume volume-share should be mounted at path /tmp/cluster.

Volume name should be volume-share of type emptyDir.

After creating the pod, exec into the first container i.e volume-container-devops-1, and just for testing create a file beta.txt with any content under the mounted path of first container i.e /tmp/beta.

The file beta.txt should be present under the mounted path /tmp/cluster on the second container volume-container-devops-2 as well, since they are using a shared volume.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Note: The kubectl utility on jump_host has been configured to work with the kubernetes cluster.&lt;/p&gt;

&lt;h1&gt;
  
  
  Lab Solutions
&lt;/h1&gt;

&lt;h1&gt;
  
  
  Step 1: Create the Pod YAML configuration
&lt;/h1&gt;

&lt;p&gt;Create a file named volume-share-pod.yaml:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cat &amp;gt; volume-share-pod.yaml &amp;lt;&amp;lt; EOF
apiVersion: v1
kind: Pod
metadata:
  name: volume-share-devops
spec:
  containers:
  - name: volume-container-devops-1
    image: fedora:latest
    command: ["/bin/sleep"]
    args: ["3650d"]
    volumeMounts:
    - name: volume-share
      mountPath: /tmp/beta

  - name: volume-container-devops-2
    image: fedora:latest
    command: ["/bin/sleep"]
    args: ["3650d"]
    volumeMounts:
    - name: volume-share
      mountPath: /tmp/cluster

  volumes:
  - name: volume-share
    emptyDir: {}
EOF
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  Step 2: Create the pod
&lt;/h1&gt;

&lt;p&gt;Apply the configuration to create the pod:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl apply -f volume-share-pod.yaml
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2v26r9bwh48amlakpiao.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2v26r9bwh48amlakpiao.png" alt=" " width="505" height="591"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Step 3: Verify the pod is running
&lt;/h1&gt;

&lt;p&gt;Check if the pod is created and running:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl get pods volume-share-devops
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frcgrkcw5n2ksoy28dlty.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frcgrkcw5n2ksoy28dlty.png" alt=" " width="459" height="62"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Step 4: Create test file in first container
&lt;/h1&gt;

&lt;p&gt;Execute into the first container and create the test file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl exec -it volume-share-devops -c volume-container-devops-1 -- /bin/bash
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Once inside the container, create the file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;echo "This is a test file for shared volume" &amp;gt; /tmp/beta/beta.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Exit the container:&lt;br&gt;
&lt;code&gt;exit&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpsvcjctq7u8d2ix1vgb0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpsvcjctq7u8d2ix1vgb0.png" alt=" " width="793" height="78"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h1&gt;
  
  
  Step 5: Verify file exists in second container
&lt;/h1&gt;

&lt;p&gt;Check if the file is accessible from the second container:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl exec -it volume-share-devops -c volume-container-devops-2 -- cat /tmp/cluster/beta.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbg4rwzwhum13u91envoc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbg4rwzwhum13u91envoc.png" alt=" " width="800" height="39"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h5&gt;
  
  
  &lt;strong&gt;Resources &amp;amp; Next Steps&lt;/strong&gt;
&lt;/h5&gt;

&lt;h5&gt;
  
  
  📦 Full Code Repository: &lt;a href="https://github.com/thukhakyawe/100-Days-Of-DevOps-KodeKloud-Challenges-Solutions" rel="noopener noreferrer"&gt;KodeKloud Learning Labs&lt;/a&gt;
&lt;/h5&gt;

&lt;h5&gt;
  
  
  📖 More Deep Dives: &lt;a href="https://thukhakyawe.hashnode.dev/" rel="noopener noreferrer"&gt;Whispering Cloud Insights&lt;/a&gt; - Read other technical articles
&lt;/h5&gt;

&lt;h5&gt;
  
  
  💬 Join Discussion: &lt;a href="https://dev.to/thukhakyawe_cloud"&gt;DEV Community&lt;/a&gt; - Share your thoughts and questions
&lt;/h5&gt;

&lt;h5&gt;
  
  
  💼 Let's Connect: &lt;a href="https://www.linkedin.com/in/thukhakyawe/" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt; - I'd love to connect with you
&lt;/h5&gt;




&lt;h5&gt;
  
  
  &lt;strong&gt;Credits&lt;/strong&gt;
&lt;/h5&gt;

&lt;h5&gt;
  
  
  • All labs are from: &lt;a href="https://kodekloud.com/" rel="noopener noreferrer"&gt;KodeKloud&lt;/a&gt;
&lt;/h5&gt;

&lt;h5&gt;
  
  
  • I sincerely appreciate your provision of these valuable resources.
&lt;/h5&gt;




</description>
      <category>kubernetes</category>
      <category>kodekloud</category>
    </item>
    <item>
      <title>A Useful Resource If You’re Preparing for AWS, CompTIA, Microsoft Certifications</title>
      <dc:creator>Thu Kha Kyawe</dc:creator>
      <pubDate>Sat, 04 Apr 2026 13:28:40 +0000</pubDate>
      <link>https://dev.to/thukhakyawe_cloud/a-useful-resource-if-youre-preparing-for-aws-comptia-microsoft-certifications-3i9</link>
      <guid>https://dev.to/thukhakyawe_cloud/a-useful-resource-if-youre-preparing-for-aws-comptia-microsoft-certifications-3i9</guid>
      <description>&lt;p&gt;Udemy is now offering &lt;strong&gt;AWS, CompTIA and Microsoft exam vouchers&lt;/strong&gt; with optional &lt;strong&gt;retake packages&lt;/strong&gt;:&lt;/p&gt;

&lt;p&gt;🔗 &lt;a href="https://www.udemy.com/all-certification-vouchers/" rel="noopener noreferrer"&gt;https://www.udemy.com/all-certification-vouchers/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I checked a couple of exams, and the pricing structure is actually more interesting than it first looks.&lt;/p&gt;

&lt;h3&gt;
  
  
  Example 1 — AWS Certified Solutions Architect (Associate)
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5f689gp1wa2l3qwy88z0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5f689gp1wa2l3qwy88z0.png" alt=" " width="800" height="408"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Exam Voucher&lt;/strong&gt; → &lt;strong&gt;$148.99&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Exam Voucher + Retake&lt;/strong&gt; → &lt;strong&gt;$181.99&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;👉 That’s roughly &lt;strong&gt;$33 more&lt;/strong&gt; for a second attempt&lt;/p&gt;




&lt;h3&gt;
  
  
  Example 2 — AWS Certified DevOps Engineer (Professional)
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fb877rqv49orutbqshycj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fb877rqv49orutbqshycj.png" alt=" " width="800" height="408"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Exam Voucher&lt;/strong&gt; → &lt;strong&gt;$296.99&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Exam Voucher + Retake&lt;/strong&gt; → &lt;strong&gt;$329.99&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;👉 Again, about &lt;strong&gt;$33 more&lt;/strong&gt; for a retake&lt;/p&gt;




&lt;h3&gt;
  
  
  My takeaway
&lt;/h3&gt;

&lt;p&gt;This is where it gets interesting.&lt;/p&gt;

&lt;p&gt;At first glance, Udemy shows a &lt;strong&gt;very large discount&lt;/strong&gt; on the “voucher + retake” option (because it compares against a much higher original price).&lt;/p&gt;

&lt;p&gt;But in reality, the decision is much simpler:&lt;/p&gt;

&lt;p&gt;👉 You’re paying about &lt;strong&gt;$30–$35 extra&lt;/strong&gt; for a second attempt&lt;/p&gt;

&lt;p&gt;That’s actually &lt;strong&gt;not a bad deal&lt;/strong&gt; if:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;you’re not 100% confident yet&lt;/li&gt;
&lt;li&gt;you want to reduce the risk of paying full price again&lt;/li&gt;
&lt;li&gt;or you just want less pressure on exam day&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  Important details
&lt;/h3&gt;

&lt;p&gt;From the voucher page:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Exam Voucher (one attempt)&lt;/strong&gt;&lt;br&gt;
→ valid for &lt;strong&gt;at least 9 months after purchase&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Voucher + Retake (two attempts)&lt;/strong&gt;&lt;br&gt;
→ first attempt must be completed by &lt;strong&gt;Dec 31, 2026&lt;/strong&gt;&lt;br&gt;
→ retake must be completed by &lt;strong&gt;Jan 31, 2027&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Works for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Associate exams&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Professional &amp;amp; Specialty exams&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Online or in-person testing&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;




&lt;h3&gt;
  
  
  What to watch out for
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;This does &lt;strong&gt;not combine with other AWS benefits&lt;/strong&gt; (e.g. 50% off vouchers)&lt;/li&gt;
&lt;li&gt;It’s &lt;strong&gt;not the same as “free retake” promotions&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Pricing may vary depending on your &lt;strong&gt;region / tax / currency&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  Final thought
&lt;/h3&gt;

&lt;p&gt;This is one of those cases where the &lt;strong&gt;real value is hidden behind the marketing&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Ignore the big discount labels and just ask:&lt;/p&gt;

&lt;p&gt;👉 &lt;em&gt;“Is a second attempt worth ~$30 for me?”&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;If yes, the retake option actually makes a lot of sense.&lt;/p&gt;




&lt;h1&gt;
  
  
  AWS #AWSCertification #CloudComputing #DevOps #SolutionsArchitect #Certification #CareerGrowth #Upskilling #TechCareers
&lt;/h1&gt;

</description>
      <category>aws</category>
      <category>comptia</category>
      <category>microsoft</category>
      <category>udemy</category>
    </item>
  </channel>
</rss>
