Block Storage for OpenShift: A Comprehensive Guide

Author

Reads 848

Smiling woman in data center showcasing technology expertise.
Credit: pexels.com, Smiling woman in data center showcasing technology expertise.

Block storage for OpenShift is a crucial component for your applications to run smoothly. It provides persistent storage for your data, ensuring it's always available even in the event of a pod or node failure.

OpenShift supports various block storage options, including iSCSI, Fibre Channel, and NVMe over Fabrics. These options allow for high-performance storage and flexibility in deployment.

For OpenShift, block storage is essential for applications that require high availability and low latency. It's particularly useful for databases, file systems, and other stateful applications.

In this guide, we'll explore the ins and outs of block storage for OpenShift, covering its benefits, use cases, and configuration options.

Broaden your view: Block Smart Meter Radiation

Erasure Coded

Erasure Coded block storage requires at least 3 bluestore OSDs, each located on a different node, with a Linux kernel version of 4.11 or higher.

You'll need to create two pools: one erasure coded and one replicated. This is because the failureDomain is set to host and the erasureCoded chunk settings require at least 3 different OSDs.

Credit: youtube.com, USENIX ATC '21 - Boosting Full-Node Repair in Erasure-Coded Storage

The erasure coded pool must be set as the dataPool parameter in storageclass-ec.yaml for the data of the RBD images.

To use an erasure coded pool, you'll need to have bluestore as the storeType for your OSDs. This allows for the necessary erasure coding to take place.

The nodes that will mount the erasure coded RBD block storage must also have a Linux kernel version of 4.11 or higher.

Handling Node Loss

Automated node loss handling is currently disabled, so you'll need to follow manual steps to recover from the loss of a node.

To confirm a node is down, you can check its status. If it's confirmed down, you'll need to add two taints to the node: `node.kubernetes.io/out-of-service=nodeshutdown:NoExecute` and `node.kubernetes.io/out-of-service=nodeshutdown:NoSchedule`.

These taints will blocklist the node, preventing connections to Ceph from the RBD volume on that node. You can verify the node is blocklisted by running `kubectl get networkfences.csiaddons.openshift.io`.

Here's what to look for:

If the state is "Fenced" and the result is "Succeeded", the node is successfully blocklisted.

MinIO on Red Hat

Credit: youtube.com, Red Hat #Openshift and MinIO - A Perfect Combination for #MultiCloud #ObjectStorage on #Kubernetes

MinIO on Red Hat offers a flexible and controlled environment for your software stack, allowing you to avoid cloud lock-in. This is especially useful for businesses that require customization and flexibility in their storage solutions.

One of the key benefits of running MinIO on Red Hat is the ability to have control over the software stack, which is essential for businesses that require customization and flexibility in their storage solutions. This control also provides the flexibility to avoid cloud lock-in, giving you more freedom to manage your data.

For those who need to manage storage directly from the OpenShift administrator console, Red Hat OpenShift Container Storage (now called Red Hat OpenShift Data Foundation) provides highly available, dynamic, and stateful container-native storage. This solution offers integrated management, seamless persistent storage, and rapid deployment, making it an ideal choice for businesses that require efficient and flexible storage solutions.

Three Reasons to Run MinIO on Red Hat

Credit: youtube.com, How to install Minio on RedHat 8.5

Running MinIO on Red Hat OpenShift provides control over the software stack with flexibility to avoid cloud lock-in. This flexibility is a major advantage for customers who want to run MinIO on OpenShift.

MinIO on OpenShift is a popular choice among customers for its ability to provide a flexible software stack.

Red Hat

Red Hat OpenShift Container Storage, now known as Red Hat OpenShift Data Foundation, is a software-defined persistent storage system built specifically for the Red Hat OpenShift Container Platform.

It provides container-native storage that is highly available, dynamic, and stateful, allowing you to deploy and de-provision storage on-demand directly from the OpenShift administrator panel.

Key benefits of OpenShift Data Foundation include integrated management, seamless persistent storage, and rapid deployment.

Here are the key benefits in more detail:

  • Integrated management: It gives you more flexibility and efficiency when it comes to storage provisioning
  • Seamless persistent storage: Within the native OpenShift interface, dynamic provisioning of persistent volumes for applications and services is possible.
  • Rapid deployment: OpenShift Container Storage on clusters can be deployed by operators.

Red Hat OpenShift Data Foundation offers complete support for persistent and ephemeral storage for OpenShift, with full data portability for hybrid and multicloud environments.

This means you can run MinIO on OpenShift, providing control over the software stack and flexibility to avoid cloud lock-in.

Cloud Native Platform

Credit: youtube.com, End-to-End Data Management on Kubernetes with MinIO and RedHat OpenShift

MinIO on Red Hat offers a cloud native platform that's built on top of Kubernetes, which makes it easy to manage persistent storage.

The OpenShift Container Platform uses persistent volumes (PVs) to provide persistent storage facilities in clusters.

Kubernetes makes it possible to define PVs and attach them to pods, to facilitate persistent storage that outlines the lifecycle of a pod.

OpenShift supports many popular PV plugins, including Amazon EBS, Azure Files, and Google Cloud Persistent Disk.

Developers can request storage resources using persistent volume claims (PVCs), without being aware of the specifics of the underlying storage equipment.

OpenShift uses the Kubernetes PVC mechanism to allow developers to request storage resources, which can be accessed from anywhere in the OpenShift platform.

Security and Management

Encryption is a crucial aspect of data security, and MinIO has got it covered. MinIO uses AES-256-GCM or ChaCha20-Poly1305 encryption to protect data integrity and confidentiality with negligible performance impact.

For production environments, encryption should be enabled on all buckets by default. MinIO supports three server-side encryption modes: SSE-KMS, SSE-S3, and SSE-C.

