1.配置tanzu控制节点为单节点
1.1.修改控制节点数量参数
需要通过ssh登录vcenter,并进入bash shell
- 查看/etc/vmware/wcp/wcpsvc.yaml中控制节点数量
root@localhost [ ~ ]# sed -n '18,20p' /etc/vmware/wcp/wcpsvc.yaml
clusterconfig:
minmasters: 3
maxmasters: 3
root@localhost [ ~ ]#
- 修改控制节点最小和最大数量为1
sed -i 's#minmasters: 3#minmasters: 1#g' /etc/vmware/wcp/wcpsvc.yaml
sed -i 's#maxmasters: 3#maxmasters: 1#g' /etc/vmware/wcp/wcpsvc.yaml
- 查看修改后的配置
root@localhost [ ~ ]# sed -n '18,20p' /etc/vmware/wcp/wcpsvc.yaml
clusterconfig:
minmasters: 1
maxmasters: 1
root@localhost [ ~ ]#
1.2.修改控制节点磁盘模式为精简模式
- 默认情况下,磁盘类型为厚置备模式
root@localhost [ ~ ]# grep 'thick' /etc/vmware/wcp/wcpsvc.yaml
controlplane_vm_disk_provisioning: "thick"
- 修改thick为thin
sed -i 's#thick#thin#g' /etc/vmware/wcp/wcpsvc.yaml
- 确认配置已经修改
root@localhost [ ~ ]# grep 'thin' /etc/vmware/wcp/wcpsvc.yaml
# always disabled, and toggling this does not do anything.
controlplane_vm_disk_provisioning: "thin"
# The user takes a backup of VC => creates new namespaces => something catastrophic on VC happens and user uses the backup to restore VC
# => after restore, VC/WCP DB knows nothing about the namespaces; but the Kubernetes cluster still knows about them. In this scenario, we should create those missing namespaces in VC DB before
root@localhost [ ~ ]#
1.3.重启wcp服务
service-control --restart wcp