Cloud Malaya Lab
  • Home Cloud Lab
    • Architecture
    • DNS Server
  • DevOps & DevSecOps
    • Kubernetes
      • Fundamental
        • Taints in Kubernetes
        • Kubernetes Observability (Monitoring) Guide
        • DNS in Kubernetes (CoreDNS)
        • Storage in Kubernetes
          • Container Storage Interface - CSI
          • Ephemeral Storage Explain
        • Cluster CPU & Memory Inspections
        • Open Source and Free Storage Solution Kubernetes
      • PoC Lab
        • Configure Access to Multiple Cluster using KUBE_CONFIG
        • High Availability Portable Mini Kubernetes Data Center with K3s
          • Lab 1: Build the K3s Infrastructure
          • Lab 2: Automate the K3s clusters deployment with Ansible
          • Lab 3: Multi Master K3s kubeconfig files for smooth accessibility
          • Lab 4: Network Configurations & Tools
        • AWX/Ansible Tower Deployment on Kubernetes
          • Lab 1 - Understanding Requirements
          • Lab 2 - AWX,AWX Operator Configurations & Deployments
          • Lab 3 - Ingress Networking & Connectivity via Nginx
          • Lab 4: AWX Web Console & accessibility on LAN
        • Troubleshooting: Ansible Tower - Reset admin password
    • Monitoring & Observability
      • Splunk
        • Splunk Deployment for SME (Malay Version)
    • System Administration - Linux
      • RedHat Derivatives
        • Add User to Sudoers
        • Yum Update vs Yum Upgrade
        • DNF update vs upgrade
        • SMP PREEMPT_DYNAMIC Definitions
      • Virtualization
        • KVM
      • Storage
  • Digital Infrastructure & Cloud Solutions
    • Solution & System Design
      • Public Cloud
        • Fundamental
          • AWS
          • Azure
          • GCP
        • Lab
          • Simple CD menggunakan Github Action
      • Private Cloud & On-Premise
      • On-Premise to Cloud Design
        • AWS Direct Connect
      • High Availability & Fault Tolerance Design
      • Disaster Recovery
Powered by GitBook
On this page
  1. DevOps & DevSecOps
  2. Kubernetes
  3. Fundamental

Storage in Kubernetes

PreviousDNS in Kubernetes (CoreDNS)NextContainer Storage Interface - CSI

Last updated 1 year ago

In Kubernetes, storage is a crucial aspect of managing and persisting data for containerized applications. Kubernetes provides a framework for abstracting and managing storage resources, allowing containers to interact with storage volumes in a consistent and scalable manner. Here's an overview of storage in Kubernetes:

  1. Storage Resources:

    • Volume: A Kubernetes Volume is an abstraction of a storage backend, such as a physical disk, network-attached storage (NAS), or cloud-based storage. Volumes are used to persist data beyond the lifecycle of a container.

    • Persistent Volume (PV): A Persistent Volume is a cluster-level resource that represents a physical storage volume in the cluster. It abstracts the underlying storage details and allows administrators to manage and allocate storage resources.

    • Persistent Volume Claim (PVC): A Persistent Volume Claim is a request made by a user or application for a specific amount and access mode of storage. PVCs are bound to PVs, allowing users to consume storage resources without needing to know the underlying details.

  2. Storage Classes:

    • A Storage Class is a Kubernetes resource that defines the properties and provisioning mechanisms of PVs. It abstracts storage backend-specific details, making it easier to manage storage in a cluster.

    • Storage Classes allow administrators to set storage policies, such as replication, performance characteristics, and access modes, to match the requirements of different applications.

  3. Dynamic Provisioning:

    • Kubernetes supports dynamic provisioning, which means that when a PVC is created, it can automatically trigger the creation of a PV with the requested storage class.

    • Dynamic provisioning enables on-demand allocation of storage resources, making it more efficient and scalable.

  4. Access Modes:

    • PVs and PVCs can have different access modes:

      • ReadWriteOnce (RWO): Allows read-write access to a single node (e.g., for a single-node database).

      • ReadOnlyMany (ROX): Allows read-only access from multiple nodes (e.g., for shared configuration data).

      • ReadWriteMany (RWX): Allows read-write access from multiple nodes (e.g., for shared file storage).

  5. Volume Types:

    • Kubernetes supports various types of volumes, including:

      • EmptyDir: A volume with a lifetime tied to a pod, suitable for ephemeral data.

      • HostPath: A volume that mounts a file or directory from the host node into the pod.

      • NFS, iSCSI, AWS EBS, Azure Disk: Support for cloud-specific or network-attached storage backends.

  6. Stateful Applications:

    • Kubernetes allows you to run stateful applications, such as databases, by providing mechanisms like StatefulSets and persistent storage. StatefulSets ensure that each pod has a unique network identity and stable storage.

  7. Snapshot and Clone:

    • Kubernetes introduced features like Volume Snapshots and Volume Cloning to enable data management tasks, such as creating backups and cloning volumes.

  8. CSI (Container Storage Interface):

    • Kubernetes uses the CSI standard to enable third-party storage providers to integrate with the Kubernetes ecosystem. CSI allows for the development of custom storage plugins.