<?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>Debug School: Palak Garg</title>
    <description>The latest articles on Debug School by Palak Garg (@palakg1904).</description>
    <link>https://www.debug.school/palakg1904</link>
    <image>
      <url>https://www.debug.school/images/CPDdQlGexClW9WOTxwLbEDeLKxuBxqind7bvkmstzXo/rs:fill:90:90/g:sm/mb:500000/ar:1/aHR0cHM6Ly90aGVw/cmFjdGljYWxkZXYu/czMuYW1hem9uYXdz/LmNvbS9pLzk5bXZs/c2Z1NXRmajltN2t1/MjVkLnBuZw</url>
      <title>Debug School: Palak Garg</title>
      <link>https://www.debug.school/palakg1904</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://www.debug.school/feed/palakg1904"/>
    <language>en</language>
    <item>
      <title>Kubernetes</title>
      <dc:creator>Palak Garg</dc:creator>
      <pubDate>Wed, 26 Apr 2023 09:50:25 +0000</pubDate>
      <link>https://www.debug.school/palakg1904/kubernetes-1oec</link>
      <guid>https://www.debug.school/palakg1904/kubernetes-1oec</guid>
      <description>&lt;p&gt;&lt;strong&gt;What is Kubernetes?&lt;/strong&gt;&lt;br&gt;
Kubernetes is an open-source container Orchestrator. It is designed by google in 2015. It has Workload placement, infrastructure placement, and Desired state&lt;br&gt;
&lt;strong&gt;Why Kubernetes&lt;/strong&gt;&lt;br&gt;
It has self-healing, automated rollbacks, auto Scaling and load balancing capability &lt;br&gt;
Speed of deployment is fast &lt;br&gt;
Enhance productivity &lt;br&gt;
Improve security &lt;br&gt;
&lt;strong&gt;Explained Kubernetes Architecture&lt;/strong&gt;&lt;br&gt;
It has Kubernete cluster which comprise of masters and nodes &lt;br&gt;
&lt;strong&gt;Master Components&lt;/strong&gt;&lt;br&gt;
Kube-apiserver which acts as Control panel&lt;br&gt;
Cluster store is powered by ectd &lt;br&gt;
Kube -Controller manager it watches for changes &lt;br&gt;
Kube -Scheduler – watces api server for pods &lt;br&gt;
&lt;strong&gt;Worker Components&lt;/strong&gt;&lt;br&gt;
Kubelet is a main Kubernetes agent&lt;br&gt;&lt;br&gt;
Container engine&lt;br&gt;
Kube-proxy &lt;br&gt;
&lt;strong&gt;Workstation Components&lt;/strong&gt;&lt;br&gt;
Kubelet we use json or yaml&lt;br&gt;
&lt;strong&gt;What is POD?&lt;/strong&gt;&lt;br&gt;
It is atomic unit which is responsible for running containers inside it &lt;/p&gt;

</description>
    </item>
    <item>
      <title>Docker Day2 Assignment</title>
      <dc:creator>Palak Garg</dc:creator>
      <pubDate>Wed, 26 Apr 2023 08:20:20 +0000</pubDate>
      <link>https://www.debug.school/palakg1904/docker-day2-assignment-19g2</link>
      <guid>https://www.debug.school/palakg1904/docker-day2-assignment-19g2</guid>
      <description>&lt;p&gt;*&lt;em&gt;Executed some more Docker commands *&lt;/em&gt;&lt;br&gt;
• cp &lt;br&gt;
• diff &lt;br&gt;
• rename &lt;br&gt;
• port &lt;br&gt;
• update &lt;br&gt;
• wait &lt;br&gt;
• logs &lt;br&gt;
• events &lt;br&gt;
• top &lt;br&gt;
• inspect &lt;br&gt;
*&lt;em&gt;Docker commands for images *&lt;/em&gt;&lt;br&gt;
• docker images &lt;br&gt;
• docker pull &lt;br&gt;
• docker info &lt;br&gt;
• docker rmi &lt;br&gt;
• docker inspect &lt;br&gt;
• docker commit – m “message” – a”name” container id alias name &lt;/p&gt;

&lt;p&gt;*&lt;em&gt;How to design docker image *&lt;/em&gt;&lt;br&gt;
&lt;code&gt;docker run -itd ubuntu&lt;br&gt;
docker exec -it “containerid” /bin/bash&lt;/code&gt;&lt;br&gt;
install java &lt;br&gt;
&lt;code&gt;apt-get update&lt;br&gt;
apt-get install openjdk-11-jdk -y&lt;br&gt;
apt-get install openjdk-11-jdk-headless -y&lt;/code&gt;&lt;br&gt;
install apache &lt;br&gt;
&lt;code&gt;apt-get install apache2 -y&lt;/code&gt;&lt;br&gt;
Install wget &lt;br&gt;
&lt;code&gt;apt-get install wget -y&lt;/code&gt;&lt;br&gt;
Install war file &lt;br&gt;
&lt;code&gt;wget https://tomcat.apache.org/tomcat-7.0-doc/appdev/sample/sample.war&lt;br&gt;
chmod 755 sample.war&lt;/code&gt;&lt;br&gt;
commit the image &lt;/p&gt;

