Open 13567436138 opened 1 month ago
[WARNING]: Failed to parse /conf/hosts.yml with auto plugin: We were unable to read either as JSON nor YAML, these are the errors we got from each: JSON: Expecting value: line 1 column 1 (char 0) Syntax Error while loading YAML. could not find expected ':' The error appears to be in '/conf/hosts.yml': line 47, column 5, but may be elsewhere in the file depending on the exact syntax problem. The offending line appears to be: node3 k8s_cluster: ^ here [WARNING]: Failed to parse /conf/hosts.yml with yaml plugin: We were unable to read either as JSON nor YAML, these are the errors we got from each: JSON: Expecting value: line 1 column 1 (char 0) Syntax Error while loading YAML. could not find expected ':' The error appears to be in '/conf/hosts.yml': line 47, column 5, but may be elsewhere in the file depending on the exact syntax problem. The offending line appears to be: node3 k8s_cluster: ^ here
A colon( : ) is missing.
root@k8s-master01:~/kubean/examples/install/2.mirror# cat HostsConfCM.yml
cat > HostsConfCM.yml <<EOF
# Copyright 2023 Authors of kubean-io
# SPDX-License-Identifier: Apache-2.0
apiVersion: v1
kind: ConfigMap
metadata:
name: online-hosts-conf
namespace: kubean-system
data:
hosts.yml: |
all:
hosts:
node1:
ip: 192.168.229.180
access_ip: 192.168.229.180
ansible_host: 192.168.229.180
ansible_connection: ssh
ansible_user: root
ansible_password: mark
node2:
ip: 192.168.229.181
access_ip: 192.168.229.181
ansible_host: 192.168.229.181
ansible_connection: ssh
ansible_user: root
ansible_password: mark
node3:
ip: 192.168.229.182
access_ip: 192.168.229.182
ansible_host: 192.168.229.182
ansible_connection: ssh
ansible_user: root
ansible_password: mark
node4:
ip: 192.168.229.183
access_ip: 192.168.229.183
ansible_host: 192.168.229.183
ansible_connection: ssh
ansible_user: root
ansible_password: mark
children:
kube_control_plane:
hosts:
node1:
node2:
kube_node:
hosts:
node1:
node2:
node3:
node4:
etcd:
hosts:
node1:
node2:
node3 <------ here
k8s_cluster:
children:
kube_control_plane:
kube_node:
calico_rr:
hosts: {}
EOF
Describe the version version about:
Describe the bug A clear and concise description of what the bug is.
How To Reproduce Steps to reproduce the issue:
Expected behavior A clear and concise description of what you expected to happen.
Screenshots and log If applicable, add screenshots and log to help explain your problem.
Additional context Add any other context about the problem here.