<?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>Forem: Thu Kha Kyawe</title>
    <description>The latest articles on Forem by Thu Kha Kyawe (@thukhakyawe_cloud).</description>
    <link>https://forem.com/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>Forem: Thu Kha Kyawe</title>
      <link>https://forem.com/thukhakyawe_cloud</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/thukhakyawe_cloud"/>
    <language>en</language>
    <item>
      <title>5.Write a Docker File</title>
      <dc:creator>Thu Kha Kyawe</dc:creator>
      <pubDate>Sat, 02 May 2026 06:48:50 +0000</pubDate>
      <link>https://forem.com/thukhakyawe_cloud/5write-a-docker-file-1o1h</link>
      <guid>https://forem.com/thukhakyawe_cloud/5write-a-docker-file-1o1h</guid>
      <description>&lt;h1&gt;
  
  
  Task Information
&lt;/h1&gt;

&lt;p&gt;As per recent requirements shared by the Nautilus application development team, they need custom images created for one of their projects. Several of the initial testing requirements are already been shared with DevOps team. Therefore, create a docker file /opt/docker/Dockerfile (please keep D capital of Dockerfile) on App server 1 in Stratos DC and configure to build an image with the following requirements:&lt;/p&gt;

&lt;p&gt;a. Use ubuntu:24.04 as the base image.&lt;/p&gt;

&lt;p&gt;b. Install apache2 and configure it to work on 6300 port. (do not update any other Apache configuration settings like document root etc).&lt;/p&gt;

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

&lt;p&gt;Part 1: Lab Step-by-Step Guidelines&lt;/p&gt;

&lt;p&gt;✅ Task&lt;/p&gt;

&lt;p&gt;On App Server 1 (stapp01), create this file:&lt;/p&gt;

&lt;p&gt;/opt/docker/Dockerfile&lt;/p&gt;

&lt;p&gt;Use these requirements:&lt;/p&gt;

&lt;p&gt;Base image: ubuntu:24.04&lt;br&gt;
Install apache2&lt;br&gt;
Configure Apache to run on port 6300&lt;br&gt;
Do not change other Apache settings&lt;/p&gt;

&lt;p&gt;🔹 Step 1: Login to Jump Host&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ssh"&gt;&lt;code&gt;&lt;span class="k"&gt;ssh&lt;/span&gt; thor@jump-host

&lt;span class="c1"&gt;# Password:&lt;/span&gt;

&lt;span class="k"&gt;mjolnir123&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;🔹 Step 2: SSH into App Server 1&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ssh"&gt;&lt;code&gt;&lt;span class="k"&gt;ssh&lt;/span&gt; tony@stapp01

&lt;span class="c1"&gt;# Password:&lt;/span&gt;

&lt;span class="k"&gt;Ir0nM&lt;/span&gt;@n
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;🔹 Step 3: Create Docker directory&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo mkdir&lt;/span&gt; &lt;span class="nt"&gt;-p&lt;/span&gt; /opt/docker
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;🔹 Step 4: Create Dockerfile&lt;/p&gt;

&lt;p&gt;Run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;vi /opt/docker/Dockerfile
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Press i and paste this content:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight docker"&gt;&lt;code&gt;&lt;span class="k"&gt;FROM&lt;/span&gt;&lt;span class="s"&gt; ubuntu:24.04&lt;/span&gt;

&lt;span class="k"&gt;ENV&lt;/span&gt;&lt;span class="s"&gt; DEBIAN_FRONTEND=noninteractive&lt;/span&gt;

&lt;span class="k"&gt;RUN &lt;/span&gt;apt update &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="se"&gt;\
&lt;/span&gt;    apt &lt;span class="nb"&gt;install &lt;/span&gt;apache2 &lt;span class="nt"&gt;-y&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="se"&gt;\
&lt;/span&gt;    &lt;span class="nb"&gt;sed&lt;/span&gt; &lt;span class="nt"&gt;-i&lt;/span&gt; &lt;span class="s1"&gt;'s/Listen 80/Listen 6300/'&lt;/span&gt; /etc/apache2/ports.conf &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="se"&gt;\
&lt;/span&gt;    &lt;span class="nb"&gt;sed&lt;/span&gt; &lt;span class="nt"&gt;-i&lt;/span&gt; &lt;span class="s1"&gt;'s/&amp;lt;VirtualHost *:80&amp;gt;/&amp;lt;VirtualHost *:6300&amp;gt;/'&lt;/span&gt; /etc/apache2/sites-available/000-default.conf

&lt;span class="k"&gt;EXPOSE&lt;/span&gt;&lt;span class="s"&gt; 6300&lt;/span&gt;

&lt;span class="k"&gt;CMD&lt;/span&gt;&lt;span class="s"&gt; ["apachectl", "-D", "FOREGROUND"]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Save and exit:&lt;/p&gt;

&lt;p&gt;Esc :wq&lt;/p&gt;

&lt;p&gt;🔹 Step 5: Verify file exists&lt;/p&gt;

&lt;p&gt;cat /opt/docker/Dockerfile&lt;/p&gt;




&lt;p&gt;Part 2: Simple Step-by-Step Explanation (Beginner Friendly)&lt;/p&gt;

&lt;p&gt;✅ What is happening?&lt;/p&gt;

&lt;p&gt;You need to create a Dockerfile.&lt;/p&gt;

&lt;p&gt;A Dockerfile is a recipe Docker uses to build custom images.&lt;/p&gt;

&lt;p&gt;✅ Why use ubuntu:24.04?&lt;/p&gt;

&lt;p&gt;This line:&lt;/p&gt;

&lt;p&gt;FROM ubuntu:24.04&lt;/p&gt;

&lt;p&gt;means:&lt;/p&gt;

&lt;p&gt;Start from Ubuntu version 24.04.&lt;/p&gt;

&lt;p&gt;✅ Why install apache2?&lt;/p&gt;

&lt;p&gt;This line installs Apache web server:&lt;/p&gt;

&lt;p&gt;apt install apache2 -y&lt;/p&gt;

&lt;p&gt;✅ Why change port 80 to 6300?&lt;/p&gt;

&lt;p&gt;Default Apache port:&lt;/p&gt;

&lt;p&gt;80&lt;/p&gt;

&lt;p&gt;Required port:&lt;/p&gt;

&lt;p&gt;6300&lt;/p&gt;

&lt;p&gt;So we edit:&lt;/p&gt;

&lt;p&gt;/etc/apache2/ports.conf&lt;br&gt;
/etc/apache2/sites-available/000-default.conf&lt;/p&gt;

&lt;p&gt;✅ Why use CMD?&lt;/p&gt;

&lt;p&gt;CMD ["apachectl", "-D", "FOREGROUND"]&lt;/p&gt;

&lt;p&gt;This starts Apache when container runs.&lt;/p&gt;

&lt;p&gt;⚠️ Common Mistakes&lt;/p&gt;

&lt;p&gt;❌ Mistake 1: Wrong filename&lt;/p&gt;

&lt;p&gt;Must be exactly:&lt;/p&gt;

&lt;p&gt;/opt/docker/Dockerfile&lt;/p&gt;

&lt;p&gt;Capital D matters.&lt;/p&gt;

&lt;p&gt;❌ Mistake 2: Forgetting VirtualHost change&lt;/p&gt;

&lt;p&gt;Need both:&lt;/p&gt;

&lt;p&gt;Listen 6300&lt;br&gt;
VirtualHost *:6300&lt;/p&gt;

&lt;p&gt;❌ Mistake 3: Using wrong base image&lt;/p&gt;

&lt;p&gt;Correct:&lt;/p&gt;

&lt;p&gt;ubuntu:24.04&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>docker</category>
    </item>
    <item>
      <title>4.Docker EXEC Operations</title>
      <dc:creator>Thu Kha Kyawe</dc:creator>
      <pubDate>Sat, 02 May 2026 06:45:38 +0000</pubDate>
      <link>https://forem.com/thukhakyawe_cloud/4docker-exec-operations-2agk</link>
      <guid>https://forem.com/thukhakyawe_cloud/4docker-exec-operations-2agk</guid>
      <description>&lt;h1&gt;
  
  
  Task Information
&lt;/h1&gt;

&lt;p&gt;One of the Nautilus DevOps team members was working to configure services on a kkloud container that is running on App Server 2 in Stratos Datacenter. Due to some personal work he is on PTO for the rest of the week, but we need to finish his pending work ASAP. Please complete the remaining work as per details given below:&lt;/p&gt;

&lt;p&gt;a. Install apache2 in kkloud container using apt that is running on App Server 2 in Stratos Datacenter.&lt;/p&gt;

&lt;p&gt;b. Configure Apache to listen on port 6000 instead of default http port. Do not bind it to listen on specific IP or hostname only, i.e it should listen on localhost, 127.0.0.1, container ip, etc.&lt;/p&gt;

&lt;p&gt;c. Make sure Apache service is up and running inside the container. Keep the container in running state at the end.&lt;/p&gt;

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

&lt;p&gt;Part 1: Lab Step-by-Step Guidelines&lt;/p&gt;

&lt;p&gt;✅ Task&lt;/p&gt;

&lt;p&gt;On App Server 2 (stapp02), inside the running container kkloud:&lt;/p&gt;

&lt;p&gt;Install apache2&lt;/p&gt;

&lt;p&gt;Change Apache port to 6000&lt;/p&gt;

&lt;p&gt;Start Apache service&lt;/p&gt;

&lt;p&gt;Keep container running&lt;/p&gt;

&lt;p&gt;🔹 Step 1: Login to Jump Host&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ssh"&gt;&lt;code&gt;&lt;span class="k"&gt;ssh&lt;/span&gt; thor@jump-host

&lt;span class="c1"&gt;# Password:&lt;/span&gt;

&lt;span class="k"&gt;mjolnir123&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;🔹 Step 2: SSH into App Server 2&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ssh"&gt;&lt;code&gt;&lt;span class="k"&gt;ssh&lt;/span&gt; steve@stapp02

&lt;span class="c1"&gt;# Password:&lt;/span&gt;

&lt;span class="k"&gt;Am3ric&lt;/span&gt;@

&lt;span class="err"&gt;🔹&lt;/span&gt; &lt;span class="k"&gt;Step&lt;/span&gt; &lt;span class="m"&gt;3&lt;/span&gt;: Verify container is running

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;docker ps&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
You should see:

kkloud

🔹 Step 4: Enter the container

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;docker exec -it kkloud bash&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;🔹 Step 5: Update package list

Inside container:

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;apt update&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
🔹 Step 6: Install Apache

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;apt install apache2 -y&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;🔹 Step 7: Change Apache port to 6000

Edit ports file:

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;sed -i 's/Listen 80/Listen 6000/' /etc/apache2/ports.conf&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
🔹 Step 8: Update Virtual Host config

Apache site config also uses port 80. Change it:

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;sed -i 's///' /etc/apache2/sites-available/000-default.conf&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;🔹 Step 9: Start Apache service

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;service apache2 start&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;🔹 Step 10: Verify Apache is listening on 6000

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;apt update &amp;amp;&amp;amp; apt install net-tools -y&lt;br&gt;
netstat -tlnp | grep 6000&lt;/p&gt;

&lt;p&gt;or&lt;/p&gt;

&lt;p&gt;apt install iproute2 -y&lt;br&gt;
ss -tlnp | grep 6000&lt;/p&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;


🔹 Step 11: Exit container

exit

Container remains running.

---

Part 2: Simple Step-by-Step Explanation (Beginner Friendly)

✅ What is happening?

You need to configure software inside a Docker container.

The container name is:

kkloud

A container is like a mini Linux machine.

✅ Why use docker exec?

docker exec -it kkloud bash

This opens a shell inside the container so you can run Linux commands there.

✅ Why install apache2?

Apache is a web server. It serves websites/pages.

Install command:

apt install apache2 -y

✅ Why change port 80 to 6000?

By default Apache uses:

80

But the lab wants:

6000

So we modify config files.

✅ Why edit two files?

File 1:
/etc/apache2/ports.conf

This tells Apache which port to listen on.

File 2:
/etc/apache2/sites-available/000-default.conf

This tells the website virtual host which port to use.

Both must match.

✅ Why start service?

After installing/config changes, Apache must run:

service apache2 start

Without this, the web server is not active.

⚠️ Common Mistakes

❌ Mistake 1: Changing only one file

Need to change both:

ports.conf
000-default.conf

❌ Mistake 2: Running commands on host instead of container

Do inside:

docker exec -it kkloud bash

❌ Mistake 3: Stopping the container

Do not run:

docker stop kkloud

Container must stay running.

---
##### **Resources &amp;amp; Next Steps**
##### 📦 Full Code Repository: [KodeKloud Learning Labs](https://github.com/thukhakyawe/100-Days-Of-DevOps-KodeKloud-Challenges-Solutions)
##### 📖 More Deep Dives: [Whispering Cloud Insights](https://thukhakyawe.hashnode.dev/) - Read other technical articles
##### 💬 Join Discussion: [DEV Community](https://dev.to/thukhakyawe_cloud) - Share your thoughts and questions
##### 💼 Let's Connect: [LinkedIn](https://www.linkedin.com/in/thukhakyawe/) - I'd love to connect with you
---
##### **Credits**
##### • All labs are from: [KodeKloud](https://kodekloud.com/)
##### • I sincerely appreciate your provision of these valuable resources.
---
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

</description>
      <category>kodekloud</category>
      <category>docker</category>
    </item>
    <item>
      <title>3.Create a Docker Image From Container</title>
      <dc:creator>Thu Kha Kyawe</dc:creator>
      <pubDate>Sat, 02 May 2026 06:43:29 +0000</pubDate>
      <link>https://forem.com/thukhakyawe_cloud/3create-a-docker-image-from-container-1g07</link>
      <guid>https://forem.com/thukhakyawe_cloud/3create-a-docker-image-from-container-1g07</guid>
      <description>&lt;h1&gt;
  
  
  Task Information
&lt;/h1&gt;

&lt;p&gt;One of the Nautilus developer was working to test new changes on a container. He wants to keep a backup of his changes to the container. A new request has been raised for the DevOps team to create a new image from this container. Below are more details about it:&lt;/p&gt;

&lt;p&gt;a. Create an image official:nautilus on Application Server 1 from a container ubuntu_latest that is running on same server.&lt;/p&gt;

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

&lt;p&gt;Part 1: Lab Step-by-Step Guidelines&lt;/p&gt;

&lt;p&gt;✅ Task&lt;/p&gt;

&lt;p&gt;On Application Server 1 (stapp01), create a new Docker image:&lt;/p&gt;

&lt;p&gt;official:nautilus&lt;/p&gt;

&lt;p&gt;from the running container:&lt;/p&gt;

&lt;p&gt;ubuntu_latest&lt;/p&gt;

&lt;p&gt;Step 1: Login to the Jump Host&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ssh"&gt;&lt;code&gt;&lt;span class="k"&gt;ssh&lt;/span&gt; thor@jump-host

&lt;span class="c1"&gt;# Password:&lt;/span&gt;

&lt;span class="k"&gt;mjolnir123&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Step 2: SSH into App Server 1&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ssh"&gt;&lt;code&gt;&lt;span class="k"&gt;ssh&lt;/span&gt; tony@stapp01
&lt;span class="c1"&gt;# Password:&lt;/span&gt;
&lt;span class="k"&gt;Ir0nM&lt;/span&gt;@n
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Step 3: Verify the container is running&lt;/p&gt;

&lt;p&gt;Check that container ubuntu_latest exists:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;docker ps
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You should see:&lt;/p&gt;

&lt;p&gt;ubuntu_latest&lt;/p&gt;

