官术网_书友最值得收藏!

Ingress

We previously discussed how Kubernetes uses the service abstract as a means to proxy traffic to a backing pod that's distributed throughout our cluster. While this is helpful in both scaling and pod recovery, there are more advanced routing scenarios that are not addressed by this design.

To that end, Kubernetes has added an ingress resource, which allows for custom proxying and load balancing to a back service. Think of it as an extra layer or hop in the routing path before traffic hits our service. Just as an application has a service and backing pods, the ingress resource needs both an Ingress entry point and an ingress controller that perform the custom logic. The entry point defines the routes and the controller actually handles the routing. This is helpful for picking up traffic that would normally be dropped by an edge router or forwarded elsewhere outside of the cluster.

Ingress itself can be configured to offer externally addressable URLs for internal services, to terminate SSL, offer name-based virtual hosting as you'd see in a traditional web server, or load balance traffic. Ingress on its own cannot service requests, but requires an additional ingress controller to fulfill the capabilities outlined in the object. You'll see nginx and other load balancing or proxying technology involved as part of the controller framework.  In the following examples, we'll be using GCE, but you'll need to deploy a controller yourself in order to take advantage of this feature. A popular option at the moment is the nginx-based ingress-nginx controller.

An ingress controller is deployed as a pod which runs a daemon. This pod watches the Kubernetes apiserver/ingresses endpoint for changes to the ingress resource. For our examples, we will use the default GCE backend.

主站蜘蛛池模板: 江门市| 阜新市| 芦山县| 海南省| 星子县| 邯郸县| 宁都县| 澎湖县| 白城市| 揭阳市| 永济市| 榆社县| 武平县| 余庆县| 关岭| 肇东市| 钟祥市| 丰都县| 丹棱县| 定襄县| 赤城县| 泗阳县| 繁昌县| 城固县| 弥勒县| 防城港市| 琼海市| 新干县| 泰来县| 新沂市| 广河县| 渝北区| 河津市| 黔江区| 宣化县| 长垣县| 吉木萨尔县| 延长县| 石林| 濮阳县| 吉隆县|