Storage in K8s
-
Topics to understand in K8s Storage
- Volume
- Persistent Volumes
- Storage Class
- Persistent Volume Claims
-
Areas of Concern
- Docker Containers are ephemeral, to overcome we have Docker Volumes
- Pods are ephemeral, As long as Pod is alive we have data, but once pod is deleted, data is also lost
- K8s Works almost in many different platforms
Kubernetes Storage
- Volumes lifetime is equal to lifetime of Pod
- Persistent Volumes lifetime is equal to lifetime of cluster
Persistent Volumes Workflow
- Create a Persistent Volume (PV) with requestable attributes
- While Creating a Pod which needs PV, a claim/request called as PersitentVolumeClaim(PVC) is sent out to k8s
- K8s searches for all the available PVs with the requested attributes in PVC.
- If it finds the PV, then pod is created with attached PV which has to be mounted to docker container
Persistent Volumes & Storage Classes
- PVs Can be created statically and also dynamically
- To get this dynamic provisioning storage classes help out.
Networking in K8s
-
Container Networking
-
Pod to Pod Networking
-
Pod to Service Networking
-
Ingress
-
Service Discovery
-
Refer Here for deeper understanding of k8s networking