How to patch/edit OpenEBS cStor SPC to change max/minPools?

61 Views Asked by At

How to patch OpenEBS Storage Pool Claim(SPC) to change max/minPools. For some reason it looks like kubectl patch doesn’t support it.

1

There are 1 best solutions below

0
Ranjith Raveendran On

Before doing this activity, get the current pool replica count. If it is 2, you have to provide the required number of pool replica count in the patch.yaml. In this case, if you need to change to 3, you will need to do a JSON merge patch. Following are the steps for patching StoragePoolClaim.

Step1: You need to create a YAML file named patch.yaml and add following content.

spec:
  maxPools:3

Step 2: Run the following command to do patch

kubectl patch spc <spc_name> --type merge --patch "$(cat patch.yaml)"

Example:

kubectl patch spc cstor-sparse-pool --type merge --patch "$(cat patch.yaml)"

Following is an example output.

storagepoolclaim.openebs.io/cstor-sparse-pool patched