Install Portworx on vSphere with Amazon EKS Anywhere


Portworx can be installed on a Kubernetes cluster running on vSphere and managed by EKS Anywhere.

Prerequisites

Before you install Portworx on vSphere, ensure that you meet the following prerequisiites:

Specification Supported Value
Deployment Host
Note: The same vSphere host where you deploy EKS-Anywhere.
VM OS: Linux
vCPU: 4
Memory: 16 GB
Disk storage: 200 GB
Control-Plane VMs Minimum: 1
Recommended: 3
vCPUs: 2
RAM: 8 GB
OS Volume: 25 GB
Worker Node VMs Minimum: 3 (for storage cluster)
vCPUs: 8
RAM: 16 GB
OS Volume: 25 GB

Step 1: vCenter user for Portworx

Provide Portworx with a vCenter server user that has either the full Admin role or, for increased security, a custom-created role with the following minimum vSphere privileges:

  • Datastore
    • Allocate space
    • Browse datastore
    • Low level file operations
    • Remove file
  • Host
    • Local operations
    • Reconfigure virtual machine
  • Virtual machine
    • Change Configuration
    • Add existing disk
    • Add new disk
    • Add or remove device
    • Advanced configuration
    • Change Settings
    • Extend virtual disk
    • Modify device settings
    • Remove disk

If you created a custom role with the permissions above, select “Propagate to children” when assigning the user to the role.

NOTE: All commands in the subsequent steps need to be run on a machine with kubectl access.

Step 2: Create a Kubernetes secret with your vCenter user and password

Update the following items in the Secret template below to match your environment:

  1. VSPHERE_USER: Use output of printf <vcenter-server-user> | base64
  2. VSPHERE_PASSWORD: Use output of printf <vcenter-server-password> | base64
apiVersion: v1
kind: Secret
metadata:
  name: px-vsphere-secret
  namespace: kube-system
type: Opaque
data:
  VSPHERE_USER: YWRtaW5pc3RyYXRvckB2c3BoZXJlLmxvY2Fs
  VSPHERE_PASSWORD: cHgxLjMuMEZUVw==

kubectl apply the above spec after you update the above template with your user and password.

Step 3: Generate specifications

Generate the spec file using the Portworx Spec Generator with the following configurations:

  1. Under the Basic tab, ensure that the following config parameters are set.

    • Select the Use the Portworx operator checkbox.
    • Select the 2.8 version of Portworx in Portworx Version drop-down.
    • Under ETCD, select Built-in.
  2. Under the Storage tab, ensure that the following config parameters are set.

    • Under Select your environment, choose Cloud.
    • Under Select Cloud platform, select vSphere.
    • Under Configure storage devices, choose Create Using a Spec in Select type of disk.
    • Under vCenter datastore prefix, type “px-”.
  3. Under the Customize tab, ensure that the following config parameters are set.

    • In Are you running either of these?, choose None.
    • In Advanced settings, select the following checkboxes.
      • Enable Stork
      • Enable CSI
      • Enable Monitoring
      • Enable Telemetry

Apply the specs

Apply the generated specs to your cluster.

kubectl apply -f px-spec.yaml
Monitor the Portworx pods
  1. Enter the following kubectl get command, waiting until all Portworx pods show as ready in the output:

    kubectl get pods -o wide -n kube-system -l name=portworx
  2. Enter the following kubectl describe command with the ID of one of your Portworx pods to show the current installation status for individual nodes:

     kubectl -n kube-system describe pods <portworx-pod-id>
     Events:
       Type     Reason                             Age                     From                  Message
       ----     ------                             ----                    ----                  -------
       Normal   Scheduled                          7m57s                   default-scheduler     Successfully assigned kube-system/portworx-qxtw4 to k8s-node-2
       Normal   Pulling                            7m55s                   kubelet, k8s-node-2   Pulling image "portworx/oci-monitor:2.5.0"
       Normal   Pulled                             7m54s                   kubelet, k8s-node-2   Successfully pulled image "portworx/oci-monitor:2.5.0"
       Normal   Created                            7m53s                   kubelet, k8s-node-2   Created container portworx
       Normal   Started                            7m51s                   kubelet, k8s-node-2   Started container portworx
       Normal   PortworxMonitorImagePullInPrgress  7m48s                   portworx, k8s-node-2  Portworx image portworx/px-enterprise:2.5.0 pull and extraction in progress
       Warning  NodeStateChange                    5m26s                   portworx, k8s-node-2  Node is not in quorum. Waiting to connect to peer nodes on port 9002.
       Warning  Unhealthy                          5m15s (x15 over 7m35s)  kubelet, k8s-node-2   Readiness probe failed: HTTP probe failed with statuscode: 503
       Normal   NodeStartSuccess                   5m7s                    portworx, k8s-node-2  PX is ready on this node
    NOTE: In your output, the image pulled will differ based on your chosen Portworx license type and version.
Monitor the cluster status

Use the pxctl status command to display the status of your Portworx cluster:

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

Last edited: Thursday, Sep 9, 2021