Skip to main content
  1. Blog/

Red Hat OpenShift in vSphere with Kasten

·963 words·5 mins·
Author
Marco Escobar
Data protection, Kubernetes, cybersecurity and AI. Hands-on guides from the trenches: Veeam, Kasten, VMware, Oracle, cloud, and whatever I’m breaking in the homelab this week.
Table of Contents
Red Hat OpenShift in vSphere with Kasten

Red Hat OpenShift is one of the most widely used enterprise platforms for managing, operating, and maintaining containers. In this guide we will look at how to protect your containers on Red Hat OpenShift 4.x integrated with VMware vSphere through its Container Storage Interface using the Kasten K10 Platform, configuring routes to reach the K10 admin interface and using Minio S3 as the backup target.

Initial Steps
#

As always, we should start by reviewing the official documentation for each product. Let’s begin with Red Hat OpenShift 4.7 (the latest version at the time of writing):

https://docs.openshift.com/container-platform/4.7/installing/installing_vsphere/installing-vsphere-installer-provisioned.html

This documentation covers the requirements and the installation method for Red Hat OpenShift 4.7 via IPI (Installer Provisioned Infrastructure), where you run the installer and simply provide the requested VMware vCenter details. I won’t explain how to install OpenShift in this post, since it’s very straightforward with IPI. We should, however, review a very important part of the OpenShift documentation regarding volumes:

https://docs.openshift.com/container-platform/4.7/storage/persistent_storage/persistent-storage-vsphere.html#vsphere-pv-backup_persistent-storage-efs

The default Storage Class that OpenShift configures through IPI is named “thin” and uses kubernetes.io/vsphere-volume. When a persistent volume is requested for the containers, this storage class provisions independent, persistent disks from vSphere, so, as we know, we won’t be able to take snapshots of those volumes. That’s why it’s important to review the documentation referenced above.

Red Hat OpenShift in vSphere with Kasten - screenshot 1

And of course, review the Kasten K10 Platform documentation, currently at version 3.0.9 (as of this post), for the requirements and installation steps on Red Hat OpenShift:

https://docs.kasten.io/latest/index.html

Installing Kasten on OpenShift 4.x
#

Before installing Kasten on any Kubernetes distribution, you should always run a pre-installation script to perform preflight checks and validate whether your environment supports the Kasten K10 features, with the following command:

curl https://docs.kasten.io/tools/k10_primer.sh | bash
```bash



Red Hat OpenShift in vSphere with Kasten - primer
If the helm executable isn't found, you can review the prerequisite installation in the Kasten installation section of this link: [/veeam-kasten/](/en/veeam-kasten/) Now that the prerequisites are in place, helm, kubectl, and vSphere CSI (version 2.1.1 in this case), we'll start installing Kasten K10. As the documentation indicates, we need to run two commands: ```bash helm repo add kasten https://charts.kasten.io/ kubectl create namespace kasten-io ```bash
Red Hat OpenShift in vSphere with Kasten - screenshot 2
With everything pre-configured, the only step left is the installation itself. As indicated in the Kasten documentation, we run the following command: ```bash helm install k10 kasten/k10 --namespace=kasten-io \ --set scc.create=true ```bash
Red Hat OpenShift in vSphere with Kasten - screenshot 3
As shown in the previous image, Kasten K10 is now installed on OpenShift. Next we'll check the status of the pods with this command: ```bash watch oc get pods -n kasten-io ```bash
Red Hat OpenShift in vSphere with Kasten - screenshot 4
We need to wait until all of the Kasten pods are in the "running" state.
Red Hat OpenShift in vSphere with Kasten - screenshot 5
And if we check the persistent volumes that Kasten uses from the command line: ```bash oc get pv,pvc
Red Hat OpenShift in vSphere with Kasten - screenshot 6

We can see that it’s using the vsphere-csi Storage Class, associated with the volumes that we can also see in the datastore we use in vCenter:

Red Hat OpenShift in vSphere with Kasten - screenshot 7

As well as in the Red Hat OpenShift console:

Red Hat OpenShift in vSphere with Kasten - screenshot 8

Accessing the K10 Dashboard via a Route in OpenShift
#

To reach the Kasten K10 management console, we just need to create a route in OpenShift to expose our service. In this case we’ll do it through the Red Hat OpenShift web console. Go to Networking -> Routes and, in the upper left corner, select the “kasten-io” project.

Red Hat OpenShift in vSphere with Kasten - screenshot 9

Here we’ll create the route by clicking “Create Route” and entering the following information:

Red Hat OpenShift in vSphere with Kasten - screenshot 10
  • Name: whatever name you want, in this case “k10”
  • Hostname: leave it blank to have one assigned, or enter one of your own
  • Path: default
  • Service: select the “gateway” service
  • Target Port: select the only one available, otherwise just 8000 -> 8000 TCP

Then, after clicking “Create”, it will show the details and the access link listed under " Location".

Red Hat OpenShift in vSphere with Kasten - screenshot 11

Next, click or copy the URL found under " Location" and append “/k10/#/” to reach the management console. In my case the URL would be:

http://k10-kasten-io.apps.oc.24xsiempre.cl/k10/#/

When you open the URL, you’ll see the Kasten console and welcome message:

Red Hat OpenShift in vSphere with Kasten - screenshot 12

We enter our details and go ahead and configure our Kasten K10 Platform solution.

Red Hat OpenShift in vSphere with Kasten - screenshot 13

Configuring Kasten K10 with Minio S3
#

First we’ll install Minio on Ubuntu. You can follow one of the many very simple setup guides, for example:

https://www.digitalocean.com/community/tutorials/how-to-set-up-an-object-storage-server-using-minio-on-ubuntu-18-04-es

Once Minio S3 is up and running, we’ll configure Kasten K10 by going into “Settings” to add a new “Profile”.

Red Hat OpenShift in vSphere with Kasten - screenshot 14

Here we’ll enter the profile name and select “S3 Compatible” to use with Minio.

Red Hat OpenShift in vSphere with Kasten - screenshot 15
  • Profile Name: openshift, or any name you like
  • Cloud Storage Provider: S3 Compatible, which is the option required to use Minio; otherwise, choose the one you need
  • S3 Access Key: the access key from Minio or your object storage provider
  • S3 Secret: the secret or password from Minio or your object storage provider
  • Endpoint: http://40.40.40.100:9000/ , or the address of your Minio server
  • Skip Certificate chain and hostname verification: enabled, since we aren’t using SSL in this case
  • Region: leave blank
  • Bucket Name: openshift, the name of the bucket to use

And the configuration will look like this:

Red Hat OpenShift in vSphere with Kasten - screenshot 16

Configuring Kasten K10 with vSphere vCenter
#

Going into “Settings” and selecting “Infrastructure”, we’ll create a new “Profile”.

Red Hat OpenShift in vSphere with Kasten - screenshot 17
Red Hat OpenShift in vSphere with Kasten - screenshot 18

Where:

  • Profile Name: vcenter, or whatever name you want
  • Infrastructure Type: vSphere
  • vCenter Server: the vCenter IP or DNS address, preferably the FQDN
  • vSphere User: a vCenter user with privileges
  • vSphere Password: the password
Red Hat OpenShift in vSphere with Kasten - screenshot 19

With all of this configured, you’ll be able to run backups using the CSI interface for vSphere, creating snapshots of the persistent volumes that live in the configured datastores.

Red Hat OpenShift in vSphere with Kasten - screenshot 20

And of course, you can review how to create backup policies with Kasten K10 in /veeam-kasten/

Related posts#

Related