Open tomorrrow666 opened 3 weeks ago
@tomorrrow666 是否方便把 config-k8s-ha.yml 去掉敏感信息上传?
@tomorrrow666 可能文档没有说清楚,yaml里的$开头的都是一些变量,可以认为文档提供的这个yaml只是一个模板,在使用时需要把这些变量替换为您的场景的实际的值。比如PRIMARY_IP是高可用主节点的IP地址。
@tomorrrow666 把yaml文件里的变量替换成上面的值,然后再运行ocboot
主机名改成这几个? k8s primary k8s master 1 k8s master 2 DB 有空格么?
但是还有其他yml文件也用了$变量了,
TASK [primary-master-node/setup_k8s : Use ocadm init first master node] **** fatal: [192.168.231.132]: FAILED! => {"changed": true, "cmd": "/opt/yunion/bin/ocadm init --control-plane-endpoint 192.168.230.1:6443 --mysql-host 192.168.231.136 --mysql-user root --mysql-password 0neC1oudDb# --mysql-port 3306 --image-repository registry.cn-beijing.aliyuncs.com/yunion --apiserver-advertise-address 192.168.231.132 --node-ip 192.168.231.132 --host-networks ens33/br0/192.168.231.132 --enable-hugepage --onecloud-version v3.11.6 --operator-version v3.11.6 --pod-network-cidr 10.40.0.0/16 --service-cidr 10.96.0.0/12 --service-dns-domain cluster.local --addon-calico-ip-autodetection-method can-reach=192.168.231.132 --high-availability-vip 192.168.230.1 --keepalived-version-tag v2.0.25 --enable-host-agent\n", "delta": "0:00:00.055953", "end": "2024-08-22 14:59:14.427135", "msg": "non-zero return code", "rc": 1, "start": "2024-08-22 14:59:14.371182", "stderr": "error execution phase preflight: [preflight] Some fatal errors occurred:\n\t[ERROR Mysql]: show grants for root@%: Error 1130: Host '192.168.231.132' is not allowed to connect to this MariaDB server\n[preflight] If you know what you are doing, you can make a check non-fatal with
--ignore-preflight-errors=...
", "stderr_lines": ["error execution phase preflight: [preflight] Some fatal errors occurred:", "\t[ERROR Mysql]: show grants for root@%: Error 1130: Host '192.168.231.132' is not allowed to connect to this MariaDB server", "[preflight] If you know what you are doing, you can make a check non-fatal with--ignore-preflight-errors=...
"], "stdout": "[init] Using Kubernetes and Onecloud version: v1.15.8 & v3.11.6\n[preflight] Running pre-flight checks", "stdout_lines": ["[init] Using Kubernetes and Onecloud version: v1.15.8 & v3.11.6", "[preflight] Running pre-flight checks"]}