简体   繁体   English

如何修补/编辑OpenEBS cStor SPC以更改max / minPools?

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

How to patch OpenEBS Storage Pool Claim(SPC) to change max/minPools. 如何修补OpenEBS存储池声明(SPC)以更改max / minPools。 For some reason it looks like kubectl patch doesn't support it. 由于某种原因,它看起来像kubectl补丁不支持它。

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. 如果为2,则必须在patch.yaml中提供所需数量的池副本数。 In this case, if you need to change to 3, you will need to do a JSON merge patch. 在这种情况下,如果需要更改为3,则需要做一个JSON合并补丁。 Following are the steps for patching StoragePoolClaim. 以下是修补StoragePoolClaim的步骤。

Step1: You need to create a YAML file named patch.yaml and add following content. 步骤1:您需要创建一个名为patch.yaml的YAML文件,并添加以下内容。

spec:
  maxPools:3

Step 2: Run the following command to do patch 步骤2:运行以下命令进行补丁

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM