VMware vSphere Tanzu部署_08_配置tanzu为单节点
整体文章
VMware vSphere Tanzu部署_01_Tanzu架构设计
VMware vSphere Tanzu部署_02_ESXI系统安装
VMware vSphere Tanzu部署_03_vCenter部署
VMware vSphere Tanzu部署_04_vCenter管理esxi并迁移网卡到DSwitch
VMware vSphere Tanzu部署_05_vyos虚拟路由器部署
VMware vSphere Tanzu部署_06_haproxy部署
VMware vSphere Tanzu部署_07_tanzu存储策略配置
VMware vSphere Tanzu部署_08_配置tanzu为单节点
VMware vSphere Tanzu部署_09_配置tanzu内容库
VMware vSphere Tanzu部署_10_开启Tanzu功能
VMware vSphere Tanzu部署_11_创建TKC命名空间
VMware vSphere Tanzu部署_12_下载使用Tanzu-K8S工具
VMware vSphere Tanzu部署_13_创建TKC集群
VMware vSphere Tanzu部署_14_部署容器应用
VMware vSphere Tanzu部署_15_TKG Cluster获取永不过期Token
VMware vSphere Tanzu部署_16_TKC集群节点VM密码获取
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