&lt;p&gt;&lt;code&gt;docker commit -m"message" -a"Palak" containerid name &lt;br&gt;
docker images&lt;/code&gt;&lt;br&gt;
Validate java and apache &lt;br&gt;
&lt;code&gt;docker exec containerid java&lt;br&gt;
docker exec containerid which apache2&lt;br&gt;
docker exec containerid ls /opt/&lt;/code&gt;&lt;br&gt;
Saving and loading tar file &lt;br&gt;
After committing the docker image &lt;br&gt;
Save the file &lt;br&gt;
&lt;code&gt;docker save -o image.tar name of image&lt;/code&gt;&lt;br&gt;
you can stop the containers if u want &lt;br&gt;
Load the file &lt;br&gt;
&lt;code&gt;docker load -i image.tar&lt;/code&gt;&lt;br&gt;
Pushing the docker image to repository &lt;br&gt;
Create an account in docker hub &lt;br&gt;
Login to docker hub in putty &lt;br&gt;
&lt;code&gt;docker login&lt;/code&gt;&lt;br&gt;
provide username and password &lt;br&gt;
tag the image matching to repo name &lt;br&gt;
&lt;code&gt;docker tag image palakg1904/demo&lt;/code&gt;&lt;br&gt;
Push the image to repo&lt;br&gt;
&lt;code&gt;docker push palakg1904/demo&lt;/code&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Docker Day 1 Assignment</title>
      <dc:creator>Palak Garg</dc:creator>
      <pubDate>Tue, 25 Apr 2023 04:45:24 +0000</pubDate>
      <link>https://www.debug.school/palakg1904/docker-day-1-assignment-1bd1</link>
      <guid>https://www.debug.school/palakg1904/docker-day-1-assignment-1bd1</guid>
      <description>&lt;p&gt;What is Docker?&lt;br&gt;
Docker is a container management tool or software platform that allows you to build, test and deploy applications quickly.&lt;/p&gt;

&lt;p&gt;Why We need docker?&lt;br&gt;
It reduces the cost &lt;br&gt;
It saves time as it deploys code quickly &lt;br&gt;
It improves software quality &lt;/p&gt;

&lt;p&gt;What is Container?&lt;br&gt;
A container is a standard unit of software that packages up code and all its dependencies, so the application runs quickly and reliably from one computing environment to another&lt;/p&gt;

&lt;p&gt;How Container Works?&lt;br&gt;
It is a runnable instance of an image. You can create, start, stop, move, or delete a container &lt;/p&gt;

&lt;p&gt;How to install Docker?&lt;br&gt;
Step 1 – Download and Run the script.&lt;br&gt;
$ curl -fsSL get.docker.com -o get-docker.sh&lt;br&gt;
$ sudo sh get-docker.sh&lt;br&gt;
Step 2 – Enable Docker&lt;br&gt;
$ sudo systemctl enable docker&lt;br&gt;
Step 3 – Start Docker&lt;br&gt;
$ sudo systemctl start docker&lt;br&gt;
Step 4 – Verify that docker is installed correctly by running the hello-world image.&lt;br&gt;
$ sudo docker run hello-world&lt;/p&gt;

&lt;p&gt;What are the components docker?&lt;br&gt;
Docker Engine &lt;br&gt;
Docker Images &lt;br&gt;
Registry &lt;br&gt;
Containers  &lt;/p&gt;

&lt;p&gt;What is a container lifecycle commands?&lt;br&gt;
Docker create “docker name”&lt;br&gt;
Docker start “container id”&lt;br&gt;
Docker restart “container id”&lt;br&gt;
Docker pause “container id”&lt;br&gt;
Docker unpause “container id”&lt;br&gt;
Docker stop “container id”&lt;br&gt;
Docker kill “container id”&lt;br&gt;
Docker stats “container id”&lt;br&gt;
Docker rm “container id”&lt;/p&gt;

&lt;p&gt;What is docker pause/unpause?&lt;br&gt;
Docker pause is used to pause the session which are not active currently to save CPU resources &lt;br&gt;
Docker unpause command is used to unpause the session which is paused currently to resume the session &lt;/p&gt;

&lt;p&gt;What is docker stop/kill?&lt;br&gt;
Docker stop will end the session with Exit (0) code and it stops container gracefully &lt;br&gt;
Docker Kill will terminate the session abruptly with Exit (137) code &lt;/p&gt;

&lt;p&gt;How to get inside a container?&lt;br&gt;
docker run -it -d ubuntu /bin/bash&lt;br&gt;
docker run -itd ubuntu /bin/bash&lt;br&gt;
docker exec 955a249cbf71 ls&lt;br&gt;
docker exec 955a249cbf71 ps -eaf&lt;br&gt;
docker exec -it 955a249cbf71 /bin/bash&lt;/p&gt;

&lt;p&gt;How to access container from outside?&lt;br&gt;
docker inspect 955a249cbf71&lt;br&gt;
docker ps&lt;br&gt;
 curl &lt;a href="http://172.17.0.9"&gt;http://172.17.0.9&lt;/a&gt;&lt;br&gt;
 ping "172.17.0.9"&lt;/p&gt;

&lt;p&gt;What is the rule for container is running?&lt;br&gt;
Attached to a terminal of PID1 of the container. PID changes&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
