配置好的config-sample.yaml如下:
`apiVersion: kubekey.kubesphere.io/v1alpha1
kind: Cluster
metadata:
name: sample
spec:
hosts:
- {name: kubesphere, address: 10.123.149.2, internalAddress: 10.123.149.2, user: root, password: xx@xxxx}
roleGroups:
etcd:
- kubesphere
master:
- kubesphere
worker:
- kubesphere
controlPlaneEndpoint:
domain: lb.kubesphere.local
address: ""
port: 6443
kubernetes:
version: v1.20.4
imageRepo: kubesphere
clusterName: cluster.local
network:
plugin: calico
kubePodsCIDR: 10.233.64.0/18
kubeServiceCIDR: 10.233.0.0/18
registry:
registryMirrors: []
insecureRegistries: []
privateRegistry: docker.faway.com
addons: []
—
apiVersion: installer.kubesphere.io/v1alpha1
kind: ClusterConfiguration
metadata:
name: ks-installer
namespace: kubesphere-system
labels:
version: v3.1.0
spec:
persistence:
storageClass: ""
authentication:
jwtSecret: ""
zone: ""
local_registry: ""
etcd:
monitoring: false
endpointIps: localhost
port: 2379
tlsEnable: true
common:
redis:
enabled: false
redisVolumSize: 2Gi
openldap:
`
报错如下:
`[root@kubespere kubesphere]# ./kk create cluster -f ./config-sample.yaml
Error: Failed to download cluster config: Unable to unmarshal the given cluster configuration file: yaml: line 30: did not find expected key
Usage:
kk create cluster [flags]
Flags:
–download-cmd string The user defined command to download the necessary binary files. The first param ‘%s’ is output path, the second param ‘%s’, is the URL (default “curl -L -o %s %s”)
-f, –filename string Path to a configuration file
-h, –help help for cluster
–skip-pull-images Skip pre pull images
–with-kubernetes string Specify a supported version of kubernetes (default “v1.19.8”)
–with-kubesphere Deploy a specific version of kubesphere (default v3.1.0)
–with-local-storage Deploy a local PV provisioner
-y, –yes Skip pre-check of the installation
Global Flags:
–debug Print detailed information (default true)
–in-cluster Running inside the cluster
Failed to download cluster config: Unable to unmarshal the given cluster configuration file: yaml: line 30: did not find expected key
`
提示did not find expected key,是不是privateRegistry这个关键字有问题?请大神帮助