Production environment kubernetes cluster installation and deployment-1.15.3
Version introduction NAME VERSION INTERNAL-IP cnvs-kubm-101-103 v1.15.3 172.20.101.103 OS-IMAGE KERNEL-VERSION CONTAINER-RUNTIMECentOS Linux 7 (Core) 5.2.9-1.el7.elrepo.x86_64 docker://18.6.1 Project address: https://gitlab.com/PtmindDev/devops/kub- Deploy/tree/cn-k8s-prod Branch: introduction to cn-k8s-prod Cluster # master [kub-m] 172.20.101.103 name=cnvskubm-101-103 172.20.101.104 name=cnvskubm-101-104 172.20.101.105 name=cnvskubm-101-105 # node [kub-n] 172.20.101.106 name=cnvs-kubnode-101-106 172.20.101.107 name=cnvs-kubnode-101-107172.20.101.108 name=cnvs-kubnode-101-108172.20.101.118 name=cnvs -kubnode-101-118172.20.101.120 name=cnvs-kubnode-101-120172.20.101.122 name=cnvs-kubnode-101-122172.20.101.123 name=cnvs-kubnode-101-123172.20.101.124 name=cnvs-kubnode-101-124ansible installation environment: cd / workspace/kub-deploy/roles1: upgrade kernel-on-demand ansible-playbook 1-kernelup.yaml verification effect
Ansible kub-all-a "uname-a"
Linux kubm-01 5.2.9-1.el7.elrepo.x86_64 # 1 SMP Fri Aug 16 08:17:55 EDT 2019 x86 "64 GNU/Linux system initialization ansible-playbook 2-basic.yml# specifies one of the runs separately: ansible-playbook-I / etc/ansible/hosts 2-basic.yml-- limit 172.20.101.103 install nginxansible-playbook 3-nginx.yaml Verification # version [root@kubm-01 roles] # ansible Kub-m-a "nginx-v" 172.20.101.103 | CHANGED | rc=0 > > nginx version: nginx/1.16.1....# port ansible kub-m-m shell-a "lsof-n-iCHANGED 16443" 172.20.101.103 | CHANGED | rc=0 > > COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAMEnginx 21392 root 5u IPv4 434526 0t0 TCP *: 16443 (LISTEN). Installation of keepalivedansible-playbook 4-keepalived.yml returned * ok: [172.20.101.103] = > {"output.stdout_lines": ["inet 172.20.101.253 32 scope global eth0"] .ok: [172.20.101.105] = > {"output.stdout_lines": []} Monitoring vip [root @ kubm-01 roles] # ping 172. 20.101.253PING 172.20.101.253 (172.20.101.253) 56 (84) bytes of data.64 bytes from 172.20.101.253: icmp_seq=1 ttl=64 time=0.059 ms new installation and deployment directory mkdir-p / etc/kubeinstallcd / etc/kubeinstall create an initial initialization file (kubm-01 execution)
The flannel network plug-in I use needs to configure the network parameter-pod-network-cidr=10.244.0.0/16.
Cat