&lt;p&gt;Step 4: Create image from the container&lt;/p&gt;

&lt;p&gt;Use docker commit:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;docker commit ubuntu_latest official:nautilus
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Step 5: Verify the image&lt;/p&gt;

&lt;p&gt;Check image list:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;docker images
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You should see:&lt;/p&gt;

&lt;p&gt;official   nautilus&lt;/p&gt;




&lt;p&gt;Part 2: Simple Step-by-Step Explanation (Beginner Friendly)&lt;/p&gt;

&lt;p&gt;What is happening in this lab?&lt;/p&gt;

&lt;p&gt;A developer made changes inside a running container and wants to save those changes as a new reusable image.&lt;/p&gt;

&lt;p&gt;Think of it like:&lt;/p&gt;

&lt;p&gt;Container = running machine with changes&lt;br&gt;
Image = saved snapshot/template&lt;br&gt;
What does docker commit do?&lt;br&gt;
docker commit ubuntu_latest official:nautilus&lt;/p&gt;

&lt;p&gt;This means:&lt;/p&gt;

&lt;p&gt;“Take the current state of container ubuntu_latest and save it as a new image named official:nautilus.”&lt;/p&gt;

&lt;p&gt;Breakdown&lt;br&gt;
docker commit → create image from container&lt;br&gt;
ubuntu_latest → source container&lt;br&gt;
official:nautilus → new image name and tag&lt;/p&gt;

&lt;p&gt;Why use this?&lt;/p&gt;

&lt;p&gt;If someone installed packages or changed files inside the container, docker commit preserves those changes into a new image.&lt;/p&gt;

&lt;p&gt;Then later you can run:&lt;/p&gt;

&lt;p&gt;docker run official:nautilus&lt;/p&gt;

&lt;p&gt;and get the saved version.&lt;/p&gt;

&lt;p&gt;⚠️ Common Mistakes&lt;/p&gt;

&lt;p&gt;❌ Mistake 1: Using image name instead of container name&lt;/p&gt;

&lt;p&gt;Wrong:&lt;/p&gt;

&lt;p&gt;docker commit ubuntu official:nautilus&lt;/p&gt;

&lt;p&gt;Correct:&lt;/p&gt;

&lt;p&gt;docker commit ubuntu_latest official:nautilus&lt;/p&gt;

&lt;p&gt;Use the container name, not the base image name.&lt;/p&gt;

&lt;p&gt;❌ Mistake 2: Running on wrong server&lt;/p&gt;

&lt;p&gt;Do this on:&lt;/p&gt;

&lt;p&gt;stapp01&lt;/p&gt;

&lt;p&gt;❌ Mistake 3: Typing image tag incorrectly&lt;/p&gt;

&lt;p&gt;Correct:&lt;/p&gt;

&lt;p&gt;official:nautilus&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>docker</category>
    </item>
    <item>
      <title>2.Docker Update Permissions</title>
      <dc:creator>Thu Kha Kyawe</dc:creator>
      <pubDate>Sat, 02 May 2026 06:41:54 +0000</pubDate>
      <link>https://forem.com/thukhakyawe_cloud/2docker-update-permissions-3m09</link>
      <guid>https://forem.com/thukhakyawe_cloud/2docker-update-permissions-3m09</guid>
      <description>&lt;h1&gt;
  
  
  Task Information
&lt;/h1&gt;

&lt;p&gt;One of the Nautilus project developers need access to run docker commands on App Server 2. This user is already created on the server. Accomplish this task as per details given below:&lt;/p&gt;

&lt;p&gt;User siva is not able to run docker commands on App Server 2 in Stratos DC, make the required changes so that this user can run docker commands without sudo.&lt;/p&gt;

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

&lt;p&gt;Part 1: Lab Step-by-Step Guidelines&lt;/p&gt;

&lt;p&gt;✅ Task&lt;/p&gt;

&lt;p&gt;On App Server 2 (stapp02), user siva must be able to run Docker commands without using sudo.&lt;/p&gt;

&lt;p&gt;Step 1: Login to the Jump Host&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ssh"&gt;&lt;code&gt;&lt;span class="k"&gt;ssh&lt;/span&gt; thor@jump-host
&lt;span class="c1"&gt;# Password:&lt;/span&gt;
&lt;span class="k"&gt;mjolnir123&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Step 2: SSH into App Server 2&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ssh"&gt;&lt;code&gt;&lt;span class="k"&gt;ssh&lt;/span&gt; steve@stapp02
&lt;span class="c1"&gt;# Password:&lt;/span&gt;
&lt;span class="k"&gt;Am3ric&lt;/span&gt;@
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Step 3: Add user siva to the docker group&lt;/p&gt;

&lt;p&gt;Run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;usermod &lt;span class="nt"&gt;-aG&lt;/span&gt; docker siva
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is the main fix.&lt;/p&gt;

&lt;p&gt;Step 4: Verify user group membership&lt;/p&gt;

&lt;p&gt;Check whether siva is now part of the docker group:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;id &lt;/span&gt;siva
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Expected output should include: docker&lt;/p&gt;

&lt;p&gt;Example:&lt;/p&gt;

&lt;p&gt;uid=1002(siva) gid=1002(siva) groups=1002(siva),994(docker)&lt;/p&gt;

&lt;p&gt;Step 5: (Optional but useful) Test with su&lt;/p&gt;

&lt;p&gt;Switch to user siva and test Docker:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;su - siva
docker ps
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If it works without sudo, the task is complete.&lt;/p&gt;

&lt;p&gt;If the session was already open before group changes, sometimes you may need to log out and log back in.&lt;/p&gt;




&lt;p&gt;Part 2: Simple Step-by-Step Explanation (Beginner Friendly)&lt;/p&gt;

&lt;p&gt;What is the problem?&lt;/p&gt;

&lt;p&gt;User siva cannot run Docker commands unless using sudo.&lt;/p&gt;

&lt;p&gt;For example, this may fail:&lt;/p&gt;

&lt;p&gt;docker ps&lt;/p&gt;

&lt;p&gt;with an error like:&lt;/p&gt;

&lt;p&gt;permission denied&lt;/p&gt;

&lt;p&gt;Why does this happen?&lt;/p&gt;

&lt;p&gt;Docker is usually controlled by a special Linux group called:&lt;/p&gt;

&lt;p&gt;docker&lt;/p&gt;

&lt;p&gt;Only users in that group can run Docker commands without sudo.&lt;/p&gt;

&lt;p&gt;So if siva is not in that group, Docker access will fail.&lt;/p&gt;

&lt;p&gt;What does this command do?&lt;/p&gt;

&lt;p&gt;sudo usermod -aG docker siva&lt;/p&gt;

&lt;p&gt;Breakdown:&lt;/p&gt;

&lt;p&gt;usermod → modifies a user account&lt;/p&gt;

&lt;p&gt;-aG → append user to a group&lt;/p&gt;

&lt;p&gt;docker → the group we want&lt;/p&gt;

&lt;p&gt;siva → the user we are fixing&lt;/p&gt;

&lt;p&gt;In plain English:&lt;/p&gt;

&lt;p&gt;“Add user siva to the Docker group.”&lt;/p&gt;

&lt;p&gt;Why do we check with id siva?&lt;/p&gt;

&lt;p&gt;id siva&lt;/p&gt;

&lt;p&gt;This shows which groups siva belongs to.&lt;/p&gt;

&lt;p&gt;If you see:&lt;/p&gt;

&lt;p&gt;docker&lt;/p&gt;

&lt;p&gt;then the change was successful.&lt;/p&gt;

&lt;p&gt;⚠️ Common Mistakes&lt;/p&gt;

&lt;p&gt;❌ Mistake 1: Running on wrong server&lt;/p&gt;

&lt;p&gt;Correct server is:&lt;/p&gt;

&lt;p&gt;stapp02&lt;/p&gt;

&lt;p&gt;Not stapp01 or stapp03.&lt;/p&gt;

