<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Sathya on Medium]]></title>
        <description><![CDATA[Stories by Sathya on Medium]]></description>
        <link>https://medium.com/@sathya2294?source=rss-17c1716e15b------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*gpfenkVeAW2Wr9efNtqRRg.jpeg</url>
            <title>Stories by Sathya on Medium</title>
            <link>https://medium.com/@sathya2294?source=rss-17c1716e15b------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 16:41:27 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@sathya2294/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Docker — Commands — Part1]]></title>
            <link>https://blog.devgenius.io/docker-commands-part1-156b899384e5?source=rss-17c1716e15b------2</link>
            <guid isPermaLink="false">https://medium.com/p/156b899384e5</guid>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[k8s]]></category>
            <category><![CDATA[docker-compose]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[docker]]></category>
            <dc:creator><![CDATA[Sathya]]></dc:creator>
            <pubDate>Thu, 18 Sep 2025 15:55:42 GMT</pubDate>
            <atom:updated>2025-09-19T15:44:25.315Z</atom:updated>
            <content:encoded><![CDATA[<h3>Docker — Commands — Part1</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/247/1*Xog9AmgmzZmIChm51L6sGA.png" /></figure><p>In this article , we are going to walk through basic docker commands .</p><ol><li>Version</li></ol><p>docker — version OR docker version → This will display the version of Docker.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*A-FD8TPNbNwJhglcovYhfQ.png" /></figure><p>2. Container creation</p><p>docker run -d — name &lt;container-name&gt; &lt;image-name&gt;</p><ul><li>d → detached mode . This means that background running logs will not be shown . It only displays necessary information .</li></ul><p>Below we are trying to create a container named <strong>nginx-server</strong> and it will contain image <strong>nginx</strong>. Initially it will check for the <strong>nginx </strong>image , if it is not there then it starts downloading .</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Qy5pfJ3ggv7XkaHxFHXrPw.png" /></figure><p>Now once again we are trying to create another container with nginx image , since image is already downloaded it is just creating container right way . Please compare below screenshot with above one .</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/919/1*jYJFCJTgAhz44uKpOs4b-g.png" /></figure><p>Once it is created it will display the container ID .</p><p>3. View container status</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NkGrhgDBy3N4h_ZW4_NXSw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aJLPLzBWWKarSZ710SMWXQ.png" /></figure><p>docker ps → This commands only returns container in running status</p><p>To view stopped containers as well use → docker ps -a</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BwDfWE631ppfZ4eass4JYw.png" /></figure><p>4. View Images</p><p>docker images → This displays the image present in Docker</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/870/1*AZCOASVMWVgKswtYPcuNMQ.png" /></figure><p>5. Remove images</p><p>docker image rm &lt;image-name&gt;</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OR5Fv69L9OtQdGHdiSdvzA.png" /></figure><p>6. Stop container</p><p>docker stop &lt;container-name&gt; OR &lt;container-id&gt;</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7qo0aOPhrcd2Hfcj35OiDA.png" /></figure><p>7. Start container</p><p>docker start &lt;container-name&gt; OR &lt;container-id&gt;</p><p>Here we are trying to start the same container we stopped in above step .</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MZ6MrNNZAJ9ETpMyJ1eQuw.png" /></figure><p>############### Happy Learning ###################</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=156b899384e5" width="1" height="1" alt=""><hr><p><a href="https://blog.devgenius.io/docker-commands-part1-156b899384e5">Docker — Commands — Part1</a> was originally published in <a href="https://blog.devgenius.io/">Dev Genius</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Kubernetes Services — Part 1]]></title>
            <link>https://medium.com/@sathya2294/kubernetes-services-part-1-ee7dd656a1aa?source=rss-17c1716e15b------2</link>
            <guid isPermaLink="false">https://medium.com/p/ee7dd656a1aa</guid>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[k8s]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[azure]]></category>
            <category><![CDATA[docker]]></category>
            <dc:creator><![CDATA[Sathya]]></dc:creator>
            <pubDate>Fri, 30 May 2025 15:31:12 GMT</pubDate>
            <atom:updated>2025-05-30T15:31:38.648Z</atom:updated>
            <content:encoded><![CDATA[<h3>Kubernetes Services — Part 1</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*iHUavf33Yhyjtxw4.jpg" /></figure><p>In this article we are going to learn what is a K8s service ?</p><p>In K8s , apps are deployed into a pod . Each pod has its own IP address .</p><p>Whenever we want to access application , through pod IP we can do . But IPs are not static .</p><p>When a pod restarts or deleted , a <strong>new IP</strong> is allocated and every time we need to access , IP modification is also required .This is a tedious and tiresome job .</p><p>To avoid this in K8s Service has been introduced .</p><p>Services will be assigned a <strong>static </strong>IP . This will help to access pod through this static IP even when pod restarts or deleted .</p><p>There are mainly 4 types of services and they are : —</p><ol><li>Cluster IP</li><li>Node Port</li><li>Load Balancer</li><li>External Name</li><li>Headless Service</li></ol><p><strong>Cluster IP</strong></p><ul><li>Used for accessing only within the cluster</li><li>internal communication between services/pods.</li></ul><p><strong>Node Port</strong></p><ul><li>Exposes the service on a <strong>static port</strong> on each node</li><li>Ports between 30000–32767</li></ul><p><strong>Load Balancer</strong></p><ul><li>Provisions an <strong>external load balancer</strong> (e.g., in GCP, AWS, Azure)</li><li>Exposes the service on a <strong>public IP</strong></li><li>Automatically includes a <strong>NodePort</strong> internally</li></ul><p><strong>External Name</strong></p><ul><li>Maps the Service to an <strong>external DNS name</strong>.</li><li><strong>No selector or pods involved</strong>.</li><li>Used for accessing external services (e.g., a database outside the cluster)</li></ul><p><strong>Headless Service</strong></p><ul><li>Directly exposes individual Pod IPs <strong>without load balancing</strong></li><li>Used in Stateful workloads (e.g., databases )</li><li>Cluster IP will be provided as None here</li></ul><p>In next article we learn in detail of all these services</p><p>############ Happy Learning ################</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ee7dd656a1aa" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Kubernetes Deployment]]></title>
            <link>https://blog.devgenius.io/kubernetes-deployment-0fb026ee6777?source=rss-17c1716e15b------2</link>
            <guid isPermaLink="false">https://medium.com/p/0fb026ee6777</guid>
            <category><![CDATA[k8s]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[azure]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[gcp]]></category>
            <dc:creator><![CDATA[Sathya]]></dc:creator>
            <pubDate>Tue, 27 May 2025 09:51:53 GMT</pubDate>
            <atom:updated>2025-05-30T16:35:25.901Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/603/1*tc0vh9O0RbDTCUdFI2VSMg.png" /><figcaption>deployment</figcaption></figure><p>Deployment is always used along with a replicaset . Deployments mainly overcome limitations of replicaset which are : -</p><p>a. Updates</p><p>b. Rollback</p><p>A <strong>Deployment</strong> in Kubernetes is a higher-level <strong>controller</strong> that manages your application by automatically creating and managing <strong>ReplicaSets</strong>, which in turn manage <strong>Pods</strong>.</p><p>A <strong>Deployment</strong> is a Kubernetes object used to:</p><ul><li>Declare <strong>how many replicas</strong> of your application should run</li><li>Define <strong>how updates</strong> to the application should be rolled out</li><li>Provide <strong>version history</strong>, <strong>rollback</strong>, and <strong>scaling</strong> mechanisms</li></ul><p>Copy below code and save in <strong>deployment.yaml</strong> file</p><pre>apiVersion: apps/v1<br>kind: Deployment<br>metadata:<br>  name: my-deployment<br>spec:<br>  replicas: 3<br>  selector:<br>    matchLabels:<br>      app: my-app<br>  template:<br>    metadata:<br>      labels:<br>        app: my-app<br>    spec:<br>      containers:<br>      - name: my-container<br>        image: nginx:1.25<br>        ports:<br>        - containerPort: 80</pre><pre>kubectl apply -f deployment.yaml</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/863/1*ujCBvCNp8Zymff9dBPe3Eg.png" /></figure><p>You can see that along with deployment , replicaset also created .</p><p>Deployment can be scaled as follows</p><pre>kubectl scale deployment my-deployment --replicas=5</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*IQjbabV5xcweYk5yIsgNZA.png" /></figure><p>The image used in our code is <strong>nginx:1.25</strong> and if we want to modify to <strong>nginx:1.26</strong> , it can be done using below .</p><pre>kubectl set image deployment/my-deployment my-container=nginx:1.26</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1nRlySw_96quIt7B8djUXg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AUOi0hyW8A7nKnodHy0V1A.png" /></figure><p>Above indicates image is now updated</p><pre>kubectl rollout history deployment my-deployment</pre><p>This command helps you to find the rollout history</p><p>You can also add reasons for new versions as below</p><pre>kubectl annotate deployment my-deployment kubernetes.io/change-cause=&quot;Updated to nginx:1.26&quot;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gu7fEpDyNHmwQbsOwFXlog.png" /></figure><p>To view what changed in a specific version</p><pre>kubectl rollout history deployment my-deployment --revision=2</pre><p>If your version have some issues , then you can easily roll back using below command</p><pre>kubectl rollout undo deployment my-deployment --to-revision=1</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1016/1*hUC_dA_VcDSbl5ioIwL_zg.png" /></figure><p>Now you can see it has been rolled back to previous version .</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cusX4K3qe46VfPa4Z1SeGQ.png" /></figure><p>########### Happy Learning ################</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0fb026ee6777" width="1" height="1" alt=""><hr><p><a href="https://blog.devgenius.io/kubernetes-deployment-0fb026ee6777">Kubernetes Deployment</a> was originally published in <a href="https://blog.devgenius.io/">Dev Genius</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Kubernetes Replicaset]]></title>
            <link>https://blog.devgenius.io/kubernetes-replicaset-72b5a1657e09?source=rss-17c1716e15b------2</link>
            <guid isPermaLink="false">https://medium.com/p/72b5a1657e09</guid>
            <category><![CDATA[k8s]]></category>
            <category><![CDATA[containerization]]></category>
            <category><![CDATA[azure]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[aws]]></category>
            <dc:creator><![CDATA[Sathya]]></dc:creator>
            <pubDate>Tue, 27 May 2025 09:19:13 GMT</pubDate>
            <atom:updated>2025-05-30T16:35:19.019Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/562/1*ta2RyYPCmYXLvDU1Ay_ofA.png" /></figure><p>Consider you are deploying an application to a pod . Only one pod is created for hosting this application . Due to some issues this pod is down , then it will not be able to serve users . In this scenario we need multiple copies of our application to be hosted in multiple pods . This concept is called Replicaset .</p><p>A <strong>ReplicaSet</strong> is a Kubernetes controller that ensures a specified number of identical <strong>pod replicas</strong> are running at any given time.</p><p>A <strong>ReplicaSet</strong> (RS) monitors the state of Pods and ensures that the <strong>desired number of replicas</strong> (copies of a Pod) are always running. If a Pod crashes or is deleted, the ReplicaSet automatically <strong>re-creates</strong> it.</p><p>Create a file called <strong>replicaset.yaml</strong> and copy the below code .</p><pre>apiVersion: apps/v1<br>kind: ReplicaSet<br>metadata:<br>  name: my-replicaset<br>  labels:<br>    app: my-app<br>spec:<br>  replicas: 5<br>  selector:<br>    matchLabels:<br>      app: my-app<br>  template:<br>    metadata:<br>      labels:<br>        app: my-app<br>    spec:<br>      containers:<br>      - name: my-container<br>        image: nginx:1.25<br>        ports:<br>        - containerPort: 80</pre><p>Now create using</p><pre>kubectl apply -f replicaset.yaml</pre><pre>kubectl get rs</pre><p>rs is the shortform of replicaset , you can also use <strong>replicaset </strong>instead of rs .</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/711/1*yFFEo9RT58Lopj2L9_huTg.png" /></figure><p>We can now see that a replicaset created with 5 replicas . Whenever a replicaset got created , correspondingly pods also have created .</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/812/1*j8kGCl8WxEse-R5LpcCnLQ.png" /></figure><p>Here 5 replicas are in running state</p><pre>kubectl describe rs &lt;replicaset-name&gt;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*a3WaJZNpTD-kVeksbx7uqQ.png" /></figure><p><strong><em>Key advantages of Replicaset</em></strong> are : -</p><p>a. High Availability — This ensures that always more than one replica of pod will be there to serve the traffic even if one goes down</p><p>b. Scalability — Pod count can be increased based on your requirement</p><p>c. Self Healing — If a pod fails or get deleted , another one will be automatically created .</p><p>In our example earlier we have defined with 5 replicas . Now we can try to increase it to 7 .</p><pre>kubectl scale rs my-replicaset --replicas=7</pre><p>Pod also got increased to 7 .</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/788/1*ojngc7Zy-lTReOJ6O6KIOA.png" /></figure><p>Similarly you can decrease the pod count as well which will inturn reduce pods .</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/819/1*c226zb7bvIF0d5LhvvXT6A.png" /></figure><p><strong>What will happen if you delete a pod ?</strong></p><p>Replicaset always ensures that certain replicas will be there . So it creates another pod . We can try deleting one pod and see how it works .</p><p>Here I have tried to delete pod and simultaneously another pod is getting cretaed as shown below .</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/944/1*vDUdkCfwKtAbdqeDITjvvw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/789/1*Klx10Kowb2ymHomIkqf09g.png" /></figure><p>You can see the highlighted one which was recently created .</p><pre>kubectl delete rs my-replicaset</pre><p>Above command deletes replicaset .</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/570/1*a1QLxcXWX8QGxLBtlk98Iw.png" /></figure><p>Note :</p><blockquote>ReplicaSets are usually not created directly; instead, they are managed by Deployments which handle updates and rollbacks.</blockquote><blockquote>A ReplicaSet only ensures availability of a set number of identical pods; it does not support rolling updates.</blockquote><p>We can see what is <strong>deployment </strong>in our next article .</p><p>########## Happy Learning #############</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=72b5a1657e09" width="1" height="1" alt=""><hr><p><a href="https://blog.devgenius.io/kubernetes-replicaset-72b5a1657e09">Kubernetes Replicaset</a> was originally published in <a href="https://blog.devgenius.io/">Dev Genius</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Kubernetes Architecture — Part 1]]></title>
            <link>https://blog.devgenius.io/kubernetes-architecture-part-1-9571c84a4924?source=rss-17c1716e15b------2</link>
            <guid isPermaLink="false">https://medium.com/p/9571c84a4924</guid>
            <category><![CDATA[k8s]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[kubernetes-cluster]]></category>
            <dc:creator><![CDATA[Sathya]]></dc:creator>
            <pubDate>Thu, 03 Apr 2025 14:27:54 GMT</pubDate>
            <atom:updated>2025-05-30T16:35:12.883Z</atom:updated>
            <content:encoded><![CDATA[<h3>Kubernetes Architecture — Part 1</h3><p>Kubernetes (often abbreviated as <strong>K8s</strong>) is an <strong>open-source container orchestration platform</strong> that automates the deployment, scaling, and management of containerized applications.</p><p>K8s is composed of <strong>Master Node</strong> and <strong>Worker Node .</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*RclIF_MJyz59hQud.gif" /></figure><p>Below listed are the its components .</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/245/1*skkF21iuZeAgh-CBo0Cl4Q.png" /></figure><p><strong>API Server</strong> : — The <strong>API Server</strong> is the <strong>central component</strong> of the Kubernetes control plane. It acts as the <strong>front-end</strong> for the entire Kubernetes cluster, handling all communication between internal and external components.</p><p>When we execute kubectl commands , it is picked up by API Server first.</p><p><strong>Scheduler</strong> :- When a pod is deployed , this decides to which Node it can be accommodated .</p><p><strong>etcd</strong> : — <strong>etcd</strong> is a <strong>highly available, distributed key-value store</strong> used by Kubernetes to store and manage all cluster state data .</p><p>eg : — Node and pod relation information , secrets , etc will be stored in etcd</p><p><strong>Controller Manager</strong> :- This is used to maintain desired state of cluster . Detects node or pod failures and takes corrective actions.</p><p>eg : — If a <strong>Deployment</strong> defines that 3 replicas of a pod should run, but only 2 exist, the controller will create another pod to match the desired state.</p><p><strong>Kubelet</strong> : — Kubelet is an <strong>agent</strong> that runs on every node in a Kubernetes cluster. It is responsible for managing the lifecycle of <strong>pods</strong> and <strong>containers</strong> on that node, ensuring they are running as expected.</p><p><strong>Kube-Proxy</strong> : — It is a network component in Kubernetes that runs on every node. It is responsible for <strong>routing traffic</strong> to the correct pods based on Kubernetes <strong>Services</strong>. It maintains network rules and ensures seamless communication between different pods and services.</p><p><strong>Container Runtime</strong> : — A <strong>container runtime</strong> is the software responsible for <strong>running</strong> containers. It manages <strong>container creation, execution, networking, and resource allocation</strong> on a node.</p><p><strong>Cluster</strong> : — It is a collection of Nodes ( or VMs) .</p><p><strong>Node</strong> : — A <strong>node</strong> in Kubernetes is a physical or virtual machine that runs <strong>pods</strong> and provides the computing resources necessary for containerized applications .</p><p><strong>Pod</strong> : — A <strong>Pod</strong> is the smallest deployable unit in Kubernetes. It is an <strong>abstraction over containers</strong>, meaning a pod typically runs one or more <strong>closely related containers</strong> together. Each pod gets a <strong>unique IP address. </strong>Containers inside the <strong>same pod</strong> can communicate over localhost .</p><p>#################### Happy Learning ####################</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9571c84a4924" width="1" height="1" alt=""><hr><p><a href="https://blog.devgenius.io/kubernetes-architecture-part-1-9571c84a4924">Kubernetes Architecture — Part 1</a> was originally published in <a href="https://blog.devgenius.io/">Dev Genius</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Kubectl useful commands — Part3]]></title>
            <link>https://blog.devgenius.io/kubectl-useful-commands-part3-ed6287ac6cea?source=rss-17c1716e15b------2</link>
            <guid isPermaLink="false">https://medium.com/p/ed6287ac6cea</guid>
            <category><![CDATA[azure-kubernetes-service]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[containers]]></category>
            <dc:creator><![CDATA[Sathya]]></dc:creator>
            <pubDate>Wed, 08 Jan 2025 16:26:41 GMT</pubDate>
            <atom:updated>2025-01-08T17:34:13.482Z</atom:updated>
            <content:encoded><![CDATA[<h3>Kubectl useful commands — Part3</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/868/1*n8Kowib47m1GdT4y4rwbaw.png" /></figure><p>This is in continuation of previous articles provided here .</p><p><a href="https://blog.devgenius.io/kubectl-useful-commands-part1-db1fe369d979">Article1</a></p><p><a href="https://blog.devgenius.io/kubectl-useful-commands-part2-fe1055701fe4">Article2</a></p><ol><li><strong>Command to delete all resources</strong></li></ol><p>kubectl delete all — all</p><p>This command deletes only from default namespace</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/371/1*jU9iiMrATO-HEpBEYujp7Q.png" /></figure><p>2. <strong>Create Pod</strong></p><p>kubectl run &lt;podname&gt; — image=&lt;imagename&gt;</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/498/1*lIaJ057YdCB3r-eNnrWLLQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/559/1*XFOc8cDCUoyXGzlwS_xQdA.png" /></figure><p>3. <strong>Access Nginx via browser</strong></p><p>After pod is created , we need to expose pod via specific port . It can be done using below command .</p><p>kubectl expose pod &lt;pod-name&gt; — type=NodePort — port=&lt;port number&gt; — target-port=&lt;port number&gt;</p><p>kubectl expose pod test-nginx — type=NodePort — port=80 — target-port=80</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/917/1*xLfCyAF0gj29WZLQOxRwLQ.png" /></figure><p>Now port forwarding needs to be done .</p><p>kubectl port-forward &lt;pod-name&gt; &lt;local port&gt;:&lt;port exposed&gt;</p><p>kubectl port-forward nginx-pod 8080:80</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/547/1*91VFzSBqAnQ1c841Y8t7Nw.png" /></figure><p>Now open any browser and access URL <a href="http://localhost:8080/">http://localhost:8080</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aaLqhj0rxRa_sgvVaUYfvA.png" /></figure><p>4. <strong>Obtain services</strong></p><p>kubectl get services <strong>OR </strong>kubectl get svc</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/825/1*pOqLAbTEo-P0s-8J11_qpw.png" /></figure><p>5. <strong>Obtain all k8s resources</strong></p><p>kubectl get all</p><p>Above command fetches all resources in default namespaces .</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/912/1*3Bto07GuMl9ZmdMTEBqBFw.png" /></figure><p>kubectl get all — all-namespaces</p><p>Above command fetches resources from all namespaces .</p><p>################# HAPPY LEARNING ########################</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ed6287ac6cea" width="1" height="1" alt=""><hr><p><a href="https://blog.devgenius.io/kubectl-useful-commands-part3-ed6287ac6cea">Kubectl useful commands — Part3</a> was originally published in <a href="https://blog.devgenius.io/">Dev Genius</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Kubectl Useful Commands — Part2]]></title>
            <link>https://blog.devgenius.io/kubectl-useful-commands-part2-fe1055701fe4?source=rss-17c1716e15b------2</link>
            <guid isPermaLink="false">https://medium.com/p/fe1055701fe4</guid>
            <category><![CDATA[k8s]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[azure-kubernetes-service]]></category>
            <dc:creator><![CDATA[Sathya]]></dc:creator>
            <pubDate>Fri, 03 Jan 2025 16:02:17 GMT</pubDate>
            <atom:updated>2025-01-03T18:10:42.715Z</atom:updated>
            <content:encoded><![CDATA[<h3>Kubectl Useful Commands — Part2</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/868/1*n8Kowib47m1GdT4y4rwbaw.png" /></figure><blockquote>This is the continuation of K8s commands we have seen in <a href="https://medium.com/@sathya2294/kubectl-useful-commands-part1-db1fe369d979">Part1 </a>.</blockquote><ol><li>Describe</li></ol><p>This command is used to describe a specific resource in k8s.</p><p>kubectl describe pod &lt;podname&gt;</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CCeubM4ulTaWUvRzZdWAqQ.png" /></figure><p>kubectl describe node → This provides detailed info about all nodes</p><p>2. Log into Pod</p><p>kubectl exec -it &lt;podname&gt; — /bin/bash</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/521/1*Nt1LgdMJjBln4t6o5bcWRQ.png" /></figure><p>3. Logs</p><p>kubectl logs &lt;podname&gt; → Default namespace</p><p>kubectl logs &lt;podname&gt; -n &lt;namespace&gt; → Specfic namespace</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*j8uhnhabCzTgC7Okigk45g.png" /></figure><p>4. Top</p><p>The top command in Kubernetes is used to display resource (<strong>CPU </strong>and <strong>memory</strong>) usage for nodes or pods in a cluster. It is part of the kubectl CLI and requires the Kubernetes Metrics Server to be installed and configured in the cluster.</p><p>kubectl top node</p><p>kubectl top pod &lt;podname&gt;</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/859/1*m1XrPwRNKYwJdCKixO1crA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/531/1*NmGYYVyrARI7EhbI_IMy6w.png" /></figure><p>5. Labels Addition</p><p><strong>Labels</strong> in Kubernetes are key-value pairs that are used to attach metadata to resources like Pods, Nodes, Services, or Deployments. Labels are useful for organizing, selecting, and managing resources in a Kubernetes cluster.</p><p>kubectl label &lt;RESOURCE_TYPE&gt; &lt;RESOURCE_NAME&gt; &lt;KEY&gt;=&lt;VALUE&gt;</p><p>kubectl label pod mysql-0 env=test</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/626/1*XKALm8KjwW7xRs3o56t8Aw.png" /></figure><p>6. Obtain Labels</p><p>To view added labels use below command</p><p>kubectl get pod &lt;pod-name&gt; — show-labels</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Xq5gFveS-QJmumDlVu2EmA.png" /></figure><p>7. Delete Label</p><p>kubectl label pod &lt;pod-name&gt; &lt;label-key&gt;-</p><p>kubectl label pod mysql-0 env-</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/588/1*V0P7R76W0ttgFL-Htvlo_Q.png" /></figure><p>************************* HAPPY LEARNING **********************</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fe1055701fe4" width="1" height="1" alt=""><hr><p><a href="https://blog.devgenius.io/kubectl-useful-commands-part2-fe1055701fe4">Kubectl Useful Commands — Part2</a> was originally published in <a href="https://blog.devgenius.io/">Dev Genius</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Kubectl Useful commands-Part1]]></title>
            <link>https://blog.devgenius.io/kubectl-useful-commands-part1-db1fe369d979?source=rss-17c1716e15b------2</link>
            <guid isPermaLink="false">https://medium.com/p/db1fe369d979</guid>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[azure-kubernetes-service]]></category>
            <category><![CDATA[k8s]]></category>
            <dc:creator><![CDATA[Sathya]]></dc:creator>
            <pubDate>Wed, 01 Jan 2025 11:24:00 GMT</pubDate>
            <atom:updated>2025-01-07T17:51:05.852Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/868/1*n8Kowib47m1GdT4y4rwbaw.png" /></figure><blockquote>In this article I am sharing basic kubectl commands which are useful in day to day K8s administration activities</blockquote><ol><li>Version of Kubectl</li></ol><p>kubectl version</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/832/1*pyGvCmL1Yq_rA_-b5AJvNw.png" /></figure><p>2. Cluster Info</p><p>kubectl cluster-info</p><p>This command provides information about Kubernetes cluster’s control plane components and their endpoints.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XT8xpH8nZSobIO8B_hs7Sg.png" /></figure><p>3. Current Cluster details</p><p>kubectl config current-context</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/557/1*z00SSiw_f4lWKF8wouLeCA.png" /></figure><p>This shows information of K8s cluster to which you are connected now .</p><p><strong>kubectl config get-contexts</strong> → This command displays all clusters added to your configuration file .</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/871/1*kjajW7bDIX1vVdVjKu5Uzw.png" /></figure><p>4. Pod Details</p><p>kubectl get pods or kubectl get pod</p><p>Both command will display the pod details .</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/646/1*oqN8II-Rn37T7U8Dr90o6w.png" /></figure><p><strong>Note : — Above command displays pod from default namespace</strong> .</p><p>To get details of pods in a specific namespace , use below command</p><p>kubectl get pods -n &lt;namespace&gt;</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eXsj9Rt9N5NANgwg9Yil5w.png" /></figure><p><strong>kubectl get pods -o wide</strong></p><p>This command provides additional information like IP Address and Node in which it is running .</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*R9sFzm4uUoq3yjCTgjjttw.png" /></figure><p>5. Namespace details</p><p>kubectl get namespace <strong>OR </strong>kubectl get ns</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/535/1*P4DhuyzdqIMs3e_vOD-kEQ.png" /></figure><p>6. Create namespace</p><p>kubectl create namespace &lt;namespace&gt; <strong>OR </strong>kubectl create ns &lt;namespace&gt;</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/450/1*RWM6CymAlqfFhSPpdrh30w.png" /></figure><p>I am trying to create namespace java and it got created .</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/517/1*WRXd5S-bM5UYbJT6E2Kl4A.png" /></figure><p>7. Namespace deletion</p><p>kubectl delete namespace &lt;name&gt; <strong>OR </strong>kubectl delete ns &lt;name&gt;</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/460/1*zA2Fsud4PnKDLPvhruZQ6w.png" /></figure><p>Now we can see it is deleted .</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/505/1*tv65P3a4WaP--CtEC4ek1w.png" /></figure><p>8. Node details</p><p>kubectl get nodes</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/818/1*OWnvrDbGOJf-xl5rKJUaNg.png" /></figure><p>To get additional details like IP Address , use below command</p><p>kubectl get nodes -o wide</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wFE1t0VIwcEBHj1FfMrO_g.png" /></figure><p>9. Delete pod</p><p>kubectl delete pod &lt;podname&gt;</p><p>Above command deletes pod from default namespace</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/504/1*EwisBBsGrpO6otEteuT-yw.png" /></figure><p>kubectl delete pod &lt;podname&gt; -n &lt;namespace&gt;</p><p>Above command is to delete pod from specific namespace</p><p>10. Obtain pod details in all namespaces</p><p>kubectl get pods — all-namespaces</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XvLO3pja_MFpcM58s-593w.png" /></figure><p>******************** HAPPY LEARNING ********************</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=db1fe369d979" width="1" height="1" alt=""><hr><p><a href="https://blog.devgenius.io/kubectl-useful-commands-part1-db1fe369d979">Kubectl Useful commands-Part1</a> was originally published in <a href="https://blog.devgenius.io/">Dev Genius</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Terraform Part 2 — State File]]></title>
            <link>https://blog.devgenius.io/terraform-part-2-state-file-6a21938ce7ca?source=rss-17c1716e15b------2</link>
            <guid isPermaLink="false">https://medium.com/p/6a21938ce7ca</guid>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[azure]]></category>
            <category><![CDATA[terraform-modules]]></category>
            <category><![CDATA[terraform]]></category>
            <dc:creator><![CDATA[Sathya]]></dc:creator>
            <pubDate>Tue, 23 Jul 2024 05:59:49 GMT</pubDate>
            <atom:updated>2025-01-07T17:56:21.481Z</atom:updated>
            <content:encoded><![CDATA[<h3>Terraform Part 2 — State File</h3><blockquote><strong>What is a state file in terraform ?</strong></blockquote><p>State File is a <strong>JSON </strong>file which contains information of all resources provisioned through terraform . It keeps track of the current state of your infrastructure and helps Terraform determine what changes need to be applied to reach the desired state defined in your configuration files.</p><p><strong>terraform.tfstate</strong> → Default state file name</p><p>By default , state file is stored <strong>locally </strong>. It means it will be saved from the system from where you install and execute terraform scripts .</p><p>There are some disadvantages in storing state file locally : -</p><ol><li>If file lost or corrupted , it will be a big problem</li><li>If someone got access to your system , then they can easily get information from state file</li><li>If multiple team members are working on Terraform configurations , sometimes there is a chance of overwriting one’s changes .</li><li>Passwords are stored in plain texts in state file . So it is poses a security threat .</li></ol><p>To mitigate this state file can be stored remotely .</p><p>Possible remote locations are : -</p><ol><li>Azure Blob Storage</li><li>AWS S3</li><li>Google Cloud Storage</li><li>Terraform Cloud</li><li>PostgreSQL</li></ol><p>As an example , I am only showing terraform backend configuration with Azure .</p><pre>terraform {<br> backend “azurerm” {</pre><pre>resource_group_name = “myResourceGroup”<br> storage_account_name = “terraformstorage”<br> container_name = “terraform-statefile”<br> key = “terraform.tfstate”<br> }<br>}</pre><p>Advantages of remote backed : -</p><ol><li>If it is stored in Cloud , only those who have access to cloud can view state file . Additional layer of authentication</li><li>Automatic backup can be configured</li><li>Versioning can be enabled . Whenever a change occurred , new state file will be created and we can easily restore old if it got corrupted .</li><li>State locking can be achieved , which helps multiple team members working together and results in avoiding making changes simultaneously .</li></ol><p><strong>Terraform Commands</strong></p><p><strong>terraform state list</strong> → This lists all resources created so far via terraform</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/349/1*f_BA09Dovbswxw-aJSzDxg.png" /></figure><p>terraform state show → This shows configuration of a particular resource</p><p>terraform state show azurerm_resource_group.example</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/697/1*-jooekV9a8Scr5wXXd5d2A.png" /></figure><p>######### HAPPY LEARNING ##########</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6a21938ce7ca" width="1" height="1" alt=""><hr><p><a href="https://blog.devgenius.io/terraform-part-2-state-file-6a21938ce7ca">Terraform Part 2 — State File</a> was originally published in <a href="https://blog.devgenius.io/">Dev Genius</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Availability Set and Availability Zones in Azure]]></title>
            <link>https://blog.devgenius.io/availability-set-and-availability-zones-in-azure-b5a401a194c3?source=rss-17c1716e15b------2</link>
            <guid isPermaLink="false">https://medium.com/p/b5a401a194c3</guid>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[cloud]]></category>
            <category><![CDATA[azure]]></category>
            <dc:creator><![CDATA[Sathya]]></dc:creator>
            <pubDate>Fri, 28 Jun 2024 13:13:30 GMT</pubDate>
            <atom:updated>2025-01-07T17:54:58.708Z</atom:updated>
            <content:encoded><![CDATA[<p>AV Set and AV Zone are two high availability options offered by Azure .</p><h4>AV Set → Mainly used when rack failure happens</h4><h4>AV Zone → Mainly used when a datacenter failure occurs</h4><h4><strong>Availability Set</strong></h4><p>Consider you have 10 Azure VMs and these VMs are connected to a single rack with same power supply . If there is any issue in rack or if the power supply is unavailable , all VMs will be unavailable and users will be affected . Same applies when all VMs are rebooted as part of maintenance / patching at the same time . To avoid this scenario , AV set is introduced .</p><p>AV Set comprises of <strong>fault domain</strong> and <strong>update domain</strong> .</p><p><strong>Fault domain</strong> : — Physical group of VMs with same power supply and network switch</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/990/1*I3lnh1zRCakn3SVDMGNQmw.png" /><figcaption>fault domain</figcaption></figure><p>In fault domain , VMs are spread across different racks .Even if one rack fails , your application will be available from VMs hosted in other racks .</p><p><strong>Update Domain</strong> : — Logical group of VMs</p><p>Update domain ensures that no two VMs will be rebooted simultaneously .</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/306/1*7WSwJwISnLvWHZrydXNrTA.png" /><figcaption>update domain</figcaption></figure><p>Minimum FD and UD are 2 and 5 respectively . Maximum are 3 and 20 .</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/583/1*Lop8fAtuMCnWj3jboC7Hug.png" /></figure><blockquote><strong>Note : -</strong></blockquote><blockquote>a) No cost involved in creating AV Set</blockquote><blockquote>b) VMs can be added to AV Set only at the time of VM creation . If it needs to be added later then VM should be deleted and re-created into AV Set</blockquote><p><strong>Availability Zone</strong></p><p>Azure Availability Zones are a high-availability offering that protects applications and data from datacenter failures. Each Availability Zone is a physically separate location within an Azure region. These zones provide independent power, cooling, and networking to ensure resiliency.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/404/1*9YGjGBfYi87ZDmgmvLcKCQ.png" /></figure><p>AV Zone can be chosen for a VM while creating .</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/561/1*zZCaKzqBSNy9EaTCEcXkRA.png" /></figure><p>Azure services that supports AV Zone are VM , AKS and Managed disks .</p><p><strong>SLA :</strong></p><p>AV Set — 99.95%</p><p>AV Zone — 99.99%</p><p>****************** Happy Learning **********************</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b5a401a194c3" width="1" height="1" alt=""><hr><p><a href="https://blog.devgenius.io/availability-set-and-availability-zones-in-azure-b5a401a194c3">Availability Set and Availability Zones in Azure</a> was originally published in <a href="https://blog.devgenius.io/">Dev Genius</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>