-
Choerodon平台版本: 0.18
-
遇到问题的执行步骤:
Kubernetes集群部署:ansible-playbook -i inventory/hosts -e @inventory/vars cluster.yml -K
- 文档地址:
http://choerodon.io/zh/docs/installation-configuration/steps/kubernetes/ - 环境信息(如:节点信息):
------------------hzkj_zcy_master1------------------------------
ip 192.168.99.123
centos7.5
docker 18.09.0
docker-compose 1.23.1
12c/17000MB 600GB
------------------hzkj_zcy_node1------------------------------
ip 192.168.55.25
centos7.5
docker 18.09.0
docker-compose 1.23.1
12c/17000MB 150GB
------------------hzkj_zcy_node2------------------------------
ip 192.168.55.35
centos7.5
docker 18.09.0
docker-compose 1.23.1
12c/17000MB 150GB
------------------hzkj_zcy_node3------------------------------
ip 192.168.55.145
centos7.5
docker 18.09.0
docker-compose 1.23.1
12c/17000MB 150GB
------------------hzkj_zcy_node4------------------------------
ip 192.168.55.65
centos7.5
docker 18.09.0
docker-compose 1.23.1
12c/17000MB 150GB
所有节点:
0.docker自启
systemctl enable docker
systemctl restart docker
1.关闭防火墙(生产环境不关闭防火墙,开放相应端口即可)
systemctl stop firewalld
systemctl disable firewalld
2.关闭swap分区
sudo swapoff -a
#要永久禁掉swap分区,打开如下文件注释掉swap那一行 (需要注释)
sudo vi /etc/fstab
3.同步服务器时区
yum install ntp ntpdate -y
timedatectl status
timedatectl list-timezones | grep Shanghai
timedatectl set-timezone Asia/Hong_Kong
timedatectl set-ntp yes
date
4.关闭SELinux
setenforce 0
sed -i ‘s/^SELINUX=enforcing$/SELINUX=permissive/’ /etc/selinux/config
4.改host(可不改) & hostname
vi /etc/hosts
vi /etc/hostname
5.ip调整策略
#vi /etc/sysctl.conf
net.ipv4.ip_forward = 1
net.bridge.bridge-nf-call-iptables = 1
net.bridge.bridge-nf-call-ip6tables = 1
#sysctl -p
6.重启
reboot
或者
init 6
- 报错日志:
TASK [base/prepare : Download cfssl] *******************************************************************************************************************************************************************************************************
Monday 05 August 2019 17:42:01 +0800 (0:00:00.563) 0:00:22.201 *********
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: SSLError: (‘The read operation timed out’,)
fatal: [hzkj_zcy_node2]: FAILED! => {“changed”: false, “msg”: “failed to create temporary content file: (‘The read operation timed out’,)”}
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: SSLError: (‘The read operation timed out’,)
fatal: [hzkj_zcy_node1]: FAILED! => {“changed”: false, “msg”: “failed to create temporary content file: (‘The read operation timed out’,)”}
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: SSLError: (‘The read operation timed out’,)
fatal: [hzkj_zcy_master1]: FAILED! => {“changed”: false, “msg”: “failed to create temporary content file: (‘The read operation timed out’,)”}
NO MORE HOSTS LEFT *************************************************************************************************************************************************************************************************************************
to retry, use: --limit @/root/kubeadm-ansible/cluster.retry
PLAY RECAP *********************************************************************************************************************************************************************************************************************************
hzkj_zcy_master1 : ok=33 changed=11 unreachable=0 failed=1
hzkj_zcy_node1 : ok=32 changed=11 unreachable=0 failed=1
hzkj_zcy_node2 : ok=32 changed=11 unreachable=0 failed=1
hzkj_zcy_node3 : ok=31 changed=11 unreachable=0 failed=0
hzkj_zcy_node4 : ok=31 changed=11 unreachable=0 failed=0
Monday 05 August 2019 17:42:44 +0800 (0:00:43.167) 0:01:05.369 *********
base/prepare : Download cfssl ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 43.17s
base/prepare : iptables accept all traffic from other node -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 2.00s
base/prepare : iptables output all traffic from other node -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 1.86s
base/prepare : Create kubernetes directories ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 1.37s
base/prepare : Assign inventory name to hostnames ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 1.24s
base/prepare : Ensure sysctl config ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 0.96s
base/prepare : Persist br_netfilter module ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 0.94s
base/prepare : Hosts | populate inventory into hosts file --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 0.86s
base/prepare : Create cni directories ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 0.84s
base/prepare : set timezone to Asia/ShangHai ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 0.75s
base/prepare : Hosts | localhost ipv4 in hosts file --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 0.61s
base/prepare : sysctl set net.ipv4.ip_forward=1 ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 0.59s
base/prepare : Hosts | localhost ipv6 in hosts file --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 0.57s
base/prepare : Ensure Yum repository ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 0.56s
base/prepare : Check presence of fastestmirror.conf --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 0.56s
base/prepare : iptables forward all traffic from other node ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 0.55s
base/prepare : Verify if br_netfilter module exists --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 0.54s
base/prepare : iptables output all traffic from kube pod subnet --------------------------------------------------------------------------------------------------------------------------------------------------------------------- 0.53s
- 原因分析:
提出您分析问题的过程,以便我们能更准确的找到问题所在
每个节点本身就初始安装了docker docker-compose,有没有是这方面的问题;再就是网络问题,访问官网过慢? - 疑问:
提出您对于遇到和解决该问题时的疑问