Install kubectl Gluster plugin in one of the Kubernetes Master nodes using pip3 install kubectl-gluster.

Prepare the configuration file as required to deploy GlusterCS.

# File: mycluster.yaml
---
namespace: gcs
cluster-size: 3
nodes:
    - address: kube1
      devices: ["/dev/vdc"]

    - address: kube2
      devices: ["/dev/vdc"]

    - address: kube3
      devices: ["/dev/vdc"]

Where,

namespace    - Cluster namespace, useful when managing multiple
               clusters(Default is "gcs")
cluster-size - Number of nodes in Gluster cluster. Currently only 3
               nodes are supported.
nodes        - Details of nodes where Gluster server pods needs to be
               deployed.
address      - Address of node as listed in kubectl get nodes(Use
               `kubectl get nodes` to get the address)
devices      - Raw devices which are required to auto provision
               Gluster bricks during Volume create

Run the following command to deploy the GlusterCS cluster on an already running kubernetes cluster.

kubectl gluster deploy mycluster.yaml

Note: Run kubectl-gluster if kubectl version is less than v1.13

To test whether the deployment was successfull or not, you can run kubectl get pods -n <namespace> command on the master node. For example,

kubectl get pods -n gcs

All the pods should be in Running state.

To remove GlusterCS setup, run kubectl delete namespace <namespace>. For example,

kubectl delete namespace gcs

More details about installing Kubernetes and GlusterCS is documented here