What's the exactly flow chart of an outside request comes into k8s pod via Ingress?

前端 未结 1 1617
闹比i
闹比i 2020-12-18 16:53

all

  1. I knew well about k8s\' nodePort and ClusterIP type in services.

  2. But I am very confused about the Ingress way, because how will a reques

相关标签:
1条回答
  • 2020-12-18 17:34

    The key part of the picture is the Ingress Controller. It's an instance of a proxy (could be nginx or haproxy or another ingress type) and runs inside the cluster. It acts as an entrypoint and lets you add more sophisticated routing rules. It reads Ingress Resources that are deployed with apps and which define the routing rules. This allows each app to say what the Ingress Controller needs to do for routing to it.

    Because the controller runs inside the cluster, it needs to be exposed to the outside world. You can do this by NodePort but if you're using a cloud provider then it's more common to use LoadBalancer. This gives you an external IP and port that reaches the Ingress controller and you can point DNS entries at that. If you do point DNS at it then you have the option to use routing rules base on DNS (such as using different subdomains for different apps).

    The article 'Kubernetes NodePort vs LoadBalancer vs Ingress? When should I use what?' has some good explanations and diagrams - here's the diagram for Ingress:

    0 讨论(0)
提交回复
热议问题