Install and configure Portworx on VMware Tanzu


NOTE:

  • The installation steps below only apply if you’re running with Kubernetes on the TKG or TKGS platforms
  • Metro DR is currently not supported when both clusters are running TKG
  • For the underlying datastore for the PVs and VMs, do not enable Storage DRS. VSphere CSI driver and Cloud Native Storage does not currently support Storage DRS feature in vSphere

Prerequisites

  • A running Kubernetes cluster TKG or TKGS.
  • If you’re using TKGS, ensure all prerequisites are met based on VMware documentation.
  • Enable Workload Management according to VMware Best Practices.
  • Ensure the required ports in the 9001:9020 range are open on all nodes.

Create the StorageClass

CSI cloud drive configuration requires a StorageClass with the CSI driver set as a provisioner to be installed in the Kubernetes cluster.

  1. Get a CSI provisioner name by running the following command on your Tanzu Kubernetes cluster. You will use this name in the next step:

    kubectl get csidriver
  2. Create a StorageClass. In the provisioner field, enter the CSI driver name you got in the step above:

    apiVersion: storage.k8s.io/v1
    kind: StorageClass
    metadata:
    annotations:
      storageclass.kubernetes.io/is-default-class: "true"
    name: vsphere-immediate-sc
    provisioner: <csi_driver_name>
    allowVolumeExpansion: true
    reclaimPolicy: Delete
    volumeBindingMode: Immediate

Install Portworx

As part of the installation, you’ll use the spec generator. Perform the following steps to create your Portworx spec and configure your Cloud Drives. This installation method uses the Operator.

To install Portworx with Kubernetes, you must first generate Kubernetes manifests that you will deploy in your cluster:

  1. Navigate to PX-Central and log in, or create an account

  2. Select Install and Run to open the Spec Generator

    Screenshot showing install and run

  3. Select New Spec

    Screenshot showing new spec button

  4. Choose either Portworx Enterprise or Portworx Essentials , depending on which license you intend to use:

    Screenshot showing Portworx license selector

  5. Select VMware Tanzu Cloud Platform and specify disk size and storage class name you will be using for drives

    Screenshot showing Tanzu configuration

Open required ports on TKGS

IMPORTANT: If you aren’t installing Portworx on TKGS, skip this section.

Portworx requires open ports on the 9001:9020 port range between all nodes. To open these required ports on TKGS, you must SSH into a running node and configure the iptables manually.

NOTE: If you enable autoscaling on your cluster, new nodes will come up with ports closed.

Perform the following steps to open the ports on TKGS nodes:

  1. Run the following command from your active terminal:

    for pod in $(kubectl get pods -n kube-system -l name=portworx | grep -v NAME | awk '{print $1}');\
    do kubectl exec -t $pod -n kube-system -- nsenter --mount=/host_proc/1/ns/mnt bash -c \
      "iptables -A INPUT -p tcp --match multiport --dports 9001:9020 -j ACCEPT";\
    done

    Once you’ve issued this command, the cluster will finish deploying. This usually takes between 5-10 minutes.

  2. Watch the pods to ensure Portworx has deployed successfully:

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


Last edited: Friday, Aug 20, 2021