Skip to content

Object Storage with Kubernetes

About this Lab

This hands-on lab for object storage on Kubernetes steps you through the creation and configuration of persistent storage for MongoDB using an encrypted IBM Cloud Object Storage bucket on IBM Cloud Object Storage.

We use the IBM Cloud Object Storage plugin to enable Kubernetes pods to access IBM Cloud Object Storage buckets using the cloud native PersistentVolume (PV) and PersistentVolumeClaim (PVC) resources. The plugin has two components: a dynamic provisioner and a FlexVolume driver for mounting the buckets using s3fs-fuse on a worker node.

FlexVolume and the Container Storage Interface (CSI) are so-called out-of-tree volume plugins. Out-of-tree volume plugins enable storage developers to create custom storage plugins not included (in-tree) in the core Kubernetes APIs. For background information about FlexVolume, go to the flexvolume readme.

The FlexVolume driver uses s3fs to allow Linux and macOS to mount an S3 bucket via FUSE. If you want to learn more about s3fs-fuse and how FUSE works, you can do the additional s3fs lab.

Cloud Object Storage architecture

This Object Storage lab consists of the following steps:

  1. To setup client CLI and Kubernetes cluster, go to Setup,
  2. To learn more about what Object Storage is, go to About Object Storage
  3. Create Object Storage instance, go here,
  4. Configure your Kubernetes Cluster, go here,
  5. To configure the IBM Cloud Object Storage plugin, go here,
  6. Create the PersistentVolumeClaim with dynamic provisioning using the ibmc plugin, go here.
  7. Deploy MongoDB using Object Storage, go here.

Start with Setup.

Other Labs

Related labs using Object Storage are:

Next

1. Setup