&lt;p&gt;❌ Mistake 2: Forgetting -a&lt;/p&gt;

&lt;p&gt;Wrong:&lt;/p&gt;

&lt;p&gt;sudo usermod -G docker siva&lt;/p&gt;

&lt;p&gt;Correct:&lt;/p&gt;

&lt;p&gt;sudo usermod -aG docker siva&lt;/p&gt;

&lt;p&gt;Why this matters:&lt;/p&gt;

&lt;p&gt;If you omit -a, you may accidentally remove the user from other groups.&lt;/p&gt;

&lt;p&gt;That’s a classic Linux foot-gun.&lt;/p&gt;

&lt;p&gt;❌ Mistake 3: Testing immediately in old session&lt;/p&gt;

&lt;p&gt;Sometimes group membership changes don’t apply to already-open sessions.&lt;/p&gt;

&lt;p&gt;If docker ps still fails for siva, do:&lt;/p&gt;

&lt;p&gt;exit&lt;br&gt;
sudo su - siva&lt;br&gt;
docker ps&lt;/p&gt;

&lt;p&gt;or simply log out and log back in.&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>docker</category>
    </item>
    <item>
      <title>1.Pull Docker Image</title>
      <dc:creator>Thu Kha Kyawe</dc:creator>
      <pubDate>Sat, 02 May 2026 06:39:47 +0000</pubDate>
      <link>https://forem.com/thukhakyawe_cloud/1pull-docker-image-2bee</link>
      <guid>https://forem.com/thukhakyawe_cloud/1pull-docker-image-2bee</guid>
      <description>&lt;h1&gt;
  
  
  Lab Information
&lt;/h1&gt;

&lt;p&gt;Nautilus project developers are planning to start testing on a new project. As per their meeting with the DevOps team, they want to test containerized environment application features. As per details shared with DevOps team, we need to accomplish the following task:&lt;/p&gt;

&lt;p&gt;a. Pull busybox:musl image on App Server 3 in Stratos DC and re-tag (create new tag) this image as busybox:media.&lt;/p&gt;

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

&lt;p&gt;Part 1: Lab Step-by-Step Guidelines&lt;/p&gt;

&lt;p&gt;✅ Task&lt;/p&gt;

&lt;p&gt;On App Server 3 (stapp03), you must:&lt;/p&gt;

&lt;p&gt;Pull image: busybox:musl&lt;br&gt;
Re-tag it as: busybox:media&lt;/p&gt;

&lt;p&gt;Step 1: Login to the Jump Host&lt;/p&gt;

&lt;p&gt;Use the provided jump host credentials:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ssh thor@jump-host

&lt;span class="c"&gt;# Password:&lt;/span&gt;

mjolnir123
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Step 2: SSH into App Server 3&lt;/p&gt;

&lt;p&gt;From the jump host, connect to stapp03:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ssh banner@stapp03
&lt;span class="c"&gt;# Password:&lt;/span&gt;
BigGr33n
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Step 3: Pull the required Docker image&lt;/p&gt;

&lt;p&gt;Run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight docker"&gt;&lt;code&gt;docker pull busybox:musl
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Step 4: Re-tag the image&lt;/p&gt;

&lt;p&gt;Create the new tag:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight docker"&gt;&lt;code&gt;docker tag busybox:musl busybox:media
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Step 5: Verify&lt;/p&gt;

&lt;p&gt;Check whether both tags exist:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight docker"&gt;&lt;code&gt;docker images | grep busybox
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Expected result:&lt;/p&gt;

&lt;p&gt;You should see something like:&lt;/p&gt;

&lt;p&gt;busybox      media     0188a8de47ca   18 months ago   1.51MB&lt;br&gt;
busybox      musl      0188a8de47ca   18 months ago   1.51MB&lt;/p&gt;

&lt;p&gt;The IMAGE ID should be the same for both tags.&lt;/p&gt;




&lt;p&gt;Part 2: Simple Step-by-Step Explanation (Beginner Friendly)&lt;/p&gt;

&lt;p&gt;What is happening in this lab?&lt;/p&gt;

&lt;p&gt;You are working with Docker images.&lt;/p&gt;

&lt;p&gt;Docker images are like templates used to create containers.&lt;/p&gt;

&lt;p&gt;In this task, you are told to:&lt;/p&gt;

&lt;p&gt;download one image (busybox:musl)&lt;br&gt;
then give it another name (busybox:media)&lt;/p&gt;

&lt;p&gt;Why do we log into Jump Host first?&lt;/p&gt;

&lt;p&gt;You usually cannot directly access internal servers.&lt;/p&gt;

&lt;p&gt;So you first go into:&lt;/p&gt;

&lt;p&gt;jump-host&lt;/p&gt;

&lt;p&gt;Then from there, you connect to:&lt;/p&gt;

&lt;p&gt;stapp03&lt;/p&gt;

&lt;p&gt;This is a common real-world secure infrastructure setup.&lt;/p&gt;

&lt;p&gt;What does this command do?&lt;/p&gt;

&lt;p&gt;docker pull busybox:musl&lt;/p&gt;

&lt;p&gt;It means:&lt;/p&gt;

&lt;p&gt;“Download the BusyBox image with tag musl.”&lt;/p&gt;

&lt;p&gt;Breakdown:&lt;br&gt;
busybox = image name&lt;br&gt;
musl = image tag/version&lt;br&gt;
What does this command do?&lt;br&gt;
docker tag busybox:musl busybox:media&lt;/p&gt;

&lt;p&gt;It means:&lt;/p&gt;

&lt;p&gt;“Take the existing image and give it a new tag called media.”&lt;/p&gt;

&lt;p&gt;So now the same image can be referenced as:&lt;/p&gt;

&lt;p&gt;busybox:musl&lt;br&gt;
busybox:media&lt;/p&gt;

&lt;p&gt;Why verify with docker images?&lt;/p&gt;

&lt;p&gt;docker images | grep busybox&lt;/p&gt;

&lt;p&gt;This confirms the task is complete.&lt;/p&gt;

&lt;p&gt;If both tags appear, you're done.&lt;/p&gt;

&lt;p&gt;⚠️ Common Mistakes&lt;/p&gt;

&lt;p&gt;❌ Mistake 1: Logging into wrong app server&lt;/p&gt;

&lt;p&gt;Correct server is:&lt;/p&gt;

&lt;p&gt;stapp03&lt;/p&gt;

&lt;p&gt;Not stapp01 or stapp02.&lt;/p&gt;

&lt;p&gt;❌ Mistake 2: Wrong username&lt;/p&gt;

&lt;p&gt;Correct login for App Server 3:&lt;/p&gt;

&lt;p&gt;banner&lt;/p&gt;

&lt;p&gt;Not tony or steve.&lt;/p&gt;

&lt;p&gt;❌ Mistake 3: Typing the tag incorrectly&lt;/p&gt;

&lt;p&gt;Correct:&lt;/p&gt;

&lt;p&gt;busybox:media&lt;/p&gt;

&lt;p&gt;Wrong examples:&lt;/p&gt;

&lt;p&gt;busybox-media&lt;br&gt;
busybox media&lt;br&gt;
busybox:Media&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>docker</category>
    </item>
    <item>
      <title>11.Fix issue with LAMP Environment in Kubernetes</title>
      <dc:creator>Thu Kha Kyawe</dc:creator>
      <pubDate>Fri, 01 May 2026 07:31:16 +0000</pubDate>
      <link>https://forem.com/thukhakyawe_cloud/11fix-issue-with-lamp-environment-in-kubernetes-4lnk</link>
      <guid>https://forem.com/thukhakyawe_cloud/11fix-issue-with-lamp-environment-in-kubernetes-4lnk</guid>
      <description>&lt;h1&gt;
  
  
  Lab Information
&lt;/h1&gt;

