Note:
Portworx only supports Openshift 3.7 and above.

Deploy

  1. Ensure you have followed the general Portworx prerequisites for Kubernetes

  2. Add Portworx service accounts to the privileged security context

     $ oc adm policy add-scc-to-user privileged system:serviceaccount:kube-system:px-account
     $ oc adm policy add-scc-to-user privileged system:serviceaccount:kube-system:portworx-pvc-controller-account
    
  3. Generate px spec using instructions given here. Make sure you give osft=true as part of the parameters while generating the spec.

  4. Install px

     $ oc apply -f px-spec.yaml
    

Test

We will test if the installation was successful using a persistent mysql deployment.

  • Create a Portworx StorageClass
cat <<EOF | oc create -f -
kind: StorageClass
apiVersion: storage.k8s.io/v1beta1
metadata:
    name: px-demo-sc
provisioner: kubernetes.io/portworx-volume
parameters:
   repl: "1"
EOF
  • Log into Openshift console: https://MASTER-IP:8443/console

  • Create a new project “hello-world”.

  • Import and deploy this mysql application template
    • For STORAGE_CLASS_NAME, we use the storage class px-demo-sc created in step before.
  • Verify mysql deployment is active.

If you are experiencing issues, please refer to Troubleshooting PX on Kubernetes and General FAQs.