Table of contents

Creating Portworx storage classes

If you decide to use Portworx as your storage option, Cloud Pak for Data requires the following storage classes. You can create them either manually or automatically.

Before you begin

Required role: To complete this task, you must be a cluster administrator.

Ensure that you have a minimum of 1 TB of raw, unformatted disk on every compute node that is designated for storage. The raw disk must have the same device name on all of the worker nodes.

About this task

If you installed the entitled Portworx instance that comes free with Cloud Pak for Data, you can automatically create the storage classes required for Portworx by running the script: px-sc.sh.

If you are using your own Portworx instance and want to use the px-sc.sh script to automatically create the required storage classes, extract the contents of the entitled Portworx package that comes for free with Cloud Pak for Data. See Installing the entitled Portworx instance for details.

If you opt not to use the px-sc.sh script, you must manually create the following Portworx storage classes that are required for Cloud Pak for Data:

Storage class Storage type Storage class definitions
portworx-couchdb-sc CouchDB
# CouchDB (Implemented application-level redundancy)
cat <<EOF | oc create -f -
kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
 name: portworx-couchdb-sc
provisioner: kubernetes.io/portworx-volume
parameters:
 repl: "2"
 priority_io: "high"
 io_profile: "db_remote"
 disable_io_profile_protection: "1"
allowVolumeExpansion: true
reclaimPolicy: Retain
volumeBindingMode: Immediate
EOF
portworx-elastic-sc Elastic Search
# ElasticSearch (Implemented application-level redundancy)
cat <<EOF | oc create -f -
kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
 name: portworx-elastic-sc
provisioner: kubernetes.io/portworx-volume
parameters:
 repl: "2"
 priority_io: "high"
 io_profile: "db_remote"
 disable_io_profile_protection: "1"
allowVolumeExpansion: true
reclaimPolicy: Retain
volumeBindingMode: Immediate
EOF
portworx-solr-sc Solr
# Solr
cat <<EOF | oc create -f -
kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
 name: portworx-solr-sc
provisioner: kubernetes.io/portworx-volume
parameters:
 repl: "3"
 priority_io: "high"
 io_profile: "db_remote"
 disable_io_profile_protection: "1"
allowVolumeExpansion: true
reclaimPolicy: Retain
volumeBindingMode: Immediate
EOF
portworx-cassandra-sc Cassandra
# Cassandra
cat <<EOF | oc create -f -
kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
 name: portworx-cassandra-sc
provisioner: kubernetes.io/portworx-volume
parameters:
 repl: "3"
 priority_io: "high"
 io_profile: "db_remote"
 disable_io_profile_protection: "1"
allowVolumeExpansion: true
reclaimPolicy: Retain
volumeBindingMode: Immediate
EOF
portworx-kafka-sc Apache Kafka
# Kafka
cat <<EOF | oc create -f -
kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
 name: portworx-kafka-sc
provisioner: kubernetes.io/portworx-volume
parameters:
 repl: "3"
 priority_io: "high"
 io_profile: "db_remote"
 disable_io_profile_protection: "1"
allowVolumeExpansion: true
reclaimPolicy: Retain
volumeBindingMode: Immediate
EOF
portworx-metastoredb-sc Metastore
# metastoredb:
cat <<EOF | oc create -f -
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  name: portworx-metastoredb-sc
parameters:
  priority_io: high
  io_profile: db_remote
  repl: "3"
  disable_io_profile_protection: "1"
allowVolumeExpansion: true
provisioner: kubernetes.io/portworx-volume
reclaimPolicy: Retain
volumeBindingMode: Immediate
EOF
portworx-rwx-gp3-sc GP3 replica 3
# General Purpose, 3 Replicas - Default SC for other applications
# without specific SC defined and with RWX volume access mode - New Install
cat <<EOF | oc create -f -
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  name: portworx-rwx-gp3-sc
parameters:
  priority_io: high
  repl: "3"
  sharedv4: "true"
  io_profile: db_remote
  disable_io_profile_protection: "1"
