<?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 Srushti Kshirsagar on Medium]]></title>
        <description><![CDATA[Stories by Srushti Kshirsagar on Medium]]></description>
        <link>https://medium.com/@srushtik3296?source=rss-84b78c5074ff------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*XfUSqv_vwT72r8yE</url>
            <title>Stories by Srushti Kshirsagar on Medium</title>
            <link>https://medium.com/@srushtik3296?source=rss-84b78c5074ff------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 04:32:33 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@srushtik3296/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[Storage Class]]></title>
            <link>https://medium.com/@srushtik3296/storage-class-819e494406bc?source=rss-84b78c5074ff------2</link>
            <guid isPermaLink="false">https://medium.com/p/819e494406bc</guid>
            <category><![CDATA[storageclass]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[cka]]></category>
            <dc:creator><![CDATA[Srushti Kshirsagar]]></dc:creator>
            <pubDate>Tue, 24 Feb 2026 07:26:09 GMT</pubDate>
            <atom:updated>2026-02-24T07:26:09.921Z</atom:updated>
            <content:encoded><![CDATA[<p>This command displays the <strong>detailed configuration of the StorageClass named standard</strong>.</p><p>A <strong>StorageClass</strong> enables <strong>dynamic provisioning</strong> of PersistentVolumes (PV).</p><p>When a <strong>PersistentVolumeClaim (PVC)</strong> is created, Kubernetes automatically provisions a <strong>PersistentVolume (PV)</strong> based on the defined StorageClass and then binds that PV to the PVC — eliminating the need to manually create the PV.</p><p>kubectl get storageclass or kubectl get sc</p><p>this command is used to get the stoareg class list</p><p>*Go to your file , inside the document which we have created</p><p>notepad sc_pvc.yml</p><p>`apiVersion: v1 kind: PersistentVolumeClaim metadata: name: mypvc spec: accessModes:</p><ul><li>ReadWriteOnce resources: requests: storage: 1Gi`</li></ul><p>kubectl create -f sc_pvc.yml</p><p>so now , when you create the Stoareg Class yml file , the PV automatically gets created , you can check by using kubectl get pv , kubectl get pvc , so everythign is created automatically this is called dynamic approach</p><p>To see where the 1G of storage is created , we use the command kubectl get sc</p><p>the path shown in PROVISIONER ,is the space where the storage is created , it is created in local cluster</p><p>kubectl describe sc standard</p><p>This command displays the <strong>detailed configuration of the StorageClass named standard</strong>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=819e494406bc" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Storage in Kubernetes]]></title>
            <link>https://medium.com/@srushtik3296/storage-in-kubernetes-ff4affa03508?source=rss-84b78c5074ff------2</link>
            <guid isPermaLink="false">https://medium.com/p/ff4affa03508</guid>
            <dc:creator><![CDATA[Srushti Kshirsagar]]></dc:creator>
            <pubDate>Mon, 23 Feb 2026 10:11:39 GMT</pubDate>
            <atom:updated>2026-02-23T10:11:39.451Z</atom:updated>
            <content:encoded><![CDATA[<p>This concept explains how <strong>storage works in Kubernetes</strong> using roles and volume binding.</p><p>In Kubernetes, there are mainly two roles involved in storage management: the <strong>Admin</strong> and the <strong>User (Developer)</strong>.</p><p>The <strong>Admin</strong> creates and manages the actual storage resource called a <strong>Persistent Volume (PV)</strong>. This is the real storage in the cluster, like a disk. It can have defined capacity (for example, 2GB) and access mode (ReadWrite, etc.). The admin ensures that storage is available inside the cluster.</p><p>The <strong>User or Developer</strong> does not directly create storage. Instead, they create a <strong>Persistent Volume Claim (PVC)</strong>. A PVC is simply a request for storage. In the PVC, the user specifies how much storage is needed and the access mode.</p><p>When the PVC request matches an available PV, Kubernetes automatically <strong>binds</strong> them together. This process is called <strong>binding</strong>. After binding, the Pod can use that storage through the PVC.</p><p><strong>So the flow is simple:</strong></p><p>Admin provides storage (PV) →</p><p>User requests storage (PVC) →</p><p>Kubernetes binds PVC to PV →</p><p>Pod uses the storage.</p><p>This separation makes Kubernetes powerful because developers only request storage, while admins control and manage the actual storage resources.</p><p>kubectl get sc This command shows all <strong>StorageClasses</strong> in your Kubernetes cluster.</p><p>kubectl get sc -o yaml</p><p><strong>Meaning:</strong></p><ul><li>kubectl → Kubernetes command tool</li><li>get → Fetch resource</li><li>sc → StorageClass</li><li>o yaml → Show output in YAML format</li></ul><p>This command displays all <strong>StorageClasses in detailed YAML format</strong>, including full configuration like provisioner, reclaim policy, parameters, etc.</p><p>kubectl get sc -o yaml &gt;mysc.yml</p><p>This command stores the yml code in the file named “mysc.yml”</p><h3>CREATE PVC- persistent volume claim YML FILE</h3><pre>apiVersion:v1<br>kind:PersistentVolumeClaim<br>metadata:<br>	name:srushtipvc<br>	spec:<br>	 accessModes: <br>	 - ReadWriteOnce<br>	 resources:<br>		 requests:<br>			 storage: 1G</pre><p>notepad mypvc.yml</p><p>This YAML file creates a <strong>PersistentVolumeClaim</strong> in Kubernetes requesting <strong>1GB storage</strong> with <strong>ReadWriteOnce</strong> access mode. It allows a pod to use persistent storage that survives container restarts. In AWS EKS, this usually results in dynamic provisioning of an Amazon EBS volume attached to the worker node.</p><p>kubectl create -f mypvc.yml</p><p>this creates and run the yml file</p><h3>To create a PV</h3><p>notepad mypv.yml</p><pre>apiVersion:v1<br>kind:PersistentVolume<br>metadata:<br>	name:mypvsrushti<br>spec:<br>	accessModes: <br>	- ReadWriteOnce<br>	capacity:<br>		storage: 1G<br>	hostPath: <br>		path: /mnt/srushtidirectory</pre><p>kubectl create -f mypv.yml</p><p>now , the PV has been created , the storage is been created at location mnt in folder serushti directory , we create this directory in root user</p><p>/mnt/srushtidirectory</p><ul><li>/ → Root of the Linux system</li><li>/mnt → Folder inside root</li><li>/mnt/srushtidirectory → Your storage directory</li></ul><p>kubectl get pvc</p><p>kubectl get pv</p><p>this command is used to see the status of PVC and PV</p><h3>Pod with PVC</h3><p>notepad pvc_pod.yml</p><p>remain the earlier pod to this pod</p><p>kind: Pod metadata: name: mypod3 labels: region: IN spec: volumes:</p><pre>`-name: s1<br>      persistentVolumeClaim:<br>           claimName: srushtipvc</pre><p>containers:`</p><pre>`-name: myc2<br> image: vimal13/apache-webserver-php<br> volumeMounts:`</pre><pre>`-mountPath: /var/www/data<br>name: s1`</pre><p><strong>kind: Pod</strong></p><p>→ Creating a Pod.</p><p><strong>metadata → name: mypod3</strong></p><p>→ Pod name is <em>mypod3</em>.</p><p><strong>labels → region: IN</strong></p><p>→ Label added for identification/filtering.</p><p><strong>volumes → name: s1</strong></p><p>→ Creating a volume inside Pod called <em>s1</em>.</p><p><strong>persistentVolumeClaim → claimName: srushtipvc</strong></p><p>→ Pod is attaching existing PVC named <em>srushtipvc</em>.</p><p><strong>containers → name: myc2</strong></p><p>→ Container name is <em>myc2</em>.</p><p><strong>image: vimal13/apache-webserver-php</strong></p><p>→ Apache + PHP web server image.</p><p><strong>volumeMounts → mountPath: /var/www/data</strong></p><p>→ PVC storage will appear inside container at this path.</p><p><strong>name: s1</strong></p><p>→ Connecting this mount to volume <em>s1</em>.</p><p>PVC → Connected to Pod → Mounted at /var/www/data → Data persists even if pod restarts.</p><p>kubectl create -f pvc_pod.yml</p><p>kubectl exec -it mypod3 -- sh</p><p>You are going inside the container shell</p><p>add some files in it</p><p>cd /var/www/data ls</p><p>to see the added files</p><p>delete pod -all</p><p>now delete the pods</p><p>kubectl create -f pvc_pod.yml</p><p>Again create the pod</p><p>kubectl exec -it mypod3 -- sh</p><p>again go inside the pod , and do ls , check the files , you will find the files that you added earlier</p><h3>Conclusion :</h3><p>In this setup, I successfully configured <strong>Persistent Storage in Kubernetes</strong> by creating a <strong>PersistentVolume (PV)</strong>, a <strong>PersistentVolumeClaim (PVC)</strong>, and attaching the PVC to a Pod.</p><p>The Pod mypod3 was deployed using the Apache-PHP image, and the PVC srushtipvc was mounted inside the container at /var/www/data. After deployment, I verified the storage by entering the Pod using kubectl exec and confirmed that the files were accessible at the mounted path.</p><p>This demonstrates the complete flow:</p><p><strong>PV → PVC → Pod → Volume Mount → Data Persistence</strong></p><p>Through this process, I ensured that the application storage is persistent and not lost even if the Pod restarts.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ff4affa03508" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Storage in Container-EKS-CKA]]></title>
            <link>https://medium.com/@srushtik3296/storage-in-container-eks-cka-86fd6599b080?source=rss-84b78c5074ff------2</link>
            <guid isPermaLink="false">https://medium.com/p/86fd6599b080</guid>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[storage-containers]]></category>
            <category><![CDATA[persistent-volume]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[amazon-eks]]></category>
            <dc:creator><![CDATA[Srushti Kshirsagar]]></dc:creator>
            <pubDate>Wed, 18 Feb 2026 12:15:15 GMT</pubDate>
            <atom:updated>2026-02-18T12:15:15.402Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/918/1*knueqc5JrQdhM767EcQRHQ.png" /></figure><p>In Amazon EKS, containers are temporary by nature. If a Pod restarts, crashes, or gets deleted, any data stored inside the container’s filesystem is also deleted. This is called <strong>ephemeral storage</strong>. It is suitable for temporary data like cache or logs, but not for important application data.</p><p>To store data permanently, Kubernetes uses <strong>Persistent Volumes (PV)</strong> and <strong>Persistent Volume Claims (PVC)</strong>, which in AWS are typically backed by <strong>Amazon EBS</strong>. When a Pod uses a PVC, the data is stored outside the container, so even if the Pod restarts or moves to another node, the data remains safe.</p><p>In interviews, if a database loses data after a restart, the reason is usually that it was using ephemeral storage instead of a PVC backed by EBS. Persistent storage ensures the application is reliable and production-ready.</p><blockquote><strong>podman run -dit — name mycontainer nginx</strong></blockquote><p>podman is the tool used to manage containers.<br> run tells Podman to create and start a container.<br> -d runs the container in the background.<br> -i keeps it interactive.<br> -t gives it a terminal interface.<br> --name mycontainer assigns a custom name to the container.<br> nginx is the image name that Podman downloads (if not already present) and uses to create the container.</p><p>After this command , the container is launched after downloading the image</p><blockquote><strong>podman ps -a</strong></blockquote><p>Shows <strong>all containers</strong> (running + stopped).</p><blockquote>podman images</blockquote><p>Shows <strong>all downloaded images</strong> (container templates).</p><blockquote><strong>podman attach nginx</strong></blockquote><p>used to go inside the container , but it fails for nginx image .</p><blockquote><strong>podman exec -it w2 bash</strong></blockquote><p>exec → Run a command inside container<br>-i → Interactive mode<br>-t → Terminal access<br>w2 → Container name<br>bash → Opens bash shell</p><p>It creates a <strong>new shell inside the container</strong>, allowing you to check files, debug, or run commands.NOTE</p><pre><strong>Short Note: Why attach Fails</strong><br><br>attach connects to the container’s main process.<br><br>If the main process is a background service (like nginx or apache), it does not provide a shell.<br>So you don’t get interactive access, and it may look stuck or fail.</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5Nm267QFtKT8fRP5WJhPZw.png" /></figure><blockquote><strong>rm anaconda-post.log</strong></blockquote><p>Here if I delete this file named anaconda-post.log , so even if I delete it by using rm anaconda-post.log , anf gain i launch the container using the same image , I can easily retrieve it .because that <strong>data is stored in PVC</strong> .</p><blockquote><strong>cat &gt; db.txt <br>podman rm -f w3</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rKIutV8P6wvj39To5fhAMg.png" /></figure><p>So here , if I create my own file here named db.txt , and I forcefully delete the container ,and again launch a new container with same image , i wont be able to see it ,because that file was stored in <strong>ephemeral storage</strong></p><h3><strong>Adding Persistent Storage</strong></h3><blockquote><strong>mkdir /mydata1</strong></blockquote><p>Here I’m creating a directory on my base OS- root@localhost</p><blockquote><strong>podman run -dit — name w3 -v /mydata1: /var/www/images nginx</strong></blockquote><p>So , this command is basically used to create and run the container named w3 ,and attach the file which we created on local OS -<strong>mydata1</strong> ( in which we would store our data ) ,Mounts host directory <strong>/mydata1</strong> into container path <strong>/var/www/images</strong> for persistent data .<strong>nginx</strong> → Specifies the Nginx image to run the web server.</p><p><strong>-v </strong>: it is used to mount a host directory into a container to provide persistent storage</p><p>If /var/www/images exists inside container → it mounts the mydata1 over it.<br>If it does NOT exist → Podman <strong>automatically creates that directory named images ,inside the container</strong> before mounting.</p><blockquote><strong>podman exec-it w3 bash</strong></blockquote><p><strong>podman</strong> → Container engine used to manage containers.<br><strong>exec</strong> → Runs a command inside an already running container.<br><strong>-i</strong> → Keeps input open for interactive session.<br><strong>-t</strong> → Allocates a terminal for command-line access.<br><strong>w5</strong> → Name of the running container you want to access.<br><strong>bash</strong> → Opens a Bash shell inside the container.</p><p>So , Now even if I terminated my container , still I can see my data secured inside my OS</p><h4>Consclusion : “Even after terminating the container, the data remains securely stored on the host operating system, confirming that the mounted volume ensures persistent storage independent of the container lifecycle”</h4><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=86fd6599b080" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>