操作系统信息
虚拟机Centos7.9,4C/32G
Kubernetes版本信息
v1.21.5
。多节点安装
容器运行时
docker
KubeSphere版本信息
v3.2.0
问题是什么
先使用
./kk create config --with-kubernetes v1.21.5 --with-kubesphere v3.2.0
创建了配置文件config-sample.yaml,然后使用vim修改集群信息
config-sample.yaml
apiVersion: kubekey.kubesphere.io/v1alpha1
kind: Cluster
metadata:
name: sample
spec:
hosts:
- {name: node1, address: 172.25.113.174, internalAddress: 172.25.113.174, user: root, password: x1990?}
- {name: node2, address: 172.25.113.175, internalAddress: 172.25.113.175, user: root, password: x1990?}
- {name: node3, address: 172.25.113.176, internalAddress: 172.25.113.176, user: root, password: x1990?}
roleGroups:
etcd:
- node1
master:
- node1
worker:
- node2
- node3
controlPlaneEndpoint:
##Internal loadbalancer for apiservers
#internalLoadbalancer: haproxy
domain: lb.kubesphere.local
address: ""
port: 6443
kubernetes:
version: v1.21.5
clusterName: cluster.local
network:
plugin: calico
kubePodsCIDR: 10.233.64.0/18
kubeServiceCIDR: 10.233.0.0/18
registry:
registryMirrors: []
insecureRegistries: []
addons: []
# ./kk create cluster -f config-sample.yaml
[root@master ~]# ./kk create cluster -f config-sample.yaml
Error: Failed to download cluster config: Unable to unmarshal the given cluster configuration file: yaml: line 6: did not find expected ‘,’ or ‘}’
已经检查了无数次,确定只是修改主机和IP,检查了tab和空格问题,检查了yaml的缩进问题,还是搞不定呢