allowVolumeExpansion: true
provisioner: kubernetes.io/portworx-volume
reclaimPolicy: Retain
volumeBindingMode: Immediate
EOF
portworx-shared-gp3 GP3 replica 3
# General Purpose, 3 Replicas [Default for other applications without
# specific SC defined and with RWX volume access mode] - SC portworx-shared-gp3 for upgrade purposes
cat <<EOF | oc create -f -
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  name: portworx-shared-gp3
parameters:
  priority_io: high
  repl: "3"
  sharedv4: "true"
  io_profile: db_remote
  disable_io_profile_protection: "1"
allowVolumeExpansion: true
provisioner: kubernetes.io/portworx-volume
reclaimPolicy: Retain
volumeBindingMode: Immediate
EOF
portworx-rwx-gp2-sc GP2 replica 2
# General Purpose, 2 Replicas RWX volumes
cat <<EOF | oc create -f -
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  name: portworx-rwx-gp2-sc
parameters:
  priority_io: high
  repl: "2"
  sharedv4: "true"
  io_profile: db_remote
  disable_io_profile_protection: "1"
allowVolumeExpansion: true
provisioner: kubernetes.io/portworx-volume
reclaimPolicy: Retain
volumeBindingMode: Immediate
EOF
portworx-dv-shared-gp Shared DV replica 1
# DV - Single replica
cat <<EOF | oc create -f -
allowVolumeExpansion: true
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  name: portworx-dv-shared-gp
parameters:
  block_size: 4096b
  priority_io: high
  repl: "1"
  shared: "true"
provisioner: kubernetes.io/portworx-volume
reclaimPolicy: Retain
volumeBindingMode: Immediate
EOF
portworx-dv-shared-gp3 Shared DV GP3 replica 3
# DV - three replicas
cat <<EOF | oc create -f -
allowVolumeExpansion: true
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  name: portworx-dv-shared-gp3
parameters:
  block_size: 4096b
  priority_io: high
  repl: "3"
  shared: "true"
provisioner: kubernetes.io/portworx-volume
reclaimPolicy: Retain
volumeBindingMode: Immediate
EOF
portworx-shared-gp-allow Streams
# Streams 
cat <<EOF | oc create -f -
allowVolumeExpansion: true
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
 name: portworx-shared-gp-allow
parameters:
 priority_io: high
 repl: "3"
 io_profile: "cms"
provisioner: kubernetes.io/portworx-volume
reclaimPolicy: Delete
volumeBindingMode: Immediate
EOF
portworx-rwx-gp-sc GP replica 1
#  General Purpose, 1 Replica - RWX volumes for TESTING ONLY.
cat <<EOF | oc create -f -
kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
 name: portworx-rwx-gp-sc
provisioner: kubernetes.io/portworx-volume
parameters:
 repl: "1"
 priority_io: "high"
 sharedv4: "true"
 io_profile: db_remote
 disable_io_profile_protection: "1"
allowVolumeExpansion: true
volumeBindingMode: Immediate
reclaimPolicy: Delete
EOF
portworx-shared-gp Shared GP high IOPS
# General Purpose, 3 Replicas - RWX volumes - placeholder SC portworx-shared-gp for upgrade purposes
cat <<EOF | oc create -f -
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  name: portworx-shared-gp
parameters:
  priority_io: high
  repl: "3"
  sharedv4: "true"
  io_profile: db_remote
  disable_io_profile_protection: "1"
allowVolumeExpansion: true
provisioner: kubernetes.io/portworx-volume
reclaimPolicy: Retain
volumeBindingMode: Immediate
EOF
portworx-gp3-sc GP3 replica 3
# General Purpose, 3 Replicas RWO volumes rabbitmq and redis-ha - New Install 
cat <<EOF | oc create -f -
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  name: portworx-gp3-sc
parameters:
  priority_io: high
  repl: "3"
  io_profile: "db_remote"
  disable_io_profile_protection: "1"
allowVolumeExpansion: true
provisioner: kubernetes.io/portworx-volume
reclaimPolicy: Retain
volumeBindingMode: Immediate
EOF
portworx-nonshared-gp2 GP2 nonshared throughput optimized
# General Purpose, 3 Replicas RWO volumes rabbitmq and redis-ha - placeholder SC portworx-nonshared-gp2 for upgrade purposes
cat <<EOF | oc create -f -
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  name: portworx-nonshared-gp2
parameters:
  priority_io: high
  repl: "3"
  io_profile: "db_remote"
  disable_io_profile_protection: "1"
