Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
SlideShare a Scribd company logo
Kubernetes
Service with High Availability
1
Me
 鄭偉聖, Sam Zheng
 CS student in NCTU
 Intern in National Center for High-performance
Computing (NCHC)
 Intern in Industrial Technology Research Institute
(ITRI)
 Familiar with OpenStack, Docker and Kubernetes
 kweisamx.cs05g@g2.nctu.edu.tw
2
Kubernetes Networking
3
4
5
How do we to export the service IP to public
network on bare metel?
 In kubernetes we have some existed solution
 NodePort
 CloudProvider Load Balancer
 Ingress
 But it is enough?
6
NodePort
7
kubeProxy kubeProxy kubeProxy
NodePort NodePort NodePort
Pod Pod Pod
NodePort
8
kubeProxy kubeProxy kubeProxy
NodePort NodePort NodePort
Pod Pod Pod
Load Balancer
 Cloud Provider e.g. AWS , GCP, OpenStack
 Load Balancer is created by Cloud Provider, and provide
the external IP to for service
 But it is only for Cloud Provider, the bare metal cannot
do this
9
Load Balancer
10
kubeProxy kubeProxy kubeProxy
NodePort NodePort NodePort
Cloud
LoadBalancer
Pod Pod Pod
11
Ingress
12
 HTTP Load Balancing
 SSL Termination
 Content-base Rourting
 Not fully for external network
Ingress
13
Ingress
nginx.com echoheaders.com
ServiceA ServiceB
10.0.0.1:80
Ingress
14
Ingress
Controller
Ingress
Resource
Load Balancer
watches configure
Ingress
15
kubeProxy
kubeProxy kubeProxy
Pod PodPodPod PodPod
Momo.foo.com
Jojo.foo.com
yoyo.foo.com
hostnetwork
Ingress
16
kubeProxy
kubeProxy kubeProxy
Pod PodPodPod PodPod
DNS
17
Keep-Alived VIP
 Real High-Availability
 Virtual IP Address
 IP to Service
 Configmap
 DaemonSet
18
Ref :
- https://github.com/kubernetes/contrib/tree/master/keepalived-vip
Keep-Alived VIP
19
kubeProxy kubeProxy kubeProxy
Pod PodPod
Keepalived Keepalived Keepalived
140.113.1.1 140.113.1.2 140.113.1.3
Vip: 140.113.1.50
Keep-Alived VIP
20
kubeProxy kubeProxy kubeProxy
PodPodPod
Keepalived Keepalived Keepalived
140.113.1.1 140.113.1.2 140.113.1.3
Vip: 140.113.1.50
Pod
Keep-Alived VIP
21
kubeProxy kubeProxy kubeProxy
PodPodPod
Keepalived Keepalived Keepalived
140.113.1.1 140.113.1.2 140.113.1.3
Vip: 140.113.1.50
22
Keep-Alived VIP + Ingress
23
kubeProxy kubeProxy kubeProxy
PodPod Pod
Keepalived Keepalived Keepalived
140.113.1.1 140.113.1.2 140.113.1.3
Vip: 140.113.1.50
Momo.foo.com
ojo.foo.com
Summary
 Just have fun or Test – NodePort
 Using Cloud to build your kubernetes – Cloud Load
Balancer
 Using DNS to provide your service – Ingress
 VIP – keepalived-VIP
24

More Related Content

Kubernetes service with ha