Understand volume mode, access modes and reclaim policies for volumes

Context: CKA Certification

Understand volume mode, access modes and reclaim policies for volumes

In the context of the Certified Kubernetes Administrator (CKA) certification, understanding volume mode, access modes, and reclaim policies for volumes is essential. Let's explore each of these concepts:

  1. Volume Mode:

    • Volume mode refers to how a volume is mounted and accessed within a Kubernetes Pod.
    • There are two volume modes:
      • Filesystem mode: In this mode, the volume is mounted as a directory on the filesystem of the Pod. It allows the Pod to read and write files to the volume.
      • Block mode: In this mode, the volume is exposed as a block device to the Pod. It allows the Pod to perform low-level I/O operations directly on the volume.
  2. Access Modes:

    • Access modes define how a volume can be accessed by multiple Pods within a Kubernetes cluster.
    • There are three access modes:
      • ReadWriteOnce (RWO): Allows the volume to be mounted as read-write by a single Pod.
      • ReadOnlyMany (ROX): Allows the volume to be mounted as read-only by multiple Pods simultaneously.
      • ReadWriteMany (RWX): Allows the volume to be mounted as read-write by multiple Pods simultaneously.
  3. Reclaim Policies:

    • Reclaim policies define what happens to the underlying storage resource when a Persistent Volume (PV) is released or deleted.
    • There are three reclaim policies:
      • Retain: When a PV is released or deleted, the associated storage resource is not automatically deleted. The administrator must manually handle the storage resource.
      • Delete: When a PV is released or deleted, the associated storage resource is automatically deleted.
      • Recycle (deprecated): This reclaim policy is being phased out and may not be available in newer Kubernetes versions. It involves performing basic cleanup of the PV, such as removing data, before making it available for reuse.

Understanding these concepts allows you to effectively configure and manage volumes within Kubernetes. When working with the CKA certification, you may encounter scenarios where you need to define volume modes, access modes, and reclaim policies for volumes based on specific requirements and use cases.

You should also read: