In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article shows you what the practice of Kubernetes Ingress highly reliable deployment is, which is concise and easy to understand. I hope you can gain something through the detailed introduction of this article.
Brief introduction
In a Kubernetes cluster, Ingress is a set of rules authorizing inbound connections to the cluster service, providing you with layer-7 load balancer capabilities. You can provide externally accessible URL, load balancer, SSL, name-based virtual hosts, etc., through Ingress configuration. As a cluster traffic access layer, the high reliability of Ingress is particularly important. Today we mainly discuss how to deploy a set of high-performance and reliable Ingress access layer.
Highly reliable deployment architecture
The first thing to solve the problem of high reliability is single point of failure. Multi-replica deployment is commonly used. We also use multi-node deployment architecture to deploy highly reliable Ingress access layer in Kubernetes cluster. Since Ingress is used as the access point for cluster traffic, it is recommended to monopolize Ingress nodes to avoid resource competition between business applications and Ingress services.
Cdn.com/b5223438010ba6de332c1f5f56195920a1eae44e.png ">
As shown in the above deployment architecture diagram, the unified access layer composed of multiple exclusive Ingress instances carries the ingress traffic of the cluster, and the Ingress nodes can be scaled and scaled according to the level of back-end business traffic. Of course, if your previous cluster is not large, you can also mix Ingress services with business applications, but it is recommended to restrict and isolate resources.
Deploy highly reliable Ingress access layer deployment instructions in Ali Cloud CCS cluster
Ingress SLB:Ingress access layer front-end SLB instance
Ingress Node: the cluster node on which Ingress Pod is deployed
Ingress Pod:Ingress service instance
The association among the three is based on the tag node-role.kubernetes.io/ingress=true:
The Ingress SLB backend will only mount the cluster Node marked with node-role.kubernetes.io/ingress=true.
Ingress Pod will only be deployed to the cluster Node marked with node-role.kubernetes.io/ingress=true
Start deployment
1. Create a Kubernetes cluster
Before creating a cluster, we need to properly plan the size of the cluster and the roles of each node in the cluster according to our specific business scenarios, such as the number of business nodes and the number of Ingress nodes. Note that the cluster initializes 3 Master nodes by default to deploy cluster management and control services.
We create a Kubernetes cluster through the Ali Cloud CCS console. Here we take the creation of 3 Worker node clusters as an example.
2. Marking Ingress Node
Due to the small size of the test cluster, we temporarily adopt a mixed-part approach, that is, three Worker nodes are used as both business nodes and Ingress nodes. We mark the three Worker nodes with node-role.kubernetes.io/ingress=true at the same time. It is not recommended to deploy Ingress Pod on the cluster Master node, because the Master node carries all the management and control services of the cluster to avoid the impact on the management and control service when the cluster access traffic is too high.
~ kubectl label no cn-hangzhou.i-bp1ecwpuisra0y0bizdb node-role.kubernetes.io/ingress=truenode "cn-hangzhou.i-bp1ecwpuisra0y0bizdb" >
3. Create an Ingress service
An Ingress Controller is deployed by default when the cluster is initialized. For more information on deployment, please see. Here, we redeploy it to the target Ingress Node via DaemonSet. Of course, you can also deploy it using Deployment with affinity.
~ kubectl-n kube-system delete deploy nginx-ingress-controllerdeployment "nginx-ingress-controller" deleted ~ kubectl create-f https://acs-k8s-ingress.oss-cn-hangzhou.aliyuncs.com/nginx-ingress-controller-ds.ymldaemonset "nginx-ingress-controller" created ~ kubectl-n kube-system get ds | grep nginx-ingress-controllernginx-ingress-controller 3 3 3 node-role.kubernetes.io/ Ingress=true 42s ~ kubectl-n kube-system get pod-o wide | grep nginx-ingress-controllernginx-ingress-controller-57j4l 1 Running 0 1m 172.16.3.2 cn-hangzhou.i-bp1ecwpuisra0y0bizddnginx-ingress-controller-d7cxb 1 Running 0 1m 172.16.5 . 7 cn-hangzhou.i-bp1ecwpuisra0y0bizdcnginx-ingress-controller-m9w75 1/1 Running 0 1m 172.16.4.2 cn-hangzhou.i-bp1ecwpuisra0y0bizdb
4. Update Ingress SLB service
An Ingress LoadBalancer Service is deployed by default during cluster initialization. For more information on deployment, please see the Ingress LoadBalancer Service to automatically identify the Ingress Node that is mounted and marked.
~ kubectl apply-f https://acs-k8s-ingress.oss-cn-hangzhou.aliyuncs.com/nginx-ingress-slb-service.ymlservice "nginx-ingress-lb" configured
5. At this point, the highly reliable access layer deployment with 3 Ingress instances is completed.
Rapid expansion
As your business traffic continues to grow and the size of the cluster continues to expand, you only need to quickly expand the Ingress access layer by marking.
Omni-directional monitoring
The monitoring of the access layer of cluster Ingress is essential. You can fully monitor Ingress Pod and Ingress Node through Ali Cloud CCS monitoring and Ali Cloud Monitoring.
The above is what the practice of Kubernetes Ingress highly reliable deployment is like. Have you learned the knowledge or skills? If you want to learn more skills or enrich your knowledge reserve, you are welcome to follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.