luole1060 / install_k8s_v1.13 Goto Github PK
View Code? Open in Web Editor NEW二进制部署 k8s 高可用集群
二进制部署 k8s 高可用集群
我采用了虚拟机的方式构建三台机器(centOS7)IP分别为(192.168.100.12, 192.168.100.13, 192.168.100.12),在部署flannel时候遇到问题。
三台机器均为active 的状态
192.168.100.14
Active: active (running) since 六 2019-04-13 11:27:31 CST; 2h 27min ago
192.168.100.12
Active: active (running) since 六 2019-04-13 11:27:32 CST; 2h 27min ago
192.168.100.13
Active: active (running) since 六 2019-04-13 11:27:32 CST; 2h 27min ago
但是
192.168.100.14
inet 172.30.61.0/32 scope global flannel.1
192.168.100.12
inet 172.30.100.0/32 scope global flannel.1
192.168.100.13
inet 172.30.38.0/32 scope global flannel.1
pod 分配了三个地址 分别为 172.30.61.0,172.30.100.0,172.30.38.0 其中172.30.61.0这个节点和其他不互通,剩下两个节点直接可以互通。pod不互通,之后的部署master等步骤完全无法进行。
K8s初学者,希望可以得到解答,多谢
192.168.100.14
inet 172.30.9.0/32 scope global flannel.1
192.168.100.12
inet 172.30.100.0/32 scope global flannel.1
192.168.100.13
inet 172.30.38.0/32 scope global flannel.1
192.168.100.14
tcp 0 0 0.0.0.0:8443 0.0.0.0:* LISTEN 14575/haproxy
tcp 0 0 0.0.0.0:10080 0.0.0.0:* LISTEN 14575/haproxy
192.168.100.12
tcp 0 0 0.0.0.0:8443 0.0.0.0:* LISTEN 16176/haproxy
tcp 0 0 0.0.0.0:10080 0.0.0.0:* LISTEN 16176/haproxy
192.168.100.13
tcp 0 0 0.0.0.0:8443 0.0.0.0:* LISTEN 4982/haproxy
tcp 0 0 0.0.0.0:10080 0.0.0.0:* LISTEN 4982/haproxy
[root@kube-node1 ~]# for node_ip in ${NODE_IPS[@]}; do echo ">>> ${node_ip}"; ssh root@${node_ip} "netstat -lnpt|grep haproxy"; done
192.168.100.14
tcp 0 0 0.0.0.0:8443 0.0.0.0:* LISTEN 14575/haproxy
tcp 0 0 0.0.0.0:10080 0.0.0.0:* LISTEN 14575/haproxy
192.168.100.12
tcp 0 0 0.0.0.0:8443 0.0.0.0:* LISTEN 16176/haproxy
tcp 0 0 0.0.0.0:10080 0.0.0.0:* LISTEN 16176/haproxy
192.168.100.13
tcp 0 0 0.0.0.0:8443 0.0.0.0:* LISTEN 4982/haproxy
tcp 0 0 0.0.0.0:10080 0.0.0.0:* LISTEN 4982/haproxy
do
echo ">>> ${node_ip}"
ssh root@${node_ip} "systemctl status keepalived|grep Active"
done192.168.100.14
Active: active (running) since 日 2019-04-14 10:26:32 CST; 14min ago
192.168.100.12
Active: active (running) since 日 2019-04-14 10:26:32 CST; 14min ago
192.168.100.13
Active: active (running) since 日 2019-04-14 10:26:31 CST; 14min ago
192.168.100.14
3: enp0s8: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 08:00:27:92:97:f8 brd ff:ff:ff:ff:ff:ff
inet 192.168.100.14/24 brd 192.168.100.255 scope global noprefixroute enp0s8
valid_lft forever preferred_lft forever
inet 172.27.129.253/32 scope global enp0s8
valid_lft forever preferred_lft forever
PING 172.27.129.253 (172.27.129.253) 56(84) bytes of data.
64 bytes from 172.27.129.253: icmp_seq=1 ttl=64 time=0.015 ms
--- 172.27.129.253 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.015/0.015/0.015/0.000 ms
192.168.100.12
3: enp0s8: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 08:00:27:96:68:b0 brd ff:ff:ff:ff:ff:ff
inet 192.168.100.12/24 brd 192.168.100.255 scope global noprefixroute enp0s8
valid_lft forever preferred_lft forever
PING 172.27.129.253 (172.27.129.253) 56(84) bytes of data.
--- 172.27.129.253 ping statistics ---
1 packets transmitted, 0 received, 100% packet loss, time 0ms
192.168.100.13
3: enp0s8: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 08:00:27:e3:78:10 brd ff:ff:ff:ff:ff:ff
inet 192.168.100.13/24 brd 192.168.100.255 scope global noprefixroute enp0s8
valid_lft forever preferred_lft forever
PING 172.27.129.253 (172.27.129.253) 56(84) bytes of data.
--- 172.27.129.253 ping statistics ---
1 packets transmitted, 0 received, 100% packet loss, time 0ms
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.