Podcast
Questions and Answers
What aspect of StorageClasses automates the volume creation process?
What aspect of StorageClasses automates the volume creation process?
- Persistent Volumes (PV)
- Dynamic provisioning
- StorageClasses (SC) (correct)
- Persistent Volume Claims (PVC)
Which statement about mapping external storage volumes in Kubernetes is true?
Which statement about mapping external storage volumes in Kubernetes is true?
- You can map an external storage volume to multiple Persistent Volumes (PVs).
- Mapping is done automatically by StorageClasses.
- You cannot map an external storage volume to multiple PVs. (correct)
- External storage mapping is not supported in Kubernetes.
What does the allowedTopologies field in a StorageClass define?
What does the allowedTopologies field in a StorageClass define?
- Where replicas of storage should be located. (correct)
- The geographic region for resource deployment.
- The performance level of the storage.
- The plugins used for provisioning storage.
What is true about StorageClass objects once they are deployed?
What is true about StorageClass objects once they are deployed?
Which type of storage could be associated with a StorageClass for applications that need faster data access?
Which type of storage could be associated with a StorageClass for applications that need faster data access?
What is the primary role of Persistent Volume Claims (PVC) in relation to StorageClasses?
What is the primary role of Persistent Volume Claims (PVC) in relation to StorageClasses?
In the context of StorageClasses, what does the term 'provisioner' refer to?
In the context of StorageClasses, what does the term 'provisioner' refer to?
How is performance for an SSD solid-state drive defined in a StorageClass configuration?
How is performance for an SSD solid-state drive defined in a StorageClass configuration?
What is the purpose of a StorageClass in Kubernetes?
What is the purpose of a StorageClass in Kubernetes?
Which access mode allows a persistent volume to be written to by a single persistent volume claim?
Which access mode allows a persistent volume to be written to by a single persistent volume claim?
What happens to a persistent volume when the Delete reclaim policy is applied?
What happens to a persistent volume when the Delete reclaim policy is applied?
Which of the following statements regarding ReplicaSets is true?
Which of the following statements regarding ReplicaSets is true?
What is the primary function of the CSI storage plugin in Kubernetes?
What is the primary function of the CSI storage plugin in Kubernetes?
What limitation exists when using ReadOnlyMany access mode?
What limitation exists when using ReadOnlyMany access mode?
In a Kubernetes context, which statement about Deployment is correct?
In a Kubernetes context, which statement about Deployment is correct?
Which of the following best describes a persistent volume in Kubernetes?
Which of the following best describes a persistent volume in Kubernetes?
Flashcards
Volume
Volume
A persistent data source that can be attached to a pod to store data. It can be a local file system, a cloud storage service, or a network-attached storage device.
PersistentVolumeClaim (PVC)
PersistentVolumeClaim (PVC)
A Kubernetes resource that represents a request for a specific storage class. When a pod needs storage, it requests a PersistentVolumeClaim.
PersistentVolume (PV)
PersistentVolume (PV)
A Kubernetes resource that represents a persistent storage unit that can be used by pods. It describes the storage type, size, and access modes.
StorageClass (SC)
StorageClass (SC)
Signup and view all the flashcards
Volume provisioning
Volume provisioning
Signup and view all the flashcards
allowedTopologies
allowedTopologies
Signup and view all the flashcards
StorageClass parameters
StorageClass parameters
Signup and view all the flashcards
On-the-fly volume creation
On-the-fly volume creation
Signup and view all the flashcards
ReplicaSet
ReplicaSet
Signup and view all the flashcards
PV Access Modes
PV Access Modes
Signup and view all the flashcards
Kubernetes Service
Kubernetes Service
Signup and view all the flashcards
Reclaim Policy
Reclaim Policy
Signup and view all the flashcards
Container Storage Interface (CSI)
Container Storage Interface (CSI)
Signup and view all the flashcards
Storage Class
Storage Class
Signup and view all the flashcards
Study Notes
Kubernetes - Volume Concepts
- Volumes allow pods to persist data even when the pods are restarted or deleted.
- Volumes can reside on local or remote machines, either inside or outside a Kubernetes cluster.
- A Persistent Volume (PV) is a piece of storage that can be used in a Kubernetes cluster.
- A Persistent Volume Claim (PVC) is a request for a Persistent Volume by a pod.
- Storage plugins (using CSI) connect storage providers to Kubernetes.
- StorageClasses (SC) organize different storage tiers by type and parameters.
Persistent Volume and Persistent Volume Claim (PV & PVC) Example
- StorageClasses (SC) automate the process of provisioning PVs.
- A single external storage volume cannot be mapped to multiple PVs.
- To use two storage tiers, like SSD and mechanical storage, you can create two StorageClasses (one for each tier) and map them to application requirements.
Understanding How Volumes Work
- Volumes connect to storage providers (like local hard drives or cloud storage) through a plugin layer (CSI).
- Kubernetes has a volume subsystem to manage external and internal storage.
StorageClass YAML Example
- YAML is used for configuring the Kubernetes StorageClass.
- Parameters in the YAML define storage attributes (types like IOPs per GB, locations like Ireland region, encrypted status).
- StorageClass objects are unchangeable once deployed.
- The metadata.name should be meaningful.
Working with StorageClasses
- Steps for using a StorageClass include:
- Having a storage back end (on-premise or cloud)
- Creating your Kubernetes cluster
- Installing and configuring the Container Storage Interface (CSI) plugin
- Creating StorageClasses in your Kubernetes cluster
- Deploy Pods and PVCs that reference those StorageClasses.
Access Modes
- Kubernetes supports three volume access modes:
- ReadWriteOnce (RWO): A Persistent Volume (PV) can only be bound to a single Persistent Volume Claim (PVC) for read/write access.
- ReadWriteMany (RWM): A PV can be bound to multiple PVCs for concurrent read/write access. This is mostly used with file or object storage.
- ReadOnlyMany (ROM): A PV can be bound to multiple PVCs for read-only access.
Reclaim Policy
- Reclaim policies define what happens to a Persistent Volume (PV) when its corresponding Persistent Volume Claim (PVC) is deleted.
- Delete: Deletes the PV and its associated storage resource which is the most risky option.
- Retain: Keeps the PV and associated data on the cluster, preventing other PVCs from using it and requiring manual steps to clean-up.
Deployments
- Deployments abstract pods, enabling self-healing, scaling, and easy updates/rollbacks. They define how your application should run in the cluster.
- Deployments cannot be used to replicate/manage stateful data (like databases). They are mostly for stateless applications.
Fundamental Concepts
- Desired state: the desired configuration of your application in the cluster.
- Observed state: the actual state of your application in the cluster.
- Reconciliation: the process of matching the observed state with the desired state.
- Declarative model: Describe the desired state of your system and let Kubernetes figure out how to get there.
- Imperative model: Tell Kubernetes exactly how to achieve a desired state.
Rolling Updates with Deployments
- Rolling updates allow for zero downtime deployment updates. New pods are incrementally rolled in while old pods are taken out of service.
Kubernetes Component Summary
- PV, PVC, and SC define how data is persistently stored in the cluster.
- Deployments are used for self-healing, scaling, updates, and replicaSet management.
Studying That Suits You
Use AI to generate personalized quizzes and flashcards to suit your learning preferences.