Credit: youtube.com, Container-native storage for modern applications with OpenShift and Red Hat Gluster Storage

To manage encryption keys, HashiCorp Vault is recommended. There is no native OpenShift key management functionality, so using Vault to store keys outside of the object storage system is a best practice.

Each tenant runs its own Key Encryption Server (KES) in an isolated namespace, which enables high-performance, per-object encryption.

Persistent Volumes

Persistent Volumes are a fundamental concept in OpenShift, allowing you to define persistent storage that spans the lifecycle of a pod. This is essential because containers or pods can shut down at any time, resulting in the loss of local storage.

OpenShift uses Persistent Volumes (PVs) to provide persistent storage facilities in clusters, making them available across the entire OpenShift platform. PVs can be shared across the entire OpenShift platform.

You can provision storage in OpenShift using a dynamic provisioner that creates PVs in response to claims, or by setting up PVs manually, knowing the required capacity in advance. Administrators can configure a dynamic provisioner that builds PVs in response to claims or manually set up PVs, knowing the capacity required ahead of time.

Credit: youtube.com, Kubernetes Volumes explained | Persistent Volume, Persistent Volume Claim & Storage Class

Developers can request storage resources using Persistent Volume Claims (PVCs), which are requests for the type and volume of storage they want. Developers issue PVCs, in which they request the type and capacity of storage they need.

The main node watches for PVCs, and when a PVC meets the criteria, it binds the claim to the volume (or, if there is no appropriate volume and a provisioner is set up, creates a new PV). Binding PV to a claim occurs when a PVC meets the criteria, it binds the claim to the volume.

Once a pod is bound to a persistent volume, it can access the volume for as long as needed. A persistentVolumeClaim statement in the pod’s YAML setup allows it to access a volume. Pods access volumes after binding occurs, the claim becomes available to the pod as a persistent volume, for as long as needed by the pod.

OpenShift supports many popular PV plugins, including Amazon EBS, Azure Files, Azure Managed Disks, Google Cloud Persistent Disk, Cinder, iSCSI, Local Volume, NFS, and VMware vSphere. The OpenShift Container Platform supports many popular PV plugins.

Here are some of the supported PV plugins:

CSI Architecture

Credit: youtube.com, OpenShift Container Storage - Christopher Blum (Red Hat), Carlos Torres (Red Hat)

The CSI Architecture allows OpenShift to use various storage backends by deploying multiple components that bridge the gap between the storage driver and the OpenShift Container Platform.

These components include external CSI controllers, which can deploy one or multiple pods containing attacher, provisioner, and CSI driver containers. The attacher container translates detach and attach calls from OpenShift, while the provisioner container translates delete and provision calls.

The CSI driver container communicates with the attacher and provisioner containers using UNIX domain sockets and passes requests directly to storage components. This setup enables OpenShift to use the CSI driver as persistent volumes for pods.

A CSI driver DaemonSet is responsible for running a CSI driver-installed pod on each node, allowing OpenShift to mount the node with storage provided by a CSI driver. This enables OpenShift to use the CSI driver as persistent volumes for pods.

Broaden your view: Azure Storage Container

Erasure Coded CSI Driver

The Erasure Coded CSI Driver is a game-changer for storing RBD images.

Credit: youtube.com, Introduction to CSI Driver Internals - Andy Jeffries

To use this driver, you need to set the erasure coded pool as the dataPool parameter in your storageclass-ec.yaml file.

It's used for the data of the RBD images, which is a crucial aspect of your storage setup.

You'll need to create two pools: one erasure coded and one replicated.

This is because erasure coded pools require a specific configuration to work effectively.

CSI Architecture

The CSI architecture is a crucial component of the OpenShift Container Platform. It allows you to run multiple CSI drivers for different storage backends.

A CSI driver is usually shipped as a container image that's unaware it's running on the OpenShift Container Platform. This means you need to deploy multiple components to serve as a bridge between the storage driver and the OpenShift Container Platform.

The platform lets you run several CSI drivers for different backends of storage. Each driver requires its own external controllers and a DaemonSet managed by the CSI registrar.

Engineer fixing core swith in data center room
Credit: pexels.com, Engineer fixing core swith in data center room

Here are the main components running inside OpenShift pods:

  • Attacher container: translates detach and attach calls from OpenShift’s container platform to respective ControllerUnpublish and ControllerPublish calls to a CSI driver.
  • Provisioner container: translates delete and provision calls from OpenShift’s container platform to respective DeleteVolume and CreateVolume calls to CSI drivers.
  • CSI driver container: communicates with the attacher and provisioner containers using UNIX domain sockets and passes requests directly to storage components.

The CSI driver DaemonSet is responsible for running a CSI driver-installed pod on each node. This lets OpenShift’s container platform mount the node with storage provided by a CSI driver.

Frequently Asked Questions

What is block storage in Kubernetes?

Block storage in Kubernetes is a high-performance storage solution that provides persistent storage for applications, allowing them to store and retrieve data efficiently. It's a scalable and flexible storage option that can be easily integrated into Kubernetes environments.

How do I add local storage to OpenShift?

To add local storage to OpenShift, log in to the web console and install the Local Storage Operator in a specific namespace on your cluster. This will enable you to manage and provision local storage resources within your OpenShift environment.

Gilbert Deckow

Senior Writer

Gilbert Deckow is a seasoned writer with a knack for breaking down complex technical topics into engaging and accessible content. With a focus on the ever-evolving world of cloud computing, Gilbert has established himself as a go-to expert on Azure Storage Options and related topics. Gilbert's writing style is characterized by clarity, precision, and a dash of humor, making even the most intricate concepts feel approachable and enjoyable to read.

Love What You Read? Stay Updated!

Join our community for insights, tips, and more.