allowVolumeExpansion: true
provisioner: kubernetes.io/portworx-volume
reclaimPolicy: Retain
volumeBindingMode: Immediate
EOF
portworx-db-gp2-sc DB GP2 replica 3
# General Purpose for Databases, 2 Replicas - MongoDB - (Implemented application-level redundancy)
cat <<EOF | oc create -f -
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  name: portworx-db-gp2-sc
parameters:
  priority_io: "high"
  io_profile: "db_remote"
  repl: "2"
  disable_io_profile_protection: "1"
allowVolumeExpansion: true
provisioner: kubernetes.io/portworx-volume
reclaimPolicy: Retain
volumeBindingMode: Immediate
EOF
portworx-db-gp3-sc DB GP3 replica 3
# General Purpose for Databases, 3 Replicas
cat <<EOF | oc create -f -
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  name: portworx-db-gp3-sc
parameters:
  io_profile: "db_remote"
  repl: "3"
  priority_io: "high"
  disable_io_profile_protection: "1"
allowVolumeExpansion: true
provisioner: kubernetes.io/portworx-volume
reclaimPolicy: Retain
volumeBindingMode: Immediate
EOF
portworx-db2-rwx-sc Db2® and Db2 Warehouse (System and Backup Storage)
# DB2 RWX shared volumes for System Storage, backup storage, future load storage, and future diagnostic logs storage
cat <<EOF | oc create -f -
allowVolumeExpansion: true
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  name: portworx-db2-rwx-sc
parameters:
  io_profile: cms
  block_size: 4096b
  repl: "3"
  sharedv4: "true"
provisioner: kubernetes.io/portworx-volume
reclaimPolicy: Retain
volumeBindingMode: Immediate
EOF
portworx-db2-rwo-sc Db2 and Db2 Warehouse (User Storage)

Watson™ Knowledge Catalog Db2 Metastore

# Db2 RWO volumes SC for user storage, future transaction logs storage, future archive/mirrors logs storage. This is also used for WKC DB2 Metastore
cat <<EOF | oc create -f -
allowVolumeExpansion: true
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  name: portworx-db2-rwo-sc
parameters:
  block_size: 4096b
  io_profile: db_remote
  priority_io: high
  repl: "3"
  sharedv4: "false"
provisioner: kubernetes.io/portworx-volume
reclaimPolicy: Retain
volumeBindingMode: Immediate
EOF
portworx-db2-sc Watson Knowledge Catalog Db2 Metastore (Upgrade)
# WKC DB2 Metastore - SC portworx-db2-sc for upgrade purposes 
cat <<EOF | oc create -f -
allowVolumeExpansion: true
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  name: portworx-db2-sc
parameters:
  io_profile: "db_remote"
  priority_io: high
  repl: "3"
  disable_io_profile_protection: "1"
provisioner: kubernetes.io/portworx-volume
reclaimPolicy: Retain
volumeBindingMode: Immediate
EOF
portworx-watson-assistant Watson Assistant
# Watson Assistant - This was previously named portworx-assitant 
cat <<EOF | oc create -f -
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  name: portworx-watson-assistant-sc
parameters:
   repl: "3"
   priority_io: "high"
   io_profile: "db_remote"
   block_size: "64k"
   disable_io_profile_protection: "1"
allowVolumeExpansion: true
provisioner: kubernetes.io/portworx-volume
reclaimPolicy: Retain
volumeBindingMode: Immediate
EOF
portworx-db2-fci-sc Financial Crimes Insight®
# FCI DB2 Metastore
cat <<EOF | oc create -f -
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  name: portworx-db2-fci-sc
provisioner: kubernetes.io/portworx-volume
allowVolumeExpansion: true
reclaimPolicy: Retain
volumeBindingMode: Immediate
parameters:
  block_size: 512b
  io_profile: db_remote
  priority_io: high
  repl: "3"
  disable_io_profile_protection: "1"
EOF