Spotlight on Tech

Understanding Kubernetes CSI: revolutionizing enterprise storage solutions at the edge

by
Brooke Frischemeier
Head of Product Management, Unified Cloud
Rakuten Symphony
September 5, 2024
4
minute read

Welcome to a three-part blog series discussing how organizations can improve their Kubernetes storage user experience, security, business continuity and much more.  

In the rapidly evolving landscape of enterprise IT, the need for efficient, secure, and flexible storage solutions has never been more critical. As organizations increasingly adopt containerized environments, managing storage becomes a complex challenge, especially for migrating stateful workloads. With stateless workloads, data is ephemeral and has no real historical value.  For example, when a user uploads an image, the service stores that image and provides a URL for accessing it. When another user requests to view the image via the URL, the service retrieves and serves the image without needing to remember any previous interactions with either user. With stateful applications, data computations often require persistent historical data. A classic example of a stateful application is a shopping cart in an e-commerce website. When a user adds items to their cart, the application must remember the state of the cart across multiple interactions and sessions.  To add another significant wrinkle, migrating stateful applications is much more difficult to ensure data consistency and integrity. Thus, data and its state matter significantly, especially when one tries to migrate applications.

Enter the Kubernetes Container Storage Interface (CSI), a game changer that has transformed storage management in Kubernetes. This blog series will delve into how CSI can revolutionize enterprise storage solutions, particularly for those operating at the edge. In this first installment, I will explore what CSI is, how it works, and the fundamental benefits it offers.

What is Kubernetes CSI?

Kubernetes CSI is a specification that defines a standard interface for Kubernetes container orchestration systems to interact with storage systems. Before the advent of CSI, Kubernetes relied on in-tree storage plugins that were built directly into the Kubernetes codebase. This approach had several limitations, including the need to update Kubernetes to add new storage plugins and the difficulty of maintaining and testing these plugins.

CSI addresses these limitations by providing a standardized interface that allows storage providers to develop out-of-tree plugins. These plugins can be deployed and managed independently of the Kubernetes codebase, making it easier to add new storage solutions and maintain existing ones. By decoupling storage management from the core Kubernetes code, CSI enables a more flexible and extensible storage ecosystem.

How does CSI work?

CSI works by defining a set of Google Remote Procedure Call (gRPC) interfaces that storage providers implement to create, delete, and manage storage volumes. These interfaces include:

  • Identity Service: Provides information about the CSI plugin, such as its name and version.
  • Controller Service: Manages the lifecycle of volumes, including creating, deleting, and attaching/detaching volumes.
  • Node Service: Manages the lifecycle of volumes on a specific node, including mounting and unmounting volumes

Kubernetes interacts with CSI plugins through the Kubernetes CSI components, which include:

  • CSI Driver: The actual implementation of the CSI specification by the storage provider
  • CSI External Components: These are Kubernetes components that interact with the CSI driver:
    • External Provisioner: Creates and deletes volumes
    • External Attacher: Attaches and detaches volumes
    • External Resizer: Resizes volumes
    • External Snapshotter: Manages volume snapshots

When a user creates a PersistentVolumeClaim (PVC) in Kubernetes to request and manage persistent storage resources for applications, the external provisioner communicates with the CSI driver to create a volume. The external attacher then attaches the volume to the appropriate node, and the external resizer can resize the volume if needed. The external snapshotter can create snapshots of the volume for backup and recovery purposes.  It is important to note that in terms of business continuity features, CSI-based solutions go beyond just snapshotting.

Benefits of CSI for enterprises

CSI offers several benefits over traditional in-tree storage plugins, particularly for enterprises operating at the edge:

  • Decoupling of Storage and Kubernetes: CSI allows storage providers to develop and maintain their plugins independently of the Kubernetes codebase. This decoupling makes it easier to add new storage solutions and update existing ones without requiring changes to Kubernetes.
  • Flexibility and Extensibility: CSI provides a standardized interface that can be implemented by any storage provider. This flexibility allows Kubernetes to support a wide range of storage solutions, from traditional block and file storage to cloud-native storage systems.
  • Improved Maintenance and Testing: By moving storage plugins out of the Kubernetes codebase, CSI makes it easier to maintain and test these plugins. Storage providers can develop and test their plugins independently, ensuring better quality and reliability.
  • Enhanced Features: CSI enables advanced storage features such as volume snapshots, cloning, and resizing. These features provide greater flexibility and functionality for managing storage in Kubernetes.

Conclusion

The Kubernetes CSI is a powerful and flexible standard for managing storage in containerized environments. By providing a standardized interface for storage providers to develop plugins, CSI decouples storage management from the Kubernetes codebase, making it easier to add new storage solutions and maintain existing ones. In the next blog, I will explore areas where vendors can innovate and differentiate their CSI offerings, focusing on advanced data management features, enhanced performance and scalability, and security enhancements. Stay tuned as I continue to uncover the transformative potential of CSI in revolutionizing enterprise storage solutions at the edge.

Kubernetes
Kubernets Storage
Enterprise Solutions