资源扩容 #
查看当前 cpu、mem 和磁盘资源情况
kubectl get sts/threenodes-masters -o yaml
resources:
requests:
cpu: "1"
memory: 3Gi
limits:
cpu: "1"
memory: 5Gi
resources:
requests:
storage: 30Gi
volumeMode: Filesystem
磁盘(磁盘扩容依赖于实际的 StorageClass,需要 StorageClass 本身支持扩容)
修改 Operator yaml 文件,执行 apply 操作
resources:
requests:
cpu: "1"
memory: 4Gi
limits:
cpu: "2"
memory: 6Gi
resources:
requests:
storage: 50Gi
滚动更新中: 从 threenodes-masters-0 开始更新
threenodes-masters-0 更新完毕后,依次更新 threenodes-masters-1、threenodes-masters-2
最终全部更新完毕
查看更新后的资源情况:
可以发现,结果与预期的一致