Skip to main content
Version: 3.1

Scale an Elasticsearch cluster with Portworx on Kubernetes

The following instructions explain how to scale an Elasticsearch cluster with Portworx on Kubernetes.

Portworx runs as a Disaggregated or Converged Deployment architectures model. When you add a new node to your Kubernetes cluster, Portworx will run on the node with the model you chose. Refer to Deployment architectures for Portworx for more details.

  1. Scale your Elasticsearch Cluster. Edit the Elasticsearch object and update spec.nodeSets.count to 4:

    kubectl -n elastic-system edit Elasticsearch
    elasticsearch.elasticsearch.k8s.elastic.co/elasticsearch edited
  2. List the associated pods to see the newly created Elasticsearch instance:

    watch kubectl -n elastic-system get pods --selector='elasticsearch.k8s.elastic.co/cluster-name=elasticsearch'
    NAME                      READY   STATUS    RESTARTS   AGE
    elasticsearch-es-node-0 1/1 Running 0 67m
    elasticsearch-es-node-1 1/1 Running 0 67m
    elasticsearch-es-node-2 1/1 Running 0 67m
    elasticsearch-es-node-3 1/1 Running 0 3m43s
  3. List Elasticsearch cluster nodes:

    kubectl exec elasticsearch-es-node-0 -n elastic-system -- curl -u "elastic:$ESPASSWORD"  -k "https://elasticsearch-es-http:9200/_cat/nodes?v"
    ip              heap.percent ram.percent cpu load_1m load_5m load_15m node.role   master name
    192.168.143.10 43 82 0 1.64 2.03 2.04 cdfhilmrstw - elasticsearch-es-node-2
    192.168.148.113 57 77 7 2.73 3.55 2.83 cdfhilmrstw - elasticsearch-es-node-3
    192.168.147.138 26 84 1 1.20 1.55 1.72 cdfhilmrstw - elasticsearch-es-node-0
    192.168.45.31 27 85 1 1.30 2.56 2.65 cdfhilmrstw * elasticsearch-es-node-1
  4. List Elasticsearch PVCs:

    kubectl -n elastic-system get pvc
    NAME                                         STATUS   VOLUME                                     CAPACITY   ACCESS MODES   STORAGECLASS   AGE
    elasticsearch-data-elasticsearch-es-node-0 Bound pvc-xxxxxxxx-xxxx-xxxx-xxxx-c7a3e5555f41 50Gi RWO px-csi-db 69m
    elasticsearch-data-elasticsearch-es-node-1 Bound pvc-xxxxxxxx-xxxx-xxxx-xxxx-d1e920903be2 50Gi RWO px-csi-db 69m
    elasticsearch-data-elasticsearch-es-node-2 Bound pvc-xxxxxxxx-xxxx-xxxx-xxxx-7f678ca8ba07 50Gi RWO px-csi-db 69m
    elasticsearch-data-elasticsearch-es-node-3 Bound pvc-xxxxxxxx-xxxx-xxxx-xxxx-8452579d08d4 50Gi RWO px-csi-db 5m52s
  5. List Elasticsearch Portworx volumes:

    kubectl exec $PX_POD -n <px-namespace> -- /opt/pwx/bin/pxctl volume list
    ID                      NAME                                            SIZE    HA      SHARED  ENCRYPTED       PROXY-VOLUME    IO_PRIORITY     STATUS                          SNAP-ENABLED
    876851488987433344 pvc-xxxxxxxx-xxxx-xxxx-xxxx-8452579d08d4 50 GiB 3 no no no LOW up - attached on 10.13.25.216 no
    12772348667588675 pvc-xxxxxxxx-xxxx-xxxx-xxxx-7f678ca8ba07 50 GiB 3 no no no LOW up - attached on 10.13.25.240 no
    1013728801369127826 pvc-xxxxxxxx-xxxx-xxxx-xxxx-d1e920903be2 50 GiB 3 no no no LOW up - attached on 10.13.25.29 no
    695731562422595940 pvc-xxxxxxxx-xxxx-xxxx-xxxx-c7a3e5555f41 50 GiB 3 no no no LOW up - attached on 10.13.25.229 no
Was this page helpful?