Installing Portworx using Operator with Node / Storage specifics

This post shares various examples with which you can modify your Portworx Operator Cluster spec for node specific installation
Portworx Operator CRD Reference : StorageCluster

Cluster with Storage and Storageless nodes with a shared Data & Internal KVDB device

  • Make sure to label the nodes as given before applying the spec.
  • Nodes labeled as storage will use specific device /dev/sdb for data and KVDB both.
kind: StorageCluster
apiVersion: core.libopenstorage.org/v1
metadata:
  name: px-clusterlab-mixnodes
  namespace: kube-system
  annotations:
    portworx.io/install-source: "https://install.portworx.com/?operator=true&mc=false&kbver=&b=true&c=px-clusterlab-f791a220-92e1-435a-bca3-1037a8e46156&stork=true&st=k8s"
spec:
  image: portworx/oci-monitor:2.6.3
  imagePullPolicy: Always
  kvdb:
    internal: true
  nodes:
  - selector:
      labelSelector:
        matchLabels:
          px/storage: "storage"
    storage:
      devices:
      - /dev/sdb
  - selector:
      labelSelector:
        matchLabels:
          px/storage: "storageless"
    storage:
      devices: []
  secretsProvider: k8s
  stork:
    enabled: true
    args:
      webhook-controller: "false"
  autopilot:
    enabled: true
    providers:
    - name: default
      type: prometheus
      params:
        url: http://prometheus:9090

Cluster with Storage and Storageless nodes with dedicated Data and Internal KVDB devices

  • Make sure to label the nodes as given before applying the spec.
  • Nodes labeled as storage will use all available storage devices for storing data and /dev/sdc for KVDB seperately.
kind: StorageCluster
apiVersion: core.libopenstorage.org/v1
metadata:
  name: px-clusterlab-mixnodes
  namespace: kube-system
  annotations:
    portworx.io/install-source: "https://install.portworx.com/?operator=true&mc=false&kbver=&b=true&c=px-clusterlab-f791a220-92e1-435a-bca3-1037a8e46156&stork=true&st=k8s"
spec:
  image: portworx/oci-monitor:2.6.3
  imagePullPolicy: Always
  kvdb:
    internal: true
  nodes:
  - selector:
      labelSelector:
        matchLabels:
          px/storage: "storage"
    storage:
      useAll: true
      kvdbDevice: /dev/sdc
  - selector:
      labelSelector:
        matchLabels:
          px/storage: "storageless"
    storage:
      devices: []
  secretsProvider: k8s
  stork:
    enabled: true
    args:
      webhook-controller: "false"
  autopilot:
    enabled: true
    providers:
    - name: default
      type: prometheus
      params:
        url: http://prometheus:9090

Cluster with common specifics for all the nodes with Storage nodes with a dedicated KVDB device and StorageLess nodes.

kind: StorageCluster
apiVersion: core.libopenstorage.org/v1
metadata:
  name: px-clusterlab-mixnodes
  namespace: kube-system
  annotations:
    portworx.io/install-source: "https://install.portworx.com/?operator=true&mc=false&kbver=&b=true&c=px-clusterlab-f791a220-92e1-435a-bca3-1037a8e46156&stork=true&st=k8s"
spec:
  image: portworx/oci-monitor:2.6.3
  imagePullPolicy: Always
  kvdb:
    internal: true
  storage:
    useAll: true
    kvdbDevice: /dev/sdc
  nodes:
  - selector:
      labelSelector:
        matchLabels:
          px/storage: "storageless"
    storage:
      devices: []
  secretsProvider: k8s
  stork:
    enabled: true
    args:
      webhook-controller: "false"
  autopilot:
    enabled: true
    providers:
    - name: default
      type: prometheus
      params:
        url: http://prometheus:9090

Cluster with Storage and StorageLess nodes with specific Internal KVDB nodes.

  • Suitable if you are planning to have more than 3 Storage Nodes with internal KVDB.
  • Nodes with kvdbnode will become Storage Node with dedicated disk on each node.
  • Nodes with storageless will not consume any disks.
  • If any of the remaining nodes do not have the dedicated device for KVDB, they will become storage nodes without dedicated KVDB devices.
kind: StorageCluster
apiVersion: core.libopenstorage.org/v1
metadata:
  name: px-clusterlab-mixnodes
  namespace: kube-system
  annotations:
    portworx.io/install-source: "https://install.portworx.com/?operator=true&mc=false&kbver=&b=true&c=px-clusterlab-f791a220-92e1-435a-bca3-1037a8e46156&stork=true&st=k8s"
spec:
  image: portworx/oci-monitor:2.6.3
  imagePullPolicy: Always
  kvdb:
    internal: true
  storage:
    useAll: true
  nodes:
  - selector:
      labelSelector:
        matchLabels:
          px/storage: "kvdbnode"
    storage:
      useAll: true
      kvdbDevice: /dev/sdc
  - selector:
      labelSelector:
        matchLabels:
          px/storage: "storagelessnode"
    storage:
      devices: []
  secretsProvider: k8s
  stork:
    enabled: true
    args:
      webhook-controller: "false"
  autopilot:
    enabled: true
    providers:
    - name: default
      type: prometheus
      params:
        url: http://prometheus:9090
3 Likes