k8s 网络原理

CLUSTER CIDR

pod网络

[root@172-17-98-9 ~]# kubectl get pod -A -o wide
NAMESPACE     NAME                                          READY   STATUS    RESTARTS   AGE   IP            NODE          NOMINATED NODE   READINESS GATES
default       test-nginx-554cf4fd85-k4969                   1/1     Running   2          27h   172.20.0.35   172.17.98.9   <none>           <none>
default       test-nginx-554cf4fd85-vrh8d                   1/1     Running   2          27h   172.20.0.41   172.17.98.9   <none>           <none>
kube-system   coredns-65dbdb44db-dzdsb                      1/1     Running   3          47h   172.20.0.34   172.17.98.9   <none>           <none>
kube-system   dashboard-metrics-scraper-795b67bcfd-n58j6    1/1     Running   3          46h   172.20.0.40   172.17.98.9   <none>           <none>
kube-system   default-http-backend-6c7dd875c-smqzg          1/1     Running   2          26h   172.20.0.39   172.17.98.9   <none>           <none>
kube-system   kube-flannel-ds-arm64-qp9pm                   1/1     Running   3          47h   172.17.98.9   172.17.98.9   <none>           <none>
kube-system   kubernetes-dashboard-7cf666b9-7hqr9           1/1     Running   213        27h   172.20.0.38   172.17.98.9   <none>           <none>
kube-system   metrics-server-854d95976b-bbftp               1/1     Running   212        27h   172.20.0.37   172.17.98.9   <none>           <none>
kube-system   traefik-ingress-controller-74767b894f-j7knc   1/1     Running   2          26h   172.20.0.36   172.17.98.9   <none>           <none>

cni,flannel

