Difficulty: Intermediate
Estimated Time: 10 minutes

Portworx is a software defined persistent storage solution designed and purpose built for applications deployed as containers, via container orchestrators such as Kubernetes, Marathon and Swarm. It is a clustered block storage solution and provides a Cloud-Native layer from which containerized stateful applications programmatically consume block, file and object storage services directly through the scheduler.

In this tutorial, you will learn how to deploy Minio to Kubernetes using Helm and Portworx:

Step: Deploy Helm to our Kubernetes cluster

In this step we will show you how to deploy Helm to your Kubernetes cluster. Helm helps you manage Kubernetes applications — Helm Charts helps you define, install, and upgrade even the most complex Kubernetes application. Charts are easy to create, version, share, and publish — so start using Helm and stop the copy-and-paste madness.

Step: Deploy Minio using Helm with the Portworx Storage Class

Once Helm is deployed we will use it to deploy the Minio chart. In order to provide for a highly available Minio instance, we will configure the chart to use a Portworx volume that we will create to ensure 3 replicas of the data. Portworx will perform synchronous replication of the volume so that the Minio data is well protected. Once Minio is deployed we will use the Minio client to create some data.

Step: Perform a failover test

In this step we will simulate a node failure to show how Kubernetes can reschedule your Minio pod to run on another node in your cluster. Portworx is able to ensure that the rescheduled pod connects to it data from anywhere in the cluster but goes a step further by ensuring that the pod will be scheduled on a node which has a local copy of the data so that you get the best level of performance. This advanced orchestration of stateful workloads is handled by the STorage ORchestrator for Kubernetes (STORK).

Step: Expand the volume used by Minio

In this step we will show how Portworx volumes can be dynamically expanded with zero downtime. Portworx are thinly provisioned and the size of the PVC is used as a maximum size. Once you reach this upper limit on the size of your Minio database you can easily perform this operation to add more capacity to your volume.

Step: Take a snapshot and restore it

In this final step we will show how we can use Minio as a backup destination for Portworx volumes. We will back up the Minio volume and store it in Minio and show how we can easily restore the volume and launch a new Minio instance with the recovered data.

Other things you should know

To learn more about how why running Mongo on Portworx is a great idea take a look at the following links:

This scenario assumes you have already covered the following scenarios:

Thank you for trying the playground. To view all our scenarios, go here

To learn more about Portworx, below are some useful references.

Deploy Minio on Portworx volumes and use it for volume backups.

Step 1 of 10

Wait for Kubernetes & Portworx to be ready

First we need to wait for Kubernetes and Portworx to be ready. Be patient, this is not a very high performance environment, just a place to learn something :-

Step: Wait for Kubernetes to be ready

Click the below section which waits for all Kubernetes nodes to be ready.

watch kubectl get nodes

When all 4 nodes show status Running then hit clear to ctrl-c and clear the screen.

Step: Wait for Portworx to be ready

Watch the Portworx pods and wait for them to be ready on all the nodes. This can take a few minutes since it involves pulling multiple docker images. You will see 'No resources found' until all images are pulled.

watch kubectl get pods -n kube-system -l name=portworx -o wide

When all the pods show STATUS Running and READY 1/1 then hit clear to ctrl-c and clear the screen.

You can take a look at the cluster status using the pxctl command line tool:

PX_POD=$(kubectl get pods -l name=portworx -n kube-system -o jsonpath='{.items[0].metadata.name}')
kubectl exec -it $PX_POD -n kube-system -- /opt/pwx/bin/pxctl status

Now that we have the Portworx cluster up, let's proceed to the next step !