&lt;p&gt;One of the DevOps team member was trying to install a WordPress website on a LAMP stack which is essentially deployed on Kubernetes cluster. It was working well and we could see the installation page a few hours ago. However something is messed up with the stack now due to a website went down. Please look into the issue and fix it:&lt;/p&gt;

&lt;p&gt;FYI, deployment name is lamp-wp and its using a service named lamp-service. The Apache is using http default port and nodeport is 30008. From the application logs it has been identified that application is facing some issues while connecting to the database in addition to other issues. Additionally, there are some environment variables associated with the pods like MYSQL_ROOT_PASSWORD, MYSQL_DATABASE,  MYSQL_USER, MYSQL_PASSWORD, MYSQL_HOST.&lt;/p&gt;

&lt;p&gt;Also do not try to delete/modify any other existing components like deployment name, service name, types, labels etc.&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 Current Status
&lt;/h1&gt;

&lt;p&gt;First, let's see the current state of the deployment, pods, and services:&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
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%2Fh04wgmnj1zt1a5dyqcyj.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%2Fh04wgmnj1zt1a5dyqcyj.png" alt=" " width="654" height="215"&gt;&lt;/a&gt;&lt;/p&gt;

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

&lt;p&gt;Check the detailed status of the pods to identify specific issues:&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;kubectl describe pods
Name:             lamp-wp-56c7c454fc-669ns
Namespace:        default
Priority:         0
Service Account:  default
Node:             kodekloud-control-plane/172.17.0.2
Start Time:       Tue, 28 Oct 2025 13:18:28 +0000
Labels:           app=lamp
                  pod-template-hash=56c7c454fc
                  tier=frontend
Annotations:      &amp;lt;none&amp;gt;
Status:           Running
IP:               10.244.0.5
IPs:
  IP:           10.244.0.5
Controlled By:  ReplicaSet/lamp-wp-56c7c454fc
Containers:
  httpd-php-container:
    Container ID:   containerd://49f05e718f1517c54f5451d00ba474fb56d7de4e10c03b649bdc230a9b86a2bd
    Image:          webdevops/php-apache:alpine-3-php7
    Image ID:       docker.io/webdevops/php-apache@sha256:bb68c986d4947d4cb49e2753a268e33ad3d69df29c8e9a7728090f4738d5bdb9
    Port:           80/TCP
    Host Port:      0/TCP
    State:          Running
      Started:      Tue, 28 Oct 2025 13:18:38 +0000
    Ready:          True
    Restart Count:  0
    Environment:
      MYSQL_ROOT_PASSWORD:  &amp;lt;set to the key 'password' in secret 'mysql-root-pass'&amp;gt;  Optional: false
      MYSQL_DATABASE:       &amp;lt;set to the key 'database' in secret 'mysql-db-url'&amp;gt;     Optional: false
      MYSQL_USER:           &amp;lt;set to the key 'username' in secret 'mysql-user-pass'&amp;gt;  Optional: false
      MYSQL_PASSWORD:       &amp;lt;set to the key 'password' in secret 'mysql-user-pass'&amp;gt;  Optional: false
      MYSQL_HOST:           &amp;lt;set to the key 'host' in secret 'mysql-host'&amp;gt;           Optional: false
    Mounts:
      /opt/docker/etc/php/php.ini from php-config-volume (rw,path="php.ini")
      /var/run/secrets/kubernetes.io/serviceaccount from kube-api-access-wbvk4 (ro)
  mysql-container:
    Container ID:   containerd://1125e9ef277fb0eeb5e7112ffbf6d5b7cbc75cf0b4b4424506bd34db58cdc23d
    Image:          mysql:5.6
    Image ID:       docker.io/library/mysql@sha256:20575ecebe6216036d25dab5903808211f1e9ba63dc7825ac20cb975e34cfcae
    Port:           3306/TCP
    Host Port:      0/TCP
    State:          Running
      Started:      Tue, 28 Oct 2025 13:18:50 +0000
    Ready:          True
    Restart Count:  0
    Environment:
      MYSQL_ROOT_PASSWORD:  &amp;lt;set to the key 'password' in secret 'mysql-root-pass'&amp;gt;  Optional: false
      MYSQL_DATABASE:       &amp;lt;set to the key 'database' in secret 'mysql-db-url'&amp;gt;     Optional: false
      MYSQL_USER:           &amp;lt;set to the key 'username' in secret 'mysql-user-pass'&amp;gt;  Optional: false
      MYSQL_PASSWORD:       &amp;lt;set to the key 'password' in secret 'mysql-user-pass'&amp;gt;  Optional: false
      MYSQL_HOST:           &amp;lt;set to the key 'host' in secret 'mysql-host'&amp;gt;           Optional: false
    Mounts:
      /var/run/secrets/kubernetes.io/serviceaccount from kube-api-access-wbvk4 (ro)
Conditions:
  Type              Status
  Initialized       True 
  Ready             True 
  ContainersReady   True 
  PodScheduled      True 
Volumes:
  php-config-volume:
    Type:      ConfigMap (a volume populated by a ConfigMap)
    Name:      php-config
    Optional:  false
  kube-api-access-wbvk4:
    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:                   BestEffort
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  2m19s  default-scheduler  Successfully assigned default/lamp-wp-56c7c454fc-669ns to kodekloud-control-plane
  Normal  Pulling    2m18s  kubelet            Pulling image "webdevops/php-apache:alpine-3-php7"
  Normal  Pulled     2m9s   kubelet            Successfully pulled image "webdevops/php-apache:alpine-3-php7" in 8.880445215s (8.880459622s including waiting)
  Normal  Created    2m9s   kubelet            Created container httpd-php-container
  Normal  Started    2m9s   kubelet            Started container httpd-php-container
  Normal  Pulling    2m9s   kubelet            Pulling image "mysql:5.6"
  Normal  Pulled     117s   kubelet            Successfully pulled image "mysql:5.6" in 11.694842776s (11.694858414s including waiting)
  Normal  Created    117s   kubelet            Created container mysql-container
  Normal  Started    117s   kubelet            Started container mysql-container
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Check the logs of the 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 logs deployment/lamp-wp -c httpd-php-container
kubectl logs deployment/lamp-wp -c mysql-container
&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 logs deployment/lamp-wp -c httpd-php-container
-&amp;gt; Executing /opt/docker/provision/entrypoint.d/05-permissions.sh
-&amp;gt; Executing /opt/docker/provision/entrypoint.d/20-php-fpm.sh
-&amp;gt; Executing /opt/docker/provision/entrypoint.d/20-php.sh
-&amp;gt; Executing /opt/docker/bin/service.d/supervisor.d//10-init.sh
2025-10-28 13:18:39,331 CRIT Set uid to user 0
2025-10-28 13:18:39,331 WARN Included extra file "/opt/docker/etc/supervisor.d/apache.conf" during parsing
2025-10-28 13:18:39,331 WARN Included extra file "/opt/docker/etc/supervisor.d/cron.conf" during parsing
2025-10-28 13:18:39,331 WARN Included extra file "/opt/docker/etc/supervisor.d/dnsmasq.conf" during parsing
2025-10-28 13:18:39,332 WARN Included extra file "/opt/docker/etc/supervisor.d/php-fpm.conf" during parsing
2025-10-28 13:18:39,332 WARN Included extra file "/opt/docker/etc/supervisor.d/postfix.conf" during parsing
2025-10-28 13:18:39,332 WARN Included extra file "/opt/docker/etc/supervisor.d/ssh.conf" during parsing
2025-10-28 13:18:39,332 WARN Included extra file "/opt/docker/etc/supervisor.d/syslog.conf" during parsing
2025-10-28 13:18:39,407 INFO RPC interface 'supervisor' initialized
2025-10-28 13:18:39,407 INFO supervisord started with pid 1
2025-10-28 13:18:40,502 INFO spawned: 'syslogd' with pid 91
2025-10-28 13:18:40,537 INFO spawned: 'php-fpmd' with pid 92
2025-10-28 13:18:40,605 INFO spawned: 'apached' with pid 95
2025-10-28 13:18:40,608 INFO spawned: 'crond' with pid 96
-&amp;gt; Executing /opt/docker/bin/service.d/syslog-ng.d//10-init.sh
2025-10-28 13:18:40,609 INFO success: php-fpmd entered RUNNING state, process has stayed up for &amp;gt; than 0 seconds (startsecs)
2025-10-28 13:18:40,609 INFO success: apached entered RUNNING state, process has stayed up for &amp;gt; than 0 seconds (startsecs)
2025-10-28 13:18:40,609 INFO success: crond entered RUNNING state, process has stayed up for &amp;gt; than 0 seconds (startsecs)
-&amp;gt; Executing /opt/docker/bin/service.d/php-fpm.d//10-init.sh
Setting php-fpm user to application
[SYSLOG] syslog-ng[91]: syslog-ng starting up; version='3.7.2'
-&amp;gt; Executing /opt/docker/bin/service.d/cron.d//10-init.sh
-&amp;gt; Executing /opt/docker/bin/service.d/httpd.d//10-init.sh
[Tue Oct 28 13:18:40.911388 2025] [so:warn] [pid 116:tid 139651331963720] AH01574: module socache_shmcb_module is already loaded, skipping
[Tue Oct 28 13:18:41.003922 2025] [so:warn] [pid 116:tid 139651331963720] AH01574: module socache_shmcb_module is already loaded, skipping
[Tue Oct 28 13:18:41.007025 2025] [lbmethod_heartbeat:notice] [pid 116:tid 139651331963720] AH02282: No slotmem from mod_heartmonitor
[Tue Oct 28 13:18:41.010290 2025] [mpm_event:notice] [pid 116:tid 139651331963720] AH00489: Apache/2.4.25 (Unix) LibreSSL/2.4.4 configured -- resuming normal operations
[Tue Oct 28 13:18:41.010318 2025] [core:notice] [pid 116:tid 139651331963720] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'
[28-Oct-2025 13:18:41] NOTICE: fpm is running, pid 92
[28-Oct-2025 13:18:41] NOTICE: ready to handle connections
2025-10-28 13:18:42,313 INFO success: syslogd entered RUNNING state, process has stayed up for &amp;gt; than 1 seconds (startsecs)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl logs deployment/lamp-wp -c mysql-container
2025-10-28 13:18:50+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 5.6.51-1debian9 started.
2025-10-28 13:18:51+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
2025-10-28 13:18:51+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 5.6.51-1debian9 started.
2025-10-28 13:18:51+00:00 [Note] [Entrypoint]: Initializing database files
2025-10-28 13:18:51 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2025-10-28 13:18:51 0 [Note] Ignoring --secure-file-priv value as server is running with --bootstrap.
2025-10-28 13:18:51 0 [Note] /usr/sbin/mysqld (mysqld 5.6.51) starting as process 94 ...
2025-10-28 13:18:51 94 [Note] InnoDB: Using atomics to ref count buffer pool pages
2025-10-28 13:18:51 94 [Note] InnoDB: The InnoDB memory heap is disabled
2025-10-28 13:18:51 94 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2025-10-28 13:18:51 94 [Note] InnoDB: Memory barrier is not used
2025-10-28 13:18:51 94 [Note] InnoDB: Compressed tables use zlib 1.2.11
2025-10-28 13:18:51 94 [Note] InnoDB: Using Linux native AIO
2025-10-28 13:18:51 94 [Note] InnoDB: Using CPU crc32 instructions
2025-10-28 13:18:51 94 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2025-10-28 13:18:51 94 [Note] InnoDB: Completed initialization of buffer pool
2025-10-28 13:18:51 94 [Note] InnoDB: The first specified data file ./ibdata1 did not exist: a new database to be created!
2025-10-28 13:18:51 94 [Note] InnoDB: Setting file ./ibdata1 size to 12 MB
2025-10-28 13:18:51 94 [Note] InnoDB: Database physically writes the file full: wait...
2025-10-28 13:18:51 94 [Note] InnoDB: Setting log file ./ib_logfile101 size to 48 MB
2025-10-28 13:18:51 94 [Note] InnoDB: Setting log file ./ib_logfile1 size to 48 MB
2025-10-28 13:18:51 94 [Note] InnoDB: Renaming log file ./ib_logfile101 to ./ib_logfile0
2025-10-28 13:18:51 94 [Warning] InnoDB: New log files created, LSN=45781
2025-10-28 13:18:51 94 [Note] InnoDB: Doublewrite buffer not found: creating new
2025-10-28 13:18:51 94 [Note] InnoDB: Doublewrite buffer created
2025-10-28 13:18:51 94 [Note] InnoDB: 128 rollback segment(s) are active.
2025-10-28 13:18:51 94 [Warning] InnoDB: Creating foreign key constraint system tables.
2025-10-28 13:18:51 94 [Note] InnoDB: Foreign key constraint system tables created
2025-10-28 13:18:51 94 [Note] InnoDB: Creating tablespace and datafile system tables.
2025-10-28 13:18:51 94 [Note] InnoDB: Tablespace and datafile system tables created.
2025-10-28 13:18:51 94 [Note] InnoDB: Waiting for purge to start
2025-10-28 13:18:51 94 [Note] InnoDB: 5.6.51 started; log sequence number 0
2025-10-28 13:18:51 94 [Note] RSA private key file not found: /var/lib/mysql//private_key.pem. Some authentication plugins will not work.
2025-10-28 13:18:51 94 [Note] RSA public key file not found: /var/lib/mysql//public_key.pem. Some authentication plugins will not work.
2025-10-28 13:18:52 94 [Note] Binlog end
2025-10-28 13:18:52 94 [Note] InnoDB: FTS optimize thread exiting.
2025-10-28 13:18:52 94 [Note] InnoDB: Starting shutdown...
2025-10-28 13:18:53 94 [Note] InnoDB: Shutdown completed; log sequence number 1625977


2025-10-28 13:18:53 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2025-10-28 13:18:53 0 [Note] Ignoring --secure-file-priv value as server is running with --bootstrap.
2025-10-28 13:18:53 0 [Note] /usr/sbin/mysqld (mysqld 5.6.51) starting as process 117 ...
2025-10-28 13:18:53 117 [Note] InnoDB: Using atomics to ref count buffer pool pages
2025-10-28 13:18:53 117 [Note] InnoDB: The InnoDB memory heap is disabled
2025-10-28 13:18:53 117 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2025-10-28 13:18:53 117 [Note] InnoDB: Memory barrier is not used
2025-10-28 13:18:53 117 [Note] InnoDB: Compressed tables use zlib 1.2.11
2025-10-28 13:18:53 117 [Note] InnoDB: Using Linux native AIO
2025-10-28 13:18:53 117 [Note] InnoDB: Using CPU crc32 instructions
2025-10-28 13:18:53 117 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2025-10-28 13:18:53 117 [Note] InnoDB: Completed initialization of buffer pool
2025-10-28 13:18:53 117 [Note] InnoDB: Highest supported file format is Barracuda.
2025-10-28 13:18:53 117 [Note] InnoDB: 128 rollback segment(s) are active.
2025-10-28 13:18:53 117 [Note] InnoDB: Waiting for purge to start
2025-10-28 13:18:53 117 [Note] InnoDB: 5.6.51 started; log sequence number 1625977
2025-10-28 13:18:53 117 [Note] RSA private key file not found: /var/lib/mysql//private_key.pem. Some authentication plugins will not work.
2025-10-28 13:18:53 117 [Note] RSA public key file not found: /var/lib/mysql//public_key.pem. Some authentication plugins will not work.
2025-10-28 13:18:53 117 [Note] Binlog end
2025-10-28 13:18:53 117 [Note] InnoDB: FTS optimize thread exiting.
2025-10-28 13:18:53 117 [Note] InnoDB: Starting shutdown...
2025-10-28 13:18:55 117 [Note] InnoDB: Shutdown completed; log sequence number 1625987




PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:

  /usr/bin/mysqladmin -u root password 'new-password'
  /usr/bin/mysqladmin -u root -h lamp-wp-56c7c454fc-669ns password 'new-password'

Alternatively you can run:

  /usr/bin/mysql_secure_installation

which will also give you the option of removing the test
databases and anonymous user created by default.  This is
strongly recommended for production servers.

See the manual for more instructions.

Please report any problems at http://bugs.mysql.com/

The latest information about MySQL is available on the web at

  http://www.mysql.com

Support MySQL by buying support/licenses at http://shop.mysql.com

Note: new default config file not created.
Please make sure your config file is current

WARNING: Default config file /etc/mysql/my.cnf exists on the system
This file will be read by default by the MySQL server
If you do not want to use this, either remove it, or use the
--defaults-file argument to mysqld_safe when starting the server

2025-10-28 13:18:55+00:00 [Note] [Entrypoint]: Database files initialized
2025-10-28 13:18:55+00:00 [Note] [Entrypoint]: Starting temporary server
2025-10-28 13:18:55+00:00 [Note] [Entrypoint]: Waiting for server startup
2025-10-28 13:18:56 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2025-10-28 13:18:56 0 [Note] mysqld (mysqld 5.6.51) starting as process 142 ...
2025-10-28 13:18:56 142 [Note] Plugin 'FEDERATED' is disabled.
2025-10-28 13:18:56 142 [Note] InnoDB: Using atomics to ref count buffer pool pages
2025-10-28 13:18:56 142 [Note] InnoDB: The InnoDB memory heap is disabled
2025-10-28 13:18:56 142 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2025-10-28 13:18:56 142 [Note] InnoDB: Memory barrier is not used
2025-10-28 13:18:56 142 [Note] InnoDB: Compressed tables use zlib 1.2.11
2025-10-28 13:18:56 142 [Note] InnoDB: Using Linux native AIO
2025-10-28 13:18:56 142 [Note] InnoDB: Using CPU crc32 instructions
2025-10-28 13:18:56 142 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2025-10-28 13:18:57 142 [Note] InnoDB: Completed initialization of buffer pool
2025-10-28 13:18:57 142 [Note] InnoDB: Highest supported file format is Barracuda.
2025-10-28 13:18:57 142 [Note] InnoDB: 128 rollback segment(s) are active.
2025-10-28 13:18:57 142 [Note] InnoDB: Waiting for purge to start
2025-10-28 13:18:57 142 [Note] InnoDB: 5.6.51 started; log sequence number 1625987
2025-10-28 13:18:57 142 [Warning] No existing UUID has been found, so we assume that this is the first time that this server has been started. Generating a new UUID: a8ad5fc2-b400-11f0-9df4-42820e4157af.
2025-10-28 13:18:57 142 [Note] RSA private key file not found: /var/lib/mysql//private_key.pem. Some authentication plugins will not work.
2025-10-28 13:18:57 142 [Note] RSA public key file not found: /var/lib/mysql//public_key.pem. Some authentication plugins will not work.
2025-10-28 13:18:57 142 [Warning] Insecure configuration for --pid-file: Location '/var/run/mysqld' in the path is accessible to all OS users. Consider choosing a different directory.
2025-10-28 13:18:57 142 [Warning] 'user' entry 'root@lamp-wp-56c7c454fc-669ns' ignored in --skip-name-resolve mode.
2025-10-28 13:18:57 142 [Warning] 'user' entry '@lamp-wp-56c7c454fc-669ns' ignored in --skip-name-resolve mode.
2025-10-28 13:18:57 142 [Warning] 'proxies_priv' entry '@ root@lamp-wp-56c7c454fc-669ns' ignored in --skip-name-resolve mode.
2025-10-28 13:18:57 142 [Note] Event Scheduler: Loaded 0 events
2025-10-28 13:18:57 142 [Note] mysqld: ready for connections.
Version: '5.6.51'  socket: '/var/run/mysqld/mysqld.sock'  port: 0  MySQL Community Server (GPL)
2025-10-28 13:18:57+00:00 [Note] [Entrypoint]: Temporary server started.
Warning: Unable to load '/usr/share/zoneinfo/iso3166.tab' as time zone. Skipping it.
Warning: Unable to load '/usr/share/zoneinfo/leap-seconds.list' as time zone. Skipping it.
Warning: Unable to load '/usr/share/zoneinfo/zone.tab' as time zone. Skipping it.
Warning: Unable to load '/usr/share/zoneinfo/zone1970.tab' as time zone. Skipping it.
2025-10-28 13:19:00 142 [Warning] 'proxies_priv' entry '@ root@lamp-wp-56c7c454fc-669ns' ignored in --skip-name-resolve mode.
2025-10-28 13:19:00+00:00 [Note] [Entrypoint]: Creating database kodekloud_db2
2025-10-28 13:19:00+00:00 [Note] [Entrypoint]: Creating user kodekloud_gem
2025-10-28 13:19:00+00:00 [Note] [Entrypoint]: Giving user kodekloud_gem access to schema kodekloud_db2

2025-10-28 13:19:00+00:00 [Note] [Entrypoint]: Stopping temporary server
2025-10-28 13:19:00 142 [Note] mysqld: Normal shutdown

2025-10-28 13:19:00 142 [Note] Giving 0 client threads a chance to die gracefully
2025-10-28 13:19:00 142 [Note] Event Scheduler: Purging the queue. 0 events
2025-10-28 13:19:00 142 [Note] Shutting down slave threads
2025-10-28 13:19:00 142 [Note] Forcefully disconnecting 0 remaining clients
2025-10-28 13:19:00 142 [Note] Binlog end
2025-10-28 13:19:00 142 [Note] Shutting down plugin 'partition'
2025-10-28 13:19:00 142 [Note] Shutting down plugin 'PERFORMANCE_SCHEMA'
2025-10-28 13:19:00 142 [Note] Shutting down plugin 'INNODB_SYS_DATAFILES'
2025-10-28 13:19:00 142 [Note] Shutting down plugin 'INNODB_SYS_TABLESPACES'
2025-10-28 13:19:00 142 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN_COLS'
2025-10-28 13:19:00 142 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN'
2025-10-28 13:19:00 142 [Note] Shutting down plugin 'INNODB_SYS_FIELDS'
2025-10-28 13:19:00 142 [Note] Shutting down plugin 'INNODB_SYS_COLUMNS'
2025-10-28 13:19:00 142 [Note] Shutting down plugin 'INNODB_SYS_INDEXES'
2025-10-28 13:19:00 142 [Note] Shutting down plugin 'INNODB_SYS_TABLESTATS'
2025-10-28 13:19:00 142 [Note] Shutting down plugin 'INNODB_SYS_TABLES'
2025-10-28 13:19:00 142 [Note] Shutting down plugin 'INNODB_FT_INDEX_TABLE'
2025-10-28 13:19:00 142 [Note] Shutting down plugin 'INNODB_FT_INDEX_CACHE'
2025-10-28 13:19:00 142 [Note] Shutting down plugin 'INNODB_FT_CONFIG'
2025-10-28 13:19:00 142 [Note] Shutting down plugin 'INNODB_FT_BEING_DELETED'
2025-10-28 13:19:00 142 [Note] Shutting down plugin 'INNODB_FT_DELETED'
2025-10-28 13:19:00 142 [Note] Shutting down plugin 'INNODB_FT_DEFAULT_STOPWORD'
2025-10-28 13:19:00 142 [Note] Shutting down plugin 'INNODB_METRICS'
2025-10-28 13:19:00 142 [Note] Shutting down plugin 'INNODB_BUFFER_POOL_STATS'
2025-10-28 13:19:00 142 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE_LRU'
2025-10-28 13:19:00 142 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE'
2025-10-28 13:19:00 142 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX_RESET'
2025-10-28 13:19:00 142 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX'
2025-10-28 13:19:00 142 [Note] Shutting down plugin 'INNODB_CMPMEM_RESET'
2025-10-28 13:19:00 142 [Note] Shutting down plugin 'INNODB_CMPMEM'
2025-10-28 13:19:00 142 [Note] Shutting down plugin 'INNODB_CMP_RESET'
2025-10-28 13:19:00 142 [Note] Shutting down plugin 'INNODB_CMP'
2025-10-28 13:19:00 142 [Note] Shutting down plugin 'INNODB_LOCK_WAITS'
2025-10-28 13:19:00 142 [Note] Shutting down plugin 'INNODB_LOCKS'
2025-10-28 13:19:00 142 [Note] Shutting down plugin 'INNODB_TRX'
2025-10-28 13:19:00 142 [Note] Shutting down plugin 'InnoDB'
2025-10-28 13:19:00 142 [Note] InnoDB: FTS optimize thread exiting.
2025-10-28 13:19:00 142 [Note] InnoDB: Starting shutdown...
2025-10-28 13:19:01 142 [Note] InnoDB: Shutdown completed; log sequence number 1625997
2025-10-28 13:19:01 142 [Note] Shutting down plugin 'BLACKHOLE'
2025-10-28 13:19:01 142 [Note] Shutting down plugin 'ARCHIVE'
2025-10-28 13:19:01 142 [Note] Shutting down plugin 'MRG_MYISAM'
2025-10-28 13:19:01 142 [Note] Shutting down plugin 'MyISAM'
2025-10-28 13:19:01 142 [Note] Shutting down plugin 'MEMORY'
2025-10-28 13:19:01 142 [Note] Shutting down plugin 'CSV'
2025-10-28 13:19:01 142 [Note] Shutting down plugin 'sha256_password'
2025-10-28 13:19:01 142 [Note] Shutting down plugin 'mysql_old_password'
2025-10-28 13:19:01 142 [Note] Shutting down plugin 'mysql_native_password'
2025-10-28 13:19:01 142 [Note] Shutting down plugin 'binlog'
2025-10-28 13:19:01 142 [Note] mysqld: Shutdown complete

2025-10-28 13:19:02+00:00 [Note] [Entrypoint]: Temporary server stopped

2025-10-28 13:19:02+00:00 [Note] [Entrypoint]: MySQL init process done. Ready for start up.

2025-10-28 13:19:03 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2025-10-28 13:19:03 0 [Note] mysqld (mysqld 5.6.51) starting as process 1 ...
2025-10-28 13:19:03 1 [Note] Plugin 'FEDERATED' is disabled.
2025-10-28 13:19:03 1 [Note] InnoDB: Using atomics to ref count buffer pool pages
2025-10-28 13:19:03 1 [Note] InnoDB: The InnoDB memory heap is disabled
2025-10-28 13:19:03 1 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2025-10-28 13:19:03 1 [Note] InnoDB: Memory barrier is not used
2025-10-28 13:19:03 1 [Note] InnoDB: Compressed tables use zlib 1.2.11
2025-10-28 13:19:03 1 [Note] InnoDB: Using Linux native AIO
2025-10-28 13:19:03 1 [Note] InnoDB: Using CPU crc32 instructions
2025-10-28 13:19:03 1 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2025-10-28 13:19:03 1 [Note] InnoDB: Completed initialization of buffer pool
2025-10-28 13:19:03 1 [Note] InnoDB: Highest supported file format is Barracuda.
2025-10-28 13:19:03 1 [Note] InnoDB: 128 rollback segment(s) are active.
2025-10-28 13:19:03 1 [Note] InnoDB: Waiting for purge to start
2025-10-28 13:19:03 1 [Note] InnoDB: 5.6.51 started; log sequence number 1625997
2025-10-28 13:19:03 1 [Note] RSA private key file not found: /var/lib/mysql//private_key.pem. Some authentication plugins will not work.
2025-10-28 13:19:03 1 [Note] RSA public key file not found: /var/lib/mysql//public_key.pem. Some authentication plugins will not work.
2025-10-28 13:19:03 1 [Note] Server hostname (bind-address): '*'; port: 3306
2025-10-28 13:19:03 1 [Note] IPv6 is available.
2025-10-28 13:19:03 1 [Note]   - '::' resolves to '::';
2025-10-28 13:19:03 1 [Note] Server socket created on IP: '::'.
2025-10-28 13:19:03 1 [Warning] Insecure configuration for --pid-file: Location '/var/run/mysqld' in the path is accessible to all OS users. Consider choosing a different directory.
2025-10-28 13:19:03 1 [Warning] 'proxies_priv' entry '@ root@lamp-wp-56c7c454fc-669ns' ignored in --skip-name-resolve mode.
2025-10-28 13:19:03 1 [Note] Event Scheduler: Loaded 0 events
2025-10-28 13:19:03 1 [Note] mysqld: ready for connections.
Version: '5.6.51'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  MySQL Community Server (GPL)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  Step 3: Investigate Application Code
&lt;/h1&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl exec -it lamp-wp-56c7c454fc-tw86w -c httpd-php-container -- sh
cd /app
ls
cat index.php
vi index.php
service httpd restart
service httpd status
&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;&amp;lt;?php
$dbname = $_ENV['MYSQL_DATABASE'];
$dbuser = $_ENV['MYSQL_USER'];
$dbpass = $_ENV[''MYSQL_PASSWORD""];
$dbhost = $_ENV['MYSQL-HOST'];


$connect = mysqli_connect($dbhost, $dbuser, $dbpass) or die("Unable to Connect to '$dbhost'");

$test_query = "SHOW TABLES FROM $dbname";
$result = mysqli_query($test_query);

if ($result-&amp;gt;connect_error) {
   die("Connection failed: " . $conn-&amp;gt;connect_error);
}
  echo "Connected successfully";
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Typo in Environment Variables&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;?php
$dbname = $_ENV['MYSQL_DATABASE'];
$dbuser = $_ENV['MYSQL_USER'];
$dbpass = $_ENV['MYSQL_PASSWORD'];
$dbhost = $_ENV['MYSQL_HOST'];


$connect = mysqli_connect($dbhost, $dbuser, $dbpass) or die("Unable to Connect to '$dbhost'");

$test_query = "SHOW TABLES FROM $dbname";
$result = mysqli_query($test_query);

if ($result-&amp;gt;connect_error) {
   die("Connection failed: " . $conn-&amp;gt;connect_error);
}
  echo "Connected successfully";
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  Step 4: Check Service Configuration
&lt;/h1&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl patch service lamp-service -p '{"spec":{"ports":[{"port":80,"targetPort":80,"nodePort":30008}]}}'
&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%2F7ivssf71l50kjdc1w00j.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%2F7ivssf71l50kjdc1w00j.png" alt=" " width="800" height="33"&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%2Fygj4mgs3ujv2vik10v6x.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%2Fygj4mgs3ujv2vik10v6x.png" alt=" " width="249" height="45"&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>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://forem.com/thukhakyawe_cloud/10troubleshoot-deployment-issues-in-kubernetes-o18</link>
      <guid>https://forem.com/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://forem.com/thukhakyawe_cloud/9deploy-node-app-on-kubernetes-54o4</link>
      <guid>https://forem.com/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://forem.com/thukhakyawe_cloud/8deploy-tomcat-app-on-kubernetes-1njk</link>
      <guid>https://forem.com/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://forem.com/thukhakyawe_cloud/50-off-official-aws-exam-vouchers-professional-specialty-certifications-3d1d</link>
      <guid>https://forem.com/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://forem.com/thukhakyawe_cloud/7deploy-grafana-on-kubernetes-cluster-20ch</link>
      <guid>https://forem.com/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://forem.com/thukhakyawe_cloud/6deploy-jenkins-on-kubernetes-5450</link>
      <guid>https://forem.com/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>
  </channel>
</rss>