[root@172-17-98-9 ~]# ifconfig
cni0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1450
        inet 172.20.0.1  netmask 255.255.255.0  broadcast 172.20.0.255
        inet6 fe80::5ce1:dbff:feb2:e7f7  prefixlen 64  scopeid 0x20<link>
        ether 5e:e1:db:b2:e7:f7  txqueuelen 1000  (Ethernet)
        RX packets 395287  bytes 31126013 (29.6 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 342572  bytes 62299113 (59.4 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

docker0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 172.18.0.1  netmask 255.255.0.0  broadcast 172.18.255.255
        inet6 fe80::42:d1ff:febd:2ac8  prefixlen 64  scopeid 0x20<link>
        ether 02:42:d1:bd:2a:c8  txqueuelen 0  (Ethernet)
        RX packets 579  bytes 22737 (22.2 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 590  bytes 33080 (32.3 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

enp1s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 172.17.98.9  netmask 255.255.0.0  broadcast 172.17.255.255
        ether fa:2c:2a:00:51:00  txqueuelen 1000  (Ethernet)
        RX packets 234113  bytes 36092942 (34.4 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 89450  bytes 11655824 (11.1 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

flannel.1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1450
        inet 172.20.0.0  netmask 255.255.255.255  broadcast 0.0.0.0
        inet6 fe80::9487:dfff:fe27:c5a7  prefixlen 64  scopeid 0x20<link>
        ether 96:87:df:27:c5:a7  txqueuelen 0  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 35 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 11230894  bytes 2352420704 (2.1 GiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 11230894  bytes 2352420704 (2.1 GiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

veth0afa8117: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1450
        inet6 fe80::d4cb:4aff:fe7e:3113  prefixlen 64  scopeid 0x20<link>
        ether 02:f2:e0:dd:ca:bd  txqueuelen 0  (Ethernet)
        RX packets 186741  bytes 15556399 (14.8 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 159523  bytes 23923778 (22.8 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

veth0b900412: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1450
        inet6 fe80::60c1:2fff:fe53:e82e  prefixlen 64  scopeid 0x20<link>
        ether 5e:4f:62:20:a2:f0  txqueuelen 0  (Ethernet)
        RX packets 36389  bytes 5312215 (5.0 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 35193  bytes 9345712 (8.9 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

veth433aab1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet6 fe80::84fa:cbff:feae:8dd5  prefixlen 64  scopeid 0x20<link>
        ether 86:fa:cb:ae:8d:d5  txqueuelen 0  (Ethernet)
        RX packets 579  bytes 30843 (30.1 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 624  bytes 35536 (34.7 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

veth55e24967: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1450
        inet6 fe80::6847:5eff:fe4c:f23d  prefixlen 64  scopeid 0x20<link>
        ether 72:6e:b0:93:a8:3e  txqueuelen 0  (Ethernet)
        RX packets 41973  bytes 4015658 (3.8 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 44462  bytes 5024956 (4.7 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

veth56cb30be: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1450
        inet6 fe80::8c24:13ff:fe23:9294  prefixlen 64  scopeid 0x20<link>
        ether 8e:24:13:23:92:94  txqueuelen 0  (Ethernet)
        RX packets 114178  bytes 8307228 (7.9 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 83992  bytes 20414060 (19.4 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

veth572efd9e: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1450
        inet6 fe80::1083:28ff:fe3d:97f8  prefixlen 64  scopeid 0x20<link>
        ether aa:5b:ac:c3:7f:b7  txqueuelen 0  (Ethernet)
        RX packets 543  bytes 40982 (40.0 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 882  bytes 1402616 (1.3 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

veth6c73861: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet6 fe80::a4ab:4bff:fe08:55bd  prefixlen 64  scopeid 0x20<link>
        ether a6:ab:4b:08:55:bd  txqueuelen 0  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 19  bytes 1430 (1.3 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

veth95f94636: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1450
        inet6 fe80::780e:edff:fe9c:9f45  prefixlen 64  scopeid 0x20<link>
        ether fa:bc:fd:1c:71:30  txqueuelen 0  (Ethernet)
        RX packets 13  bytes 1058 (1.0 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 231  bytes 16902 (16.5 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

vethefab9cf0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1450
        inet6 fe80::8427:c6ff:fea5:265a  prefixlen 64  scopeid 0x20<link>
        ether c2:0a:b2:69:71:4b  txqueuelen 0  (Ethernet)
        RX packets 17  bytes 1040 (1.0 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 223  bytes 16444 (16.0 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

vethffd512a8: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1450
        inet6 fe80::38ee:2bff:fe1c:a3  prefixlen 64  scopeid 0x20<link>
        ether 82:b6:50:4b:48:74  txqueuelen 0  (Ethernet)
        RX packets 15467  bytes 3429921 (3.2 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 19614  bytes 2268571 (2.1 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

查看宿主服务器网桥

yum install -y bridge-utils
[root@172-17-98-9 ~]# brctl show
bridge name	bridge id		STP enabled	interfaces
cni0		8000.5ee1dbb2e7f7	no		veth0afa8117
							veth0b900412
							veth55e24967
							veth56cb30be
							veth572efd9e
							veth95f94636
							vethefab9cf0
							vethffd512a8
docker0		8000.0242d1bd2ac8	no		veth433aab1
							veth6c73861

[root@172-17-98-9 ~]# ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: enp1s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000
    link/ether fa:2c:2a:00:51:00 brd ff:ff:ff:ff:ff:ff
3: docker0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default 
    link/ether 02:42:d1:bd:2a:c8 brd ff:ff:ff:ff:ff:ff
7: veth433aab1@if6: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master docker0 state UP mode DEFAULT group default 
    link/ether 86:fa:cb:ae:8d:d5 brd ff:ff:ff:ff:ff:ff link-netnsid 1
8: kube-ipvs0: <BROADCAST,NOARP> mtu 1500 qdisc noop state DOWN mode DEFAULT group default 
    link/ether 32:c1:50:57:44:52 brd ff:ff:ff:ff:ff:ff
9: flannel.1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1450 qdisc noqueue state UNKNOWN mode DEFAULT group default 
    link/ether 96:87:df:27:c5:a7 brd ff:ff:ff:ff:ff:ff
10: cni0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1450 qdisc noqueue state UP mode DEFAULT group default qlen 1000
    link/ether 5e:e1:db:b2:e7:f7 brd ff:ff:ff:ff:ff:ff
11: veth0afa8117@if3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1450 qdisc noqueue master cni0 state UP mode DEFAULT group default 
    link/ether 02:f2:e0:dd:ca:bd brd ff:ff:ff:ff:ff:ff link-netnsid 2
12: veth95f94636@if3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1450 qdisc noqueue master cni0 state UP mode DEFAULT group default 
    link/ether fa:bc:fd:1c:71:30 brd ff:ff:ff:ff:ff:ff link-netnsid 3
13: veth56cb30be@if3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1450 qdisc noqueue master cni0 state UP mode DEFAULT group default 
    link/ether 8e:24:13:23:92:94 brd ff:ff:ff:ff:ff:ff link-netnsid 4
14: veth0b900412@if3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1450 qdisc noqueue master cni0 state UP mode DEFAULT group default 
    link/ether 5e:4f:62:20:a2:f0 brd ff:ff:ff:ff:ff:ff link-netnsid 5
15: vethffd512a8@if3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1450 qdisc noqueue master cni0 state UP mode DEFAULT group default 
    link/ether 82:b6:50:4b:48:74 brd ff:ff:ff:ff:ff:ff link-netnsid 6
16: veth572efd9e@if3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1450 qdisc noqueue master cni0 state UP mode DEFAULT group default 
    link/ether aa:5b:ac:c3:7f:b7 brd ff:ff:ff:ff:ff:ff link-netnsid 7
17: veth55e24967@if3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1450 qdisc noqueue master cni0 state UP mode DEFAULT group default 
    link/ether 72:6e:b0:93:a8:3e brd ff:ff:ff:ff:ff:ff link-netnsid 8
18: vethefab9cf0@if3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1450 qdisc noqueue master cni0 state UP mode DEFAULT group default 
    link/ether c2:0a:b2:69:71:4b brd ff:ff:ff:ff:ff:ff link-netnsid 9
22: veth6c73861@if21: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master docker0 state UP mode DEFAULT group default 
    link/ether a6:ab:4b:08:55:bd brd ff:ff:ff:ff:ff:ff link-netnsid 0

进入test-nginx-554cf4fd85-k4969

[root@172-17-98-9 ~]# kubectl exec -it test-nginx-554cf4fd85-k4969 -- /bin/sh
/ #

查看pod内部网络信息

/ # cat /sys/class/net/eth0/iflink 
12
/ # ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
3: eth0@if12: <BROADCAST,MULTICAST,UP,LOWER_UP,M-DOWN> mtu 1450 qdisc noqueue state UP 
    link/ether 0e:4d:cf:c4:d0:74 brd ff:ff:ff:ff:ff:ff
    inet 172.20.0.35/24 brd 172.20.0.255 scope global eth0
       valid_lft forever preferred_lft forever
/ # ifconfig
eth0      Link encap:Ethernet  HWaddr 0E:4D:CF:C4:D0:74  
          inet addr:172.20.0.35  Bcast:172.20.0.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1450  Metric:1
          RX packets:231 errors:0 dropped:0 overruns:0 frame:0
          TX packets:13 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:16902 (16.5 KiB)  TX bytes:1058 (1.0 KiB)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

可以看到该pod对应宿主服务器网桥veth95f94636(参考:12: veth95f94636@if3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1450 qdisc noqueue master cni0 state UP mode DEFAULT group default

veth95f94636挂载在网络设备cni0上

cni0网络信息

cni0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1450
        inet 172.20.0.1  netmask 255.255.255.0  broadcast 172.20.0.255
        inet6 fe80::5ce1:dbff:feb2:e7f7  prefixlen 64  scopeid 0x20<link>
        ether 5e:e1:db:b2:e7:f7  txqueuelen 1000  (Ethernet)
        RX packets 395287  bytes 31126013 (29.6 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 342572  bytes 62299113 (59.4 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

查看路由

/ # route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         172.20.0.1      0.0.0.0         UG    0      0        0 eth0
172.20.0.0      0.0.0.0         255.255.255.0   U     0      0        0 eth0
172.20.0.0      172.20.0.1      255.255.0.0     UG    0      0        0 eth0
/ # ip route
default via 172.20.0.1 dev eth0 
172.20.0.0/24 dev eth0 scope link  src 172.20.0.35 
172.20.0.0/16 via 172.20.0.1 dev eth0 

查看test-nginx-554cf4fd85-vrh8d

[root@172-17-98-9 ~]# kubectl exec -it test-nginx-554cf4fd85-vrh8d -- /bin/sh
/ # cat /sys/class/net/eth0/iflink 
18
/ # ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
3: eth0@if18: <BROADCAST,MULTICAST,UP,LOWER_UP,M-DOWN> mtu 1450 qdisc noqueue state UP 
    link/ether 62:40:4f:46:dc:1b brd ff:ff:ff:ff:ff:ff
    inet 172.20.0.41/24 brd 172.20.0.255 scope global eth0
       valid_lft forever preferred_lft forever

对应ip link

18: vethefab9cf0@if3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1450 qdisc noqueue master cni0 state UP mode DEFAULT group default
    link/ether c2:0a:b2:69:71:4b brd ff:ff:ff:ff:ff:ff link-netnsid 9

 

分析出同服务器两个pod将通讯链路

test-nginx-554cf4fd85-k4969(ip:172.20.0.35) -- eth0 -- eth0@if12 -- 宿主veth95f94636 -- 宿主cni0 -- 宿主vethefab9cf0 -- eth0@if18 -- eth0 -- test-nginx-554cf4fd85-vrh8d(172.20.0.41)

 

SERVICE CIDR(ipvs)

[root@172-17-98-9 ~]# kubectl get svc -A -o wide
NAMESPACE     NAME                        TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)                       AGE   SELECTOR
default       kubernetes                  ClusterIP   10.68.0.1       <none>        443/TCP                       2d    <none>
default       test-nginx                  ClusterIP   10.68.131.114   <none>        80/TCP                        28h   app=test-nginx
kube-system   dashboard-metrics-scraper   ClusterIP   10.68.146.165   <none>        8000/TCP                      47h   k8s-app=dashboard-metrics-scraper
kube-system   default-http-backend        ClusterIP   10.68.231.113   <none>        80/TCP                        27h   app=default-http-backend
kube-system   kube-dns                    ClusterIP   10.68.0.2       <none>        53/UDP,53/TCP,9153/TCP        2d    k8s-app=kube-dns
kube-system   kubernetes-dashboard        NodePort    10.68.33.10     <none>        443:28360/TCP                 47h   k8s-app=kubernetes-dashboard
kube-system   metrics-server              ClusterIP   10.68.210.89    <none>        443/TCP                       47h   k8s-app=metrics-server
kube-system   traefik-ingress-service     NodePort    10.68.194.124   <none>        80:23456/TCP,8080:25376/TCP   27h   k8s-app=traefik-ingress-lb
kube-system   traefik-svc                 ClusterIP   10.68.43.190    <none>        80/TCP,443/TCP,8080/TCP       29h   app=traefik

宿主服务器安装ipvsadm

yum install -y ipvsadm

查看宿主服务器nat

[root@172-17-98-9 ~]# iptables -L -n -v -t nat
Chain PREROUTING (policy ACCEPT 37 packets, 1666 bytes)
 pkts bytes target     prot opt in     out     source               destination         
22892 1282K KUBE-SERVICES  all  --  *      *       0.0.0.0/0            0.0.0.0/0            /* kubernetes service portals */

Chain INPUT (policy ACCEPT 21 packets, 1026 bytes)
 pkts bytes target     prot opt in     out     source               destination         

Chain OUTPUT (policy ACCEPT 10 packets, 600 bytes)
 pkts bytes target     prot opt in     out     source               destination         
 9409  568K KUBE-SERVICES  all  --  *      *       0.0.0.0/0            0.0.0.0/0            /* kubernetes service portals */

Chain POSTROUTING (policy ACCEPT 10 packets, 600 bytes)
 pkts bytes target     prot opt in     out     source               destination         
 9421  569K KUBE-POSTROUTING  all  --  *      *       0.0.0.0/0            0.0.0.0/0            /* kubernetes postrouting rules */
 8366  502K RETURN     all  --  *      *       172.20.0.0/16        172.20.0.0/16       
    3   196 MASQUERADE  all  --  *      *       172.20.0.0/16       !224.0.0.0/4          random-fully
    0     0 RETURN     all  --  *      *      !172.20.0.0/16        172.20.0.0/24       
    0     0 MASQUERADE  all  --  *      *      !172.20.0.0/16        172.20.0.0/16        random-fully

Chain KUBE-FIREWALL (0 references)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 KUBE-MARK-DROP  all  --  *      *       0.0.0.0/0            0.0.0.0/0           

Chain KUBE-KUBELET-CANARY (0 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain KUBE-LOAD-BALANCER (0 references)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 KUBE-MARK-MASQ  all  --  *      *       0.0.0.0/0            0.0.0.0/0           

Chain KUBE-MARK-DROP (1 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain KUBE-MARK-MASQ (3 references)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 MARK       all  --  *      *       0.0.0.0/0            0.0.0.0/0            MARK or 0x4000

Chain KUBE-NODE-PORT (1 references)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 KUBE-MARK-MASQ  tcp  --  *      *       0.0.0.0/0            0.0.0.0/0            /* Kubernetes nodeport TCP port for masquerade purpose */ match-set KUBE-NODE-PORT-TCP dst

Chain KUBE-POSTROUTING (1 references)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 MASQUERADE  all  --  *      *       0.0.0.0/0            0.0.0.0/0            /* Kubernetes endpoints dst ip:port, source ip for solving hairpin purpose */ match-set KUBE-LOOP-BACK dst,dst,src
   10   600 RETURN     all  --  *      *       0.0.0.0/0            0.0.0.0/0            mark match ! 0x4000/0x4000
    0     0 MARK       all  --  *      *       0.0.0.0/0            0.0.0.0/0            MARK xor 0x4000
    0     0 MASQUERADE  all  --  *      *       0.0.0.0/0            0.0.0.0/0            /* kubernetes service traffic requiring SNAT */ random-fully

Chain KUBE-SERVICES (2 references)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 KUBE-MARK-MASQ  all  --  *      *      !172.20.0.0/16        0.0.0.0/0            /* Kubernetes service cluster ip + port for masquerade purpose */ match-set KUBE-CLUSTER-IP dst,dst
   20   948 KUBE-NODE-PORT  all  --  *      *       0.0.0.0/0            0.0.0.0/0            ADDRTYPE match dst-type LOCAL
    0     0 ACCEPT     all  --  *      *       0.0.0.0/0            0.0.0.0/0            match-set KUBE-CLUSTER-IP dst,dst

其中有

Chain KUBE-SERVICES (2 references)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 KUBE-MARK-MASQ  all  --  *      *      !172.20.0.0/16        0.0.0.0/0            /* Kubernetes service cluster ip + port for masquerade purpose */ match-set KUBE-CLUSTER-IP dst,dst
   20   948 KUBE-NODE-PORT  all  --  *      *       0.0.0.0/0            0.0.0.0/0            ADDRTYPE match dst-type LOCAL
    0     0 ACCEPT     all  --  *      *       0.0.0.0/0            0.0.0.0/0            match-set KUBE-CLUSTER-IP dst,dst

查看ipset list

[root@172-17-98-9 ~]# ipset list KUBE-CLUSTER-IP
Name: KUBE-CLUSTER-IP
Type: hash:ip,port
Revision: 5
Header: family inet hashsize 1024 maxelem 65536
Size in memory: 1016
References: 2
Number of entries: 14
Members:
10.68.43.190,tcp:443
10.68.0.1,tcp:443
10.68.194.124,tcp:8080
10.68.0.2,udp:53
10.68.131.114,tcp:80
10.68.0.2,tcp:9153
10.68.43.190,tcp:80
10.68.0.2,tcp:53
10.68.194.124,tcp:80
10.68.146.165,tcp:8000
10.68.43.190,tcp:8080
10.68.33.10,tcp:443
10.68.210.89,tcp:443
10.68.231.113,tcp:80

ip a 指令kube-ipvs0部分内容

8: kube-ipvs0: <BROADCAST,NOARP> mtu 1500 qdisc noop state DOWN group default 
    link/ether 32:c1:50:57:44:52 brd ff:ff:ff:ff:ff:ff
    inet 10.68.231.113/32 brd 10.68.231.113 scope global kube-ipvs0
       valid_lft forever preferred_lft forever
    inet 10.68.146.165/32 brd 10.68.146.165 scope global kube-ipvs0
       valid_lft forever preferred_lft forever
    inet 10.68.0.2/32 brd 10.68.0.2 scope global kube-ipvs0
       valid_lft forever preferred_lft forever
    inet 10.68.194.124/32 brd 10.68.194.124 scope global kube-ipvs0
       valid_lft forever preferred_lft forever
    inet 10.68.43.190/32 brd 10.68.43.190 scope global kube-ipvs0
       valid_lft forever preferred_lft forever
    inet 10.68.210.89/32 brd 10.68.210.89 scope global kube-ipvs0
       valid_lft forever preferred_lft forever
    inet 10.68.131.114/32 brd 10.68.131.114 scope global kube-ipvs0
       valid_lft forever preferred_lft forever
    inet 10.68.0.1/32 brd 10.68.0.1 scope global kube-ipvs0
       valid_lft forever preferred_lft forever
    inet 10.68.33.10/32 brd 10.68.33.10 scope global kube-ipvs0
       valid_lft forever preferred_lft forever

 

以test-nginx为例分析网络

default       test-nginx                  ClusterIP   10.68.131.114   <none>        80/TCP                        28h   app=test-nginx

查看后端地址

​

[root@172-17-98-9 ~]# kubectl describe svc test-nginx
Name:              test-nginx
Namespace:         default
Labels:            app=test-nginx
Annotations:       Selector:  app=test-nginx
Type:              ClusterIP
IP:                10.68.131.114
Port:              <unset>  80/TCP
TargetPort:        80/TCP
Endpoints:         172.20.0.35:80,172.20.0.41:80
Session Affinity:  None
Events:            <none>

分析出pod内访问CLUSTER-IP通讯链路(172.20.0.35->10.68.131.144:80)

1。 test-nginx-554cf4fd85-k4969(ip:172.20.0.35) -- eth0 -- eth0@if12 -- 宿主veth95f94636 -- 宿主cni0

2。 数据包达到宿主服务器,本地没有该地址,开始进入nat,匹配规则(贴出匹配部分)

过程标记KUBE-CLUSTER-IP匹配规则

Chain PREROUTING (policy ACCEPT)
target     prot opt source               destination         
KUBE-SERVICES  all  --  0.0.0.0/0            0.0.0.0/0            /* kubernetes service portals */
Chain KUBE-SERVICES (2 references)
target     prot opt source               destination       
ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0            match-set KUBE-CLUSTER-IP dst,dst

其中 KUBE-CLUSTER-IP参数可以通过“ipset list KUBE-CLUSTER-IP”查看ip清单, 10.68.131.144被命中

Chain POSTROUTING (policy ACCEPT)
target     prot opt source               destination         
KUBE-POSTROUTING  all  --  0.0.0.0/0            0.0.0.0/0            /* kubernetes postrouting rules */
Chain KUBE-POSTROUTING (1 references)
target     prot opt source               destination         
MARK       all  --  0.0.0.0/0            0.0.0.0/0            MARK xor 0x4000
MASQUERADE  all  --  0.0.0.0/0            0.0.0.0/0            /* kubernetes service traffic requiring SNAT */ random-fully

??

3。 宿主服务器路由检查,由于是单击部署,只能匹配第一条,如果是集群,应该在宿主服务器有到不同节点的路由?!

[root@172-17-98-9 ~]# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         172.17.0.1      0.0.0.0         UG    0      0        0 enp1s0
169.254.169.254 172.17.255.254  255.255.255.255 UGH   0      0        0 enp1s0
172.17.0.0      0.0.0.0         255.255.0.0     U     0      0        0 enp1s0
172.18.0.0      0.0.0.0         255.255.0.0     U     0      0        0 docker0
172.20.0.0      0.0.0.0         255.255.255.0   U     0      0        0 cni0

4。 宿主服务器kube-ipvs0有挂载ip 10.68.131.144,内核开始ipvs代理到后端

查看ipvs

[root@172-17-98-9 ~]# ipvsadm -L -n
IP Virtual Server version 1.2.1 (size=4096)
Prot LocalAddress:Port Scheduler Flags
  -> RemoteAddress:Port           Forward Weight ActiveConn InActConn
TCP  10.68.0.2:53 rr
  -> 172.20.0.34:53               Masq    1      0          0         
TCP  10.68.43.190:443 rr
TCP  10.68.43.190:8080 rr
TCP  10.68.131.114:80 rr
  -> 172.20.0.35:80               Masq    1      0          0         
  -> 172.20.0.41:80               Masq    1      0          0         
TCP  10.68.194.124:80 rr
  -> 172.20.0.36:80               Masq    1      0          0         
TCP  10.68.231.113:80 rr
  -> 172.20.0.39:80               Masq    1      0          0         
TCP  127.0.0.1:23456 rr
  -> 172.20.0.36:80               Masq    1      0          0         
TCP  127.0.0.1:25376 rr
  -> 172.20.0.36:8080             Masq    1      0          0         
TCP  127.0.0.1:28360 rr
  -> 172.20.0.38:8443             Masq    1      0          0         
TCP  172.17.98.9:23456 rr
  -> 172.20.0.36:80               Masq    1      0          0         
TCP  172.17.98.9:25376 rr
  -> 172.20.0.36:8080             Masq    1      0          0         
TCP  172.17.98.9:28360 rr
  -> 172.20.0.38:8443             Masq    1      0          0         
TCP  172.18.0.1:23456 rr
  -> 172.20.0.36:80               Masq    1      0          0         
TCP  172.18.0.1:25376 rr
  -> 172.20.0.36:8080             Masq    1      0          0         
TCP  172.18.0.1:28360 rr
  -> 172.20.0.38:8443             Masq    1      0          0         
TCP  172.20.0.0:23456 rr
  -> 172.20.0.36:80               Masq    1      0          0         
TCP  172.20.0.0:25376 rr
  -> 172.20.0.36:8080             Masq    1      0          0         
TCP  172.20.0.0:28360 rr
  -> 172.20.0.38:8443             Masq    1      0          0         
TCP  172.20.0.1:23456 rr
  -> 172.20.0.36:80               Masq    1      0          0         
TCP  172.20.0.1:25376 rr
  -> 172.20.0.36:8080             Masq    1      0          0         
TCP  172.20.0.1:28360 rr
  -> 172.20.0.38:8443             Masq    1      0          0         
TCP  10.68.0.1:443 rr
  -> 172.17.98.9:6443             Masq    1      6          0         
TCP  10.68.0.2:9153 rr
  -> 172.20.0.34:9153             Masq    1      0          0         
TCP  10.68.33.10:443 rr
  -> 172.20.0.38:8443             Masq    1      0          0         
TCP  10.68.43.190:80 rr
TCP  10.68.146.165:8000 rr
  -> 172.20.0.40:8000             Masq    1      0          0         
TCP  10.68.194.124:8080 rr
  -> 172.20.0.36:8080             Masq    1      0          0         
TCP  10.68.210.89:443 rr
  -> 172.20.0.37:4443             Masq    1      0          0         
UDP  10.68.0.2:53 rr
  -> 172.20.0.34:53               Masq    1      0          0   

其中,10.68.131.114:80经lvs代理到后端172.20.0.35:80(权重1),172.20.0.41:80(权重1)

TCP  10.68.131.114:80 rr
  -> 172.20.0.35:80               Masq    1      0          0         
  -> 172.20.0.41:80               Masq    1      0          0    

4。 路由,匹配到cni0网络接口

[root@172-17-98-9 ~]# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         172.17.0.1      0.0.0.0         UG    0      0        0 enp1s0
169.254.169.254 172.17.255.254  255.255.255.255 UGH   0      0        0 enp1s0
172.17.0.0      0.0.0.0         255.255.0.0     U     0      0        0 enp1s0
172.18.0.0      0.0.0.0         255.255.0.0     U     0      0        0 docker0
172.20.0.0      0.0.0.0         255.255.255.0   U     0      0        0 cni0

5. 基于负载均衡权重

50%概率-- 宿主cni0 -- 宿主vethefab9cf0 -- eth0@if18 -- eth0 -- test-nginx-554cf4fd85-vrh8d(172.20.0.41)

50%概率 -- 宿主cni0 -- 宿主veth95f94636 -- eth0@if12 -- eth0 -- test-nginx-554cf4fd85-k4969(ip:172.20.0.35)

 

思路还不是完全清晰,iptables,ipvs理解不深。仍需努力。

 

 

<p style="margin: 21px 0 21px 0;"><span style="color: red; font-size: 24px;">微服务是什么?</span></p> <p>微服务是用于构建应用程序的架构风格,一个大的系统可由一个或者多个微服务组成,微服务架构可将应用拆分成多个核心功能,每个功能都被称为一项服务,可以单独构建和部署,这意味着各项服务在工作和出现故障的时候不会相互影响。</p> <p style="margin: 21px 0 21px 0;"><span style="color: red; font-size: 24px;">为什么要用微服务?</span></p> <p style="text-align: left;">单体架构下的所有代码模块都耦合在一起,代码量大,维护困难,想要更新一个模块的代码,也可能会影响其他模块,不能很好的定制化代码。微服务中可以有java编写、有Python编写的,他们都是靠restful架构风格统一成一个系统的,所以微服务本身与具体技术无关、扩展性强。</p> <p style="margin: 21px 0 21px 0;"><span style="color: red; font-size: 24px;">大型电商平台微服务功能图</span></p> <p style="margin: 21px 0 21px 0;"><img src="https://img-bss.csdnimg.cn/202102041151592091.png" alt="" /></p> <p style="margin: 21px 0 21px 0;"><span style="color: red; font-size: 24px;">为什么要将SpringCloud项目部署到k8s平台?</span></p> <p>SpringCloud只能用在SpringBoot的java环境中,而kubernetes可以适用于任何开发语言,只要能被放进docker的应用,都可以在kubernetes上运行,而且更轻量,更简单。SpringCloud很多功能都跟kubernetes重合,比如服务发现,负载均衡,配置管理,所以如果把SpringCloud部署到k8s,那么很多功能可以直接使用k8s原生的,减少复杂度。</p> <p style="margin: 16px 0 16px 0;"><span style="font-size: 18px; font-family: '微软雅黑',sans-serif;">Kubernetes</span><span style="font-size: 18px; font-family: '微软雅黑',sans-serif;">作为成熟的容器编排工具,在国内外很多公司、世界500强等企业已经落地使用,很多中小型公司也开始把业务迁移到kubernetes中。kubernetes已经成为互联网行业急需的人才,很多企业都开始引进kubernetes技术人员,实现其内部的自动化容器云平台的建设。对于开发、测试、运维、架构师等技术人员来说k8s已经成为的一项重要的技能,下面列举了国内外在生产环境使用kubernetes的公司:</span></p> <p style="margin: 16px 0 16px 0;"> </p> <p style="margin: 16px 0 16px 0;"><strong><span style="font-size: 18px; font-family: '微软雅黑',sans-serif;">国内在用k8s的公司:</span></strong></p> <p style="margin: 16px 0 16px 0;"><span style="font-family: '微软雅黑',sans-serif;">阿里巴巴、百度、腾讯、京东、360、新浪、头条、知乎、华为、小米、富士康、移动、银行、电网、阿里云、青云、时速云、腾讯、优酷、抖音、快手、美团等</span></p> <p style="margin: 16px 0 16px 0;"><strong><span style="font-size: 18px; font-family: '微软雅黑',sans-serif;">国外在用k8s的公司:</span></strong></p> <p style="margin: 16px 0 16px 0;"><span style="font-size: 18px; font-family: '微软雅黑',sans-serif;">谷歌、IBM、丰田、iphone、微软、redhat等<br /></span><img src="https://img-bss.csdnimg.cn/202102041152363812.png" alt="" /></p> <p style="margin: 21px 0 21px 0;"><br />整个K8S体系涉及到的技术众多,包括存储、网络、安全、监控、日志、DevOps、微服务等,很多刚接触K8S的初学者,都会感到无从下手,为了能让大家系统地学习,克服这些技术难点,推出了这套K8S架构师课程。<br /><br /><span style="color: red; font-size: 24px;">Kubernetes的发展前景</span> <br />kubernetes作为炙手可热的技术,已经成为云计算领域获取高薪要掌握的重要技能,在招聘网站搜索k8s,薪资水平也非常可观,为了让大家能够了解k8s目前的薪资分布情况,下面列举一些K8S的招聘截图: <br /><br /></p> <p style="margin: 21px 0 21px 0;"><img src="https://img-bss.csdnimg.cn/202102041153009482.png" alt="" /></p> <p style="margin: 16px 0 16px 0;"><span style="color: #ff0000;"><strong><span style="font-size: 24px;">讲师介绍:  </span></strong></span><strong><span style="font-size: 24px; font-family: '微软雅黑',sans-serif;">先超</span></strong></p> <p style="margin: 8px 0 8px 0;"><span style="font-size: 18px; font-family: '微软雅黑',sans-serif;">容器云架构师、IT技术架构师、<span style="color: red;">DevOps</span><span style="color: red;">工程师</span>,曾<span style="color: red;">就职于世界500强上市公司</span>,拥有多年一线运维经验,主导过上亿流量的pv项目的架构设计和运维工作;具有<span style="color: red;">丰富的在线教育经验</span>,对课程一直在改进和提高、不断的更新和完善、开发更多的企业实战项目。所教<span style="color: red;">学员遍布京东、阿里、百度、电网等</span>大型企业和上市公司。</span></p> <p style="margin: 21px 0 21px 0;"><span style="color: red; font-size: 24px;">课程学习计划</span> <br />学习方式:视频录播+视频回放+全套源码笔记 <br />教学服务:模拟面试、就业指导、岗位内推、一对一答疑、远程指导 <br />VIP终身服务:一次购买,终身学习</p> <p style="margin: 16px 0 16px 0;"><span style="font-size: 24px; color: #ff0000;"><span style="font-size: 24px;">课程亮点:</span></span></p> <p><strong><span style="font-size: 18px; font-family: '微软雅黑',sans-serif;">1. </span></strong><strong><span style="font-size: 18px; font-family: '微软雅黑',sans-serif;">学习方式灵活,不占用工作时间:</span></strong></p> <p><span style="font-family: '微软雅黑',sans-serif;">可在电脑、手机观看,随时可以学习,不占用上班时间</span></p> <p><strong><span style="font-size: 18px; font-family: '微软雅黑',sans-serif;">2.</span></strong><strong><span style="font-size: 18px; font-family: '微软雅黑',sans-serif;">老师答疑及时:</span></strong></p> <p><span style="font-family: '微软雅黑',sans-serif;">老师24小时在线答疑</span></p> <p><strong><span style="font-size: 18px; font-family: '微软雅黑',sans-serif;">3. </span></strong><strong><span style="font-size: 18px; font-family: '微软雅黑',sans-serif;">知识点覆盖全、课程质量高</span></strong></p> <p><strong><span style="font-size: 18px; font-family: '微软雅黑',sans-serif;">4. </span></strong><strong><span style="font-size: 18px; font-family: '微软雅黑',sans-serif;">精益求精、不断改进</span></strong></p> <p><span style="font-family: '微软雅黑',sans-serif;">根据学员要求、随时更新课程内容</span></p> <p><strong><span style="font-size: 18px; font-family: '微软雅黑',sans-serif;">5. </span></strong><strong><span style="font-size: 18px; font-family: '微软雅黑',sans-serif;">适合范围广,不管你是0基础,还是拥有工作经验均可学习:</span></strong></p> <p><span style="font-family: '微软雅黑',sans-serif;">0</span><span style="font-family: '微软雅黑',sans-serif;">基础</span></p> <p><span style="font-family: '微软雅黑',sans-serif;">1-3</span><span style="font-family: '微软雅黑',sans-serif;">年工作经验</span></p> <p><span style="font-family: '微软雅黑',sans-serif;">3-5</span><span style="font-family: '微软雅黑',sans-serif;">年工作经验</span></p> <p><span style="font-family: '微软雅黑',sans-serif;">5</span><span style="font-family: '微软雅黑',sans-serif;">年以上工作经验</span></p> <p><span style="font-family: '微软雅黑',sans-serif;">运维、开发、测试、产品、前端、架构师</span></p> <p><span style="font-family: '微软雅黑',sans-serif;">其他行业转行做技术人员均可学习</span></p> <p><span style="font-family: 等线; color: red; font-size: 24px;">课程部分项目截图</span></p> <p><img src="https://img-bss.csdnimg.cn/202102041153266860.png" alt="" /></p> <p><img src="https://img-bss.csdnimg.cn/202102041153377287.png" alt="" /></p> <p><img src="https://img-bss.csdnimg.cn/202102041153463414.png" alt="" /></p> <p><img src="https://img-bss.csdnimg.cn/202102041153552293.png" alt="" /></p> <p><img src="https://img-bss.csdnimg.cn/202102041154101988.png" alt="" /></p> <p><img src="https://img-bss.csdnimg.cn/202102041154234342.png" alt="" /></p> <p><img src="https://img-bss.csdnimg.cn/202102041154348644.png" alt="" /></p> <p> </p> <p> </p> <p> </p> <p><span style="font-size: 24px; color: #ff0000;">课程大纲</span></p> <p> </p> <table> <tbody> <tr class="firstRow"> <td style="border: 1px solid windowtext; padding: 0px 7px;" valign="top" width="553"> <p style="margin-top: auto; margin-bottom: auto; text-align: left;"><strong><span style="font-size: 18px; font-family: 宋体;">k8s+SpringCloud</span></strong><strong><span style="font-size: 18px; font-family: 宋体;">全栈技术:基于世界500强的企业实战课程-大纲</span></strong></p> </td> </tr> <tr> <td style="border-color: currentcolor windowtext windowtext; border-style: none solid solid; border-width: medium 1px 1px; border-image: none 100% / 1 / 0 stretch; padding: 0px 7px;" valign="top" width="553"> <p style="margin-top: auto; margin-bottom: auto; text-align: left;"><strong><span style="font-size: 16px; font-family: '微软雅黑',sans-serif;">第一章 开班仪式</span></strong></p> <p style="margin-top: auto; margin-bottom: auto; text-align: left;"><span style="font-size: 16px; font-family: '微软雅黑',sans-serif;">老师自我介绍、课程大纲介绍、行业背景、发展趋势、市场行情、课程优势、薪资水平、给大家的职业规划、课程学习计划、岗位内推</span></p> </td> </tr> <tr> <td style="border-color: currentcolor windowtext windowtext; border-style: none solid solid; border-width: medium 1px 1px; border-image: none 100% / 1 / 0 stretch; padding: 0px 7px;" valign="top" width="553"> <p style="margin-top: auto; margin-bottom: auto; text-align: left;"><strong><span style="font-size: 16px; font-family: '微软雅黑',sans-serif;">第二章 kubernetes介绍</span></strong></p> <p style="margin-top: auto; margin-bottom: auto; text-align: left;"><span style="font-size: 16px; font-family: '微软雅黑',sans-serif;">Kubernetes</span><span style="font-size: 16px; font-family: '微软雅黑',sans-serif;">简介</span></p> <p style="margin-top: auto; margin-bottom: auto; text-align: left;"><span style="font-size: 16px; font-family: '微软雅黑',sans-serif;">kubernetes</span><span style="font-size: 16px; font-family: '微软雅黑',sans-serif;">起源和发展</span></p> <p style="margin-top: auto; margin-bottom: auto; text-align: left;"><span style="font-size: 16px; font-family: '微软雅黑',sans-serif;">kubernetes</span><span style="font-size: 16px; font-family: '微软雅黑',sans-serif;">优点</span></p> <p style="margin-top: auto; margin-bottom: auto; text-align: left;"><span style="font-size: 16px; font-family: '微软雅黑',sans-serif;">kubernetes</span><span style="font-size: 16px; font-family: '微软雅黑',sans-serif;">功能</span></p> <p style="margin-top: auto; margin-bottom: auto; text-align: left;"><span style="font-size: 16px; font-family: '微软雅黑',sans-serif;">kubernetes</span><span style="font-size: 16px; font-family: '微软雅黑',sans-serif;">应用领域:在大数据、5G、区块链、DevOps、AI等领域的应用</span></p> </td> </tr> <tr> <td style="border-color: currentcolor windowtext windowtext; border-style: none solid solid; border-width: medium 1px 1px; border-image: none 100% / 1 / 0 stretch; padding: 0px 7px;" valign="top" width="553"> <p style="margin-top: auto; margin-bottom: auto; text-align: left;"><strong><span style="font-size: 16px; font-family: '微软雅黑',sans-serif;">第三章  kubernetes中的资源对象</span></strong></p> <p style="margin-top: auto; margin-bottom: auto; text-align: left;"><span style="font-size: 16px; font-family: '微软雅黑',sans-serif;">最小调度单元Pod</span></p> <p style="margin-top: auto; margin-bottom: auto; text-align: left;"><span style="font-size: 16px; font-family: '微软雅黑',sans-serif;">标签Label和标签选择器</span></p> <p style="margin-top: auto; margin-bottom: auto; text-align: left;"><span style="font-size: 16px; font-family: '微软雅黑',sans-serif;">控制器Replicaset、Deployment、Statefulset、Daemonset等</span></p> <p style="margin-top: auto; margin-bottom: auto; text-align: left;"><span style="font-size: 16px; font-family: '微软雅黑',sans-serif;">四层负载均衡器Service</span></p> </td> </tr> <tr> <td style="border-color: currentcolor windowtext windowtext; border-style: none solid solid; border-width: medium 1px 1px; border-image: none 100% / 1 / 0 stretch; padding: 0px 7px;" valign="top" width="553"> <p style="margin-top: auto; margin-bottom: auto; text-align: left;"><strong><span style="font-size: 16px; font-family: '微软雅黑',sans-serif;">第四章 kubernetes架构和组件</span></strong></p> <p style="margin-top: auto; margin-bottom: auto; text-align: left;"><span style="font-size: 16px; font-family: '微软雅黑',sans-serif;">熟悉谷歌的Borg架构</span></p> <p style="margin-top: auto; margin-bottom: auto; text-align: left;"><span style="font-size: 16px; font-family: '微软雅黑',sans-serif;">kubernetes</span><span style="font-size: 16px; font-family: '微软雅黑',sans-serif;">单master节点架构</span></p> <p style="margin-top: auto; margin-bottom: auto; text-align: left;"><span style="font-size: 16px; font-family: '微软雅黑',sans-serif;">kubernetes</span><span style="font-size: 16px; font-family: '微软雅黑',sans-serif;">多master节点高可用架构</span></p> <p style="margin-top: auto; margin-bottom: auto; text-align: left;"><span style="font-size: 16px; font-family: '微软雅黑',sans-serif;">kubernetes</span><span style="font-size: 16px; font-family: '微软雅黑',sans-serif;">多层架构设计原理</span></p> <p style="margin-top: auto; margin-bottom: auto; text-align: left;"><span style="font-size: 16px; font-family: '微软雅黑',sans-serif;">kubernetes API</span><span style="font-size: 16px; font-family: '微软雅黑',sans-serif;">介绍</span></p> <p style="margin-top: auto; margin-bottom: auto; text-align: left;"><span style="font-size: 16px; font-family: '微软雅黑',sans-serif;">master</span><span style="font-size: 16px; font-family: '微软雅黑',sans-serif;">(控制)节点组件:apiserver、scheduler、controller-manager、etcd</span></p> <p style="margin-top: auto; margin-bottom: auto; text-align: left;"><span style="font-size: 16px; font-family: '微软雅黑',sans-serif;">node</span><span style="font-size: 16px; font-family: '微软雅黑',sans-serif;">(工作)节点组件:kube-proxy、coredns、calico</span></p> <p style="margin-top: auto; margin-bottom: auto; text-align: left;"><span style="font-size: 16px; font-family: '微软雅黑',sans-serif;">附加组件:prometheus、dashboard、metrics-server、efk、HPA、VPA、Descheduler、Flannel、cAdvisor、Ingress     Controller。</span></p> </td> </tr> <tr> <td style="border-color: currentcolor windowtext windowtext; border-style: none solid solid; border-width: medium 1px 1px; border-image: none 100% / 1 / 0 stretch; padding: 0px 7px;" valign="top" width="553"> <p style="margin-top: auto; margin-bottom: auto; text-align: left;"><strong><span style="font-size: 16px; font-family: '微软雅黑',sans-serif;">第五章 部署多master节点的K8S高可用集群(kubeadm)</span></strong></p> </td> </tr> <tr> <td style="border-color: currentcolor windowtext windowtext; border-style: none solid solid; border-width: medium 1px 1px; border-image: none 100% / 1 / 0 stretch; padding: 0px 7px;" valign="top" width="553"> <p style="margin-top: auto; margin-bottom: auto; text-align: left;"><strong><span style="font-size: 16px; font-family: '微软雅黑',sans-serif;">第六章 带你体验kubernetes可视化界面dashboard</span></strong></p> <p style="margin-top: auto; margin-bottom: auto; text-align: left;"><span style="font-size: 16px; font-family: '微软雅黑',sans-serif;">在kubernetes中部署dashboard</span></p> <p style="margin-top: auto; margin-bottom: auto; text-align: left;"><span style="font-size: 16px; font-family: '微软雅黑',sans-serif;">通过token令牌登陆dashboard</span></p> <p style="margin-top: auto; margin-bottom: auto; text-align: left;"><span style="font-size: 16px; font-family: '微软雅黑',sans-serif;">通过kubeconfig登陆dashboard</span></p> <p style="margin-top: auto; margin-bottom: auto; text-align: left;"><span style="font-size: 16px; font-family: '微软雅黑',sans-serif;">限制dashboard的用户权限</span></p> <p style="margin-top: auto; margin-bottom: auto; text-align: left;"><span style="font-size: 16px; font-family: '微软雅黑',sans-serif;">在dashboard界面部署Web服务</span></p> <p style="margin-top: auto; margin-bottom: auto; text-align: left;"><span style="font-size: 16px; font-family: '微软雅黑',sans-serif;">在dashboard界面部署redis服务</span></p> </td> </tr> <tr> <td style="border-color: currentcolor windowtext windowtext; border-style: none solid solid; border-width: medium 1px 1px; border-image: none 100% / 1 / 0 stretch; padding: 0px 7px;" valign="top" width="553"> <p style="margin-top: auto; margin-bottom: auto; text-align: left;"><strong><span style="font-size: 16px; font-family: '微软雅黑',sans-serif;">第七章 资源清单YAML文件编写技巧</span></strong></p> <p style="margin-top: auto; margin-bottom: auto; text-align: left;"><span style="font-size: 16px; font-family: '微软雅黑',sans-serif;">编写YAML文件常用字段,YAML文件编写技巧,kubectl explain查看帮助命令,手把手教你创建一个Pod的YAML文件</span></p> </td> </tr> <tr> <td style="border-color: currentcolor windowtext windowtext; border-style: none solid solid; border-width: medium 1px 1px; border-image: none 100% / 1 / 0 stretch; padding: 0px 7px;" valign="top" width="553"> <p style="margin-top: auto; margin-bottom: auto; text-align: left;"><strong><span style="font-size: 16px; font-family: '微软雅黑',sans-serif;">第八章 通过资源清单YAML文件部署tomcat站点</span></strong></p> <p style="margin-top: auto; margin-bottom: auto; text-align: left;"><span style="font-size: 16px; font-family: '微软雅黑',sans-serif;">编写tomcat的资源清单YAML文件、创建service发布应用、通过HTTP、HTTPS访问tomcat</span></p> </td> </tr> <tr> <td style="border-color: currentcolor windowtext windowtext; border-style: none solid solid; border-width: medium 1px 1px; border-image: none 100% / 1 / 0 stretch; padding: 0px 7px;" valign="top" width="553"> <p style="margin-top: auto; margin-bottom: auto; text-align: left;"><strong><span style="font-size: 16px; font-family: '微软雅黑',sans-serif;">第九章  kubernetes Ingress发布服务</span></strong></p> <p style="margin-top: auto; margin-bottom: auto; text-align: left;"><span style="font-size: 16px; font-family: '微软雅黑',sans-serif;">Ingress</span><span style="font-size: 16px; font-family: '微软雅黑',sans-serif;">和Ingress Controller概述</span></p> <p style="margin-top: auto; margin-bottom: auto; text-align: left;"><span style="font-size: 16px; font-family: '微软雅黑',sans-serif;">Ingress</span><span style="font-size: 16px; font-family: '微软雅黑',sans-serif;">和Servcie关系</span></p> <p style="margin-top: auto; margin-bottom: auto; text-align: left;"><span style="font-size: 16px; font-family: '微软雅黑',sans-serif;">安装Nginx Ingress Controller</span></p> <p style="margin-top: auto; margin-bottom: auto; text-align: left;"><span style="font-size: 16px; font-family: '微软雅黑',sans-serif;">安装Traefik Ingress Controller</span></p> <p style="margin-top: auto; margin-bottom: auto; text-align: left;"><span style="font-size: 16px; font-family: '微软雅黑',sans-serif;">使用Ingress发布k8s服务</span></p> <p style="margin-top: auto; margin-bottom: auto; text-align: left;"><span style="font-size: 16px; font-family: '微软雅黑',sans-serif;">Ingress</span><span style="font-size: 16px; font-family: '微软雅黑',sans-serif;">代理HTTP/HTTPS服务</span></p> <p style="margin-top: auto; margin-bottom: auto; text-align: left;"><span style="font-size: 16px; font-family: '微软雅黑',sans-serif;">Ingress</span><span style="font-size: 16px; font-family: '微软雅黑',sans-serif;">实现应用的灰度发布-可按百分比、按流量分发</span></p> </td> </tr> <tr> <td style="border-color: currentcolor windowtext windowtext; border-style: none solid solid; border-width: medium 1px 1px; border-image: none 100% / 1 / 0 stretch; padding: 0px 7px;" valign="top" width="553"> <p style="margin-top: auto; margin-bottom: auto; text-align: left;"><strong><span style="font-size: 16px; font-family: '微软雅黑',sans-serif;">第十章 私有镜像仓库Harbor安装和配置</span></strong></p> <p style="margin-top: auto; margin-bottom: auto; text-align: left;"><span style="font-size: 16px; font-family: '微软雅黑',sans-serif;">Harbor</span><span style="font-size: 16px; font-family: '微软雅黑',sans-serif;">简介</span></p> <p style="margin-top: auto; margin-bottom: auto; text-align: left;"><span style="font-size: 16px; font-family: '微软雅黑',sans-serif;">安装Harbor</span></p> <p style="margin-top: auto; margin-bottom: auto; text-align: left;"><span style="font-size: 16px; font-family: '微软雅黑',sans-serif;">Harbor UI</span><span style="font-size: 16px; font-family: '微软雅黑',sans-serif;">界面使用</span></p> <p style="margin-top: auto; margin-bottom: auto; text-align: left;"><span style="font-size: 16px; font-family: '微软雅黑',sans-serif;">上传镜像到Harbor仓库</span></p> <p style="margin-top: auto; margin-bottom: auto; text-align: left;"><span style="font-size: 16px; font-family: '微软雅黑',sans-serif;">从Harbor仓库下载镜像</span></p> </td> </tr> <tr> <td style="border-color: currentcolor windowtext windowtext; border-style: none solid solid; border-width: medium 1px 1px; border-image: none 100% / 1 / 0 stretch; padding: 0px 7px;" valign="top" width="553"> <p style="margin-top: auto; margin-bottom: auto; text-align: left;"><strong><span style="font-size: 16px; font-family: '微软雅黑',sans-serif;">第十一章 微服务概述</span></strong></p> <p style="margin-top: auto; margin-bottom: auto; text-align: left;"><span style="font-size: 16px; font-family: '微软雅黑',sans-serif;">什么是微服务?</span></p> <p style="margin-top: auto; margin-bottom: auto; text-align: left;"><span style="font-size: 16px; font-family: '微软雅黑',sans-serif;">为什么要用微服务?</span></p> <p style="margin-top: auto; margin-bottom: auto; text-align: left;"><span style="font-size: 16px; font-family: '微软雅黑',sans-serif;">微服务的特性</span></p> <p style="margin-top: auto; margin-bottom: auto; text-align: left;"><span style="font-size: 16px; font-family: '微软雅黑',sans-serif;">什么样的项目适合微服务?</span></p> <p style="margin-top: auto; margin-bottom: auto; text-align: left;"><span style="font-size: 16px; font-family: '微软雅黑',sans-serif;">使用微服务需要考虑的问题</span></p> <p style="margin-top: auto; margin-bottom: auto; text-align: left;"><span style="font-size: 16px; font-family: '微软雅黑',sans-serif;">常见的微服务框架</span></p> <p style="margin-top: auto; margin-bottom: auto; text-align: left;"><span style="font-size: 16px; font-family: '微软雅黑',sans-serif;">常见的微服务框架对比分析</span></p> </td> </tr> <tr> <td style="border-color: currentcolor windowtext windowtext; border-style: none solid solid; border-width: medium 1px 1px; border-image: none 100% / 1 / 0 stretch; padding: 0px 7px;" valign="top" width="553"> <p style="margin-top: auto; margin-bottom: auto; text-align: left;"><strong><span style="font-size: 16px; font-family: '微软雅黑',sans-serif;">第十二章 SpringCloud概述</span></strong></p> <p style="margin-top: auto; margin-bottom: auto; text-align: left;"><span style="font-size: 16px; font-family: '微软雅黑',sans-serif;">SpringCloud</span><span style="font-size: 16px; font-family: '微软雅黑',sans-serif;">是什么?</span></p> <p style="margin-top: auto; margin-bottom: auto; text-align: left;"><span style="font-size: 16px; font-family: '微软雅黑',sans-serif;">SpringCloud</span><span style="font-size: 16px; font-family: '微软雅黑',sans-serif;">和SpringBoot什么关系?</span></p> <p style="margin-top: auto; margin-bottom: auto; text-align: left;"><span style="font-size: 16px; font-family: '微软雅黑',sans-serif;">SpringCloud</span><span style="font-size: 16px; font-family: '微软雅黑',sans-serif;">微服务框架的优缺点</span></p> <p style="margin-top: auto; margin-bottom: auto; text-align: left;"><span style="font-size: 16px; font-family: '微软雅黑',sans-serif;">SpringCloud</span><span style="font-size: 16px; font-family: '微软雅黑',sans-serif;">项目部署到k8s的流程</span></p> </td> </tr> <tr> <td style="border-color: currentcolor windowtext windowtext; border-style: none solid solid; border-width: medium 1px 1px; border-image: none 100% / 1 / 0 stretch; padding: 0px 7px;" valign="top" width="553"> <p style="margin-top: auto; margin-bottom: auto; text-align: left;"><strong><span style="font-size: 16px; font-family: '微软雅黑',sans-serif;">第十三章 SpringCloud组件介绍</span></strong></p> <p style="margin-top: auto; margin-bottom: auto; text-align: left;"><span style="font-size: 16px; font-family: '微软雅黑',sans-serif;">服务注册与发现组件Eureka</span></p> <p style="margin-top: auto; margin-bottom: auto; text-align: left;"><span style="font-size: 16px; font-family: '微软雅黑',sans-serif;">客户端负载均衡组件Ribbon</span></p> <p style="margin-top: auto; margin-bottom: auto; text-align: left;"><span style="font-size: 16px; font-family: '微软雅黑',sans-serif;">服务网关Zuul</span></p> <p style="margin-top: auto; margin-bottom: auto; text-align: left;"><span style="font-size: 16px; font-family: '微软雅黑',sans-serif;">熔断器Hystrix</span></p> <p style="margin-top: auto; margin-bottom: auto; text-align: left;"><span style="font-size: 16px; font-family: '微软雅黑',sans-serif;">API</span><span style="font-size: 16px; font-family: '微软雅黑',sans-serif;">网关SpringCloud Gateway</span></p> <p style="margin-top: auto; margin-bottom: auto; text-align: left;"><span style="font-size: 16px; font-family: '微软雅黑',sans-serif;">配置中心SpringCloud Config</span></p> </td> </tr> <tr> <td style="border-color: currentcolor windowtext windowtext; border-style: none solid solid; border-width: medium 1px 1px; border-image: none 100% / 1 / 0 stretch; padding: 0px 7px;" valign="top" width="553"> <p style="margin-top: auto; margin-bottom: auto; text-align: left;"><strong><span style="font-size: 16px; font-family: '微软雅黑',sans-serif;">第十四章 将SpringCloud项目部署到k8s平台的注意事项</span></strong></p> <p style="margin-top: auto; margin-bottom: auto; text-align: left;"><span style="font-size: 16px; font-family: '微软雅黑',sans-serif;">如何进行服务发现?</span></p> <p style="margin-top: auto; margin-bottom: auto; text-align: left;"><span style="font-size: 16px; font-family: '微软雅黑',sans-serif;">如何进行配置管理?</span></p> <p style="margin-top: auto; margin-bottom: auto; text-align: left;"><span style="font-size: 16px; font-family: '微软雅黑',sans-serif;">如何进行负载均衡?</span></p> <p style="margin-top: auto; margin-bottom: auto; text-align: left;"><span style="font-size: 16px; font-family: '微软雅黑',sans-serif;">如何对外发布服务?</span></p> <p style="margin-top: auto; margin-bottom: auto; text-align: left;"><span style="font-size: 16px; font-family: '微软雅黑',sans-serif;">k8s</span><span style="font-size: 16px; font-family: '微软雅黑',sans-serif;">部署SpringCloud项目的整体流程</span></p> </td> </tr> <tr> <td style="border-color: currentcolor windowtext windowtext; border-style: none solid solid; border-width: medium 1px 1px; border-image: none 100% / 1 / 0 stretch; padding: 0px 7px;" valign="top" width="553"> <p style="margin-top: auto; margin-bottom: auto; text-align: left;"><strong><span style="font-size: 16px; font-family: '微软雅黑',sans-serif;">第十五章 部署MySQL数据库</span></strong></p> <p style="margin-top: auto; margin-bottom: auto; text-align: left;"><span style="font-size: 16px; font-family: '微软雅黑',sans-serif;">MySQL</span><span style="font-size: 16px; font-family: '微软雅黑',sans-serif;">简介</span></p> <p style="margin-top: auto; margin-bottom: auto; text-align: left;"><span style="font-size: 16px; font-family: '微软雅黑',sans-serif;">MySQL</span><span style="font-size: 16px; font-family: '微软雅黑',sans-serif;">特点</span></p> <p style="margin-top: auto; margin-bottom: auto; text-align: left;"><span style="font-size: 16px; font-family: '微软雅黑',sans-serif;">安装部署MySQL</span></p> <p style="margin-top: auto; margin-bottom: auto; text-align: left;"><span style="font-size: 16px; font-family: '微软雅黑',sans-serif;">在MySQL数据库导入数据</span></p> <p style="margin-top: auto; margin-bottom: auto; text-align: left;"><span style="font-size: 16px; font-family: '微软雅黑',sans-serif;">对MySQL数据库授权</span></p> </td> </tr> <tr> <td style="border-color: currentcolor windowtext windowtext; border-style: none solid solid; border-width: medium 1px 1px; border-image: none 100% / 1 / 0 stretch; padding: 0px 7px;" valign="top" width="553"> <p style="margin-top: auto; margin-bottom: auto; text-align: left;"><strong><span style="font-size: 16px; font-family: '微软雅黑',sans-serif;">第十六章 将SpringCLoud项目部署到k8s平台</span></strong></p> <p style="margin-top: auto; margin-bottom: auto; text-align: left;"><span style="font-size: 16px; font-family: '微软雅黑',sans-serif;">SpringCloud</span><span style="font-size: 16px; font-family: '微软雅黑',sans-serif;">的微服务电商框架</span></p> <p style="margin-top: auto; margin-bottom: auto; text-align: left;"><span style="font-size: 16px; font-family: '微软雅黑',sans-serif;">安装openjdk和maven</span></p> <p style="margin-top: auto; margin-bottom: auto; text-align: left;"><span style="font-size: 16px; font-family: '微软雅黑',sans-serif;">修改源代码、更改数据库连接地址</span></p> <p style="margin-top: auto; margin-bottom: auto; text-align: left;"><span style="font-size: 16px; font-family: '微软雅黑',sans-serif;">通过Maven编译、构建、打包源代码</span></p> <p style="margin-top: auto; margin-bottom: auto; text-align: left;"><span style="font-size: 16px; font-family: '微软雅黑',sans-serif;">在k8s中部署Eureka组件</span></p> <p style="margin-top: auto; margin-bottom: auto; text-align: left;"><span style="font-size: 16px; font-family: '微软雅黑',sans-serif;">在k8s中部署Gateway组件</span></p> <p style="margin-top: auto; margin-bottom: auto; text-align: left;"><span style="font-size: 16px; font-family: '微软雅黑',sans-serif;">在k8s中部署前端服务</span></p> <p style="margin-top: auto; margin-bottom: auto; text-align: left;"><span style="font-size: 16px; font-family: '微软雅黑',sans-serif;">在k8s中部署订单服务</span></p> <p style="margin-top: auto; margin-bottom: auto; text-align: left;"><span style="font-size: 16px; font-family: '微软雅黑',sans-serif;">在k8s中部署产品服务</span></p> <p style="margin-top: auto; margin-bottom: auto; text-align: left;"><span style="font-size: 16px; font-family: '微软雅黑',sans-serif;">在k8s中部署库存服务</span></p> </td> </tr> <tr> <td style="border-color: currentcolor windowtext windowtext; border-style: none solid solid; border-width: medium 1px 1px; border-image: none 100% / 1 / 0 stretch; padding: 0px 7px;" valign="top" width="553"> <p style="margin-top: auto; margin-bottom: auto; text-align: left;"><strong><span style="font-size: 16px; font-family: '微软雅黑',sans-serif;">第十七章 微服务的扩容和缩容</span></strong></p> </td> </tr> <tr> <td style="border-color: currentcolor windowtext windowtext; border-style: none solid solid; border-width: medium 1px 1px; border-image: none 100% / 1 / 0 stretch; padding: 0px 7px;" valign="top" width="553"> <p style="margin-top: auto; margin-bottom: auto; text-align: left;"><strong><span style="font-size: 16px; font-family: '微软雅黑',sans-serif;">第十八章 微服务的全链路监控</span></strong></p> <p style="margin-top: auto; margin-bottom: auto; text-align: left;"><span style="font-size: 16px; font-family: '微软雅黑',sans-serif;">什么是全链路监控?</span></p> <p style="margin-top: auto; margin-bottom: auto; text-align: left;"><span style="font-size: 16px; font-family: '微软雅黑',sans-serif;">为什么要进行全链路监控?</span></p> <p style="margin-top: auto; margin-bottom: auto; text-align: left;"><span style="font-size: 16px; font-family: '微软雅黑',sans-serif;">全链路监控能解决哪些问题?</span></p> <p style="margin-top: auto; margin-bottom: auto; text-align: left;"><span style="font-size: 16px; font-family: '微软雅黑',sans-serif;">常见的全链路监控工具:zipkin、skywalking、pinpoint</span></p> <p style="margin-top: auto; margin-bottom: auto; text-align: left;"><span style="font-size: 16px; font-family: '微软雅黑',sans-serif;">全链路监控工具对比分析</span></p> </td> </tr> <tr> <td style="border-color: currentcolor windowtext windowtext; border-style: none solid solid; border-width: medium 1px 1px; border-image: none 100% / 1 / 0 stretch; padding: 0px 7px;" valign="top" width="553"> <p style="margin-top: auto; margin-bottom: auto; text-align: left;"><strong><span style="font-size: 16px; font-family: '微软雅黑',sans-serif;">第十九章 部署pinpoint服务</span></strong></p> <p style="margin-top: auto; margin-bottom: auto; text-align: left;"><span style="font-size: 16px; font-family: '微软雅黑',sans-serif;">部署pinpoint</span></p> <p style="margin-top: auto; margin-bottom: auto; text-align: left;"><span style="font-size: 16px; font-family: '微软雅黑',sans-serif;">部署pinpoint agent</span></p> <p style="margin-top: auto; margin-bottom: auto; text-align: left;"><span style="font-size: 16px; font-family: '微软雅黑',sans-serif;">在k8s中重新部署带pinpoint agent的产品服务</span></p> <p style="margin-top: auto; margin-bottom: auto; text-align: left;"><span style="font-size: 16px; font-family: '微软雅黑',sans-serif;">在k8s中重新部署带pinpoint agent的订单服务</span></p> <p style="margin-top: auto; margin-bottom: auto; text-align: left;"><span style="font-size: 16px; font-family: '微软雅黑',sans-serif;">在k8s中重新部署带pinpoint agent的库存服务</span></p> <p style="margin-top: auto; margin-bottom: auto; text-align: left;"><span style="font-size: 16px; font-family: '微软雅黑',sans-serif;">在k8s中重新部署带pinpoint agent的前端服务</span></p> <p style="margin-top: auto; margin-bottom: auto; text-align: left;"><span style="font-size: 16px; font-family: '微软雅黑',sans-serif;">在k8s中重新部署带pinpoint agent的网关和eureka服务</span></p> <p style="margin-top: auto; margin-bottom: auto; text-align: left;"><span style="font-size: 16px; font-family: '微软雅黑',sans-serif;">Pinpoint UI</span><span style="font-size: 16px; font-family: '微软雅黑',sans-serif;">界面使用</span></p> </td> </tr> <tr> <td style="border-color: currentcolor windowtext windowtext; border-style: none solid solid; border-width: medium 1px 1px; border-image: none 100% / 1 / 0 stretch; padding: 0px 7px;" valign="top" width="553"> <p style="margin-top: auto; margin-bottom: auto; text-align: left;"><strong><span style="font-size: 16px; font-family: '微软雅黑',sans-serif;">第二十章 基于Jenkins+k8s+harbor等构建企业级DevOps平台</span></strong></p> </td> </tr> <tr> <td style="border-color: currentcolor windowtext windowtext; border-style: none solid solid; border-width: medium 1px 1px; border-image: none 100% / 1 / 0 stretch; padding: 0px 7px;" valign="top" width="553"> <p style="margin-top: auto; margin-bottom: auto; text-align: left;"><strong><span style="font-size: 16px; font-family: '微软雅黑',sans-serif;">第二十一章 基于Promethues+Alert+Grafana搭建企业级监控系统</span></strong></p> </td> </tr> <tr> <td style="border-color: currentcolor windowtext windowtext; border-style: none solid solid; border-width: medium 1px 1px; border-image: none 100% / 1 / 0 stretch; padding: 0px 7px; word-break: break-all;" valign="top" width="553"> <p style="margin-top: auto; margin-bottom: auto; text-align: left;"><strong><span style="font-size: 16px; font-family: '微软雅黑',sans-serif;">第二十二章 部署智能化日志收集系统EFK</span></strong></p> </td> </tr> </tbody> </table> <p><span style="font-size: 24px; color: #ff0000;"> </span></p>
相关推荐
<p> <span style="color:#333333;">最近的三年多时间,随着容器技术的火爆及Kubernetes成为容器编排管理的标准,国内外厂商均已开始了全面拥抱Kubernetes的转型, 无数中小型企业已经落地 Kubernetes,或正走在容器化的道路上 。</span> </p> <p> <span style="color:#333333;"><br /></span> </p> <p> <span style="color:#333333;">第一章</span> </p> <p> <span style="color:#333333;">介绍docker的前世今生,了 解docker的实现原理,以Django项目为例,教大家如何编写最佳的Dockerfile实现构业务镜像的制作。通过本章的学习,大家会知道docker的概念及基本操作,并学会构建自己的业务镜像,并通过抓包的方式掌握Docker最常用的bridge网络模式的通信。<br /></span> </p> <p> <span style="color:#333333;"><br /></span> </p> <p> <span style="color:#333333;">第二章</span> </p> <p> 本章学习kubernetes的架构及工作流程,重点介绍如本章学习kubernetes的架构及工作流程,重点介绍如断的滚动更新,通过服务发现来实现集群内部的服务间访问,并通过ingress- -nginx实现外部使用域名访问集群内部的服务。同时介绍基于EFK如何搭建Kubernetes集群的日志收集系统。 </p> <p> <br /> 学完本章,我们的Django demo项目已经可以运行在k8s集群中,同时我们可以使用域名进行服务的访问。 </p> <p> <br /></p> <p> 第三章 </p> <p> 本章基于k8s集群部署gitlab、sonarQube、 Jenkins等工具,并把上述工具集成到Jenkins中,以Django项目为例,通过多分支流水线及Jenkinsfle实现项目代码提交到不同的仓库分支,实现自动代码扫描、单元测试、docker容器构建、k8s服务的自动部署。 </p> <p> <br /></p> <p> 第四章 </p> <p> 由于公司内部项目众多,大量的项目使用同一套流程做CICD,那么势必会存在大量的重复代码,因此本章主要通过使用groovy实现Jenkins的sharedL ibrary的开发,以提取项目在CICD实践过程中的公共逻辑,提供一系列的流程的接口供公司内各项目调用,开发完成后,还是以Django的demo项目为例,进行Jenkinsfle的改造,最后仅需通过简单的Jenkinsfle的配置,即可优雅的完成CICD流程的整个过程,此方式已在大型企业内部落地应用。<br /></p>
©️2020 CSDN 皮肤主题: 鲸 设计师:meimeiellie 返回首页