In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-09 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >
Share
Shulou(Shulou.com)06/01 Report--
Since the beginning of Rancher 1.0, Rancher has gradually added support for multiple choreography engines such as Kubernetes, Swarm, Mesos, and so on. Many friends have wondered, such as what is the relationship between the Cattle engine and these? How is each engine supported? How to choose your own business environment? We will gradually unveil these mysteries and understand the infrastructure so that we can effectively analyze problems when we encounter problems, and then accurately locate and solve problems, because no production environment is completely reliable. Against this background, this time we first introduce the architecture of kubernetes in Rancher.
Judging from the current pace of development of Rancher, the Cattle engine has been defined as the infrastructure engine of Rancher, and what are the infrastructure services of Rancher? As follows:
Unified network services for Networking,Rancher, provided by rancher-net components
At present, the routine of Load Balancer,Rancher 's load balancing service is basically based on Haproxy.
DNS Service,Rancher 's DNS service, mainly to provide service discovery capabilities, is provided by the Rancher-DNS component
Metadata Service,Rancher 's metadata service, Metadata is a powerful tool for us to orchestrate applications through compose, which can be as flexible as injecting specific information into service.
Persistent Storage Service, persistent storage service is currently provided by convoy, but for the real implementation of back-end storage, Rancher and longhorn have not been fully released
Audit Logging, audit log service is an important attribute in enterprise scenarios. At present, the integration within Cattle has not been completely separated.
So when Rancher connects to any orchestration engine, it will eventually integrate infrastructure services into it, as Kubernetes in Rancher does.
The roles of each component of Kubernetes can be classified into three categories: Master, Minion, Etcd,Master is mainly kube-apiserver, kube-scheduler, kube-controller-manager,Minion is mainly kubelet and kube-proxy. In order to integrate the management and control functions of K8s, Rancher adds kuberctrld, ingress-controller and kubernetes-agent services to Master to connect Rancher and K8s. At the same time, each node relies on Rancher-DNS, Rancher-metadata and Rancher-net infrastructure services provided by Rancher.
Since K8s is deployed based on the Cattle engine, we can clearly see the overall deployment situation through Link Graph after the deployment of K8s is completed.
The whole service is built based on the Rancher-compose of Cattle engine. Kubelet and kube-proxy services are automatically added after adding nodes (here taking advantage of the features of Global Label), and health-check mechanism is added to each component to ensure a certain degree of high availability. Considering that etcd has a minimum of 1 node and a maximum of 3 nodes, K8s can be deployed on a single agent host, while it is more reasonable for a three-node agent host.
After the K8s cluster is deployed, we can add a variety of application services to it. At present, Rancher supports service, pod, replication-controller and so on to manage K8s. We can use a diagram to describe the application view structure.
The rancher-net component assigns an IP,Rancher-DNS to each pod instead of the Skydns of K8s to achieve service discovery. Rancher-metadata services can still be accessed inside the pod container to obtain metadata information. In addition to these three basic services, kuberctrld, ingress-controller and kubernetes-agent, which we mentioned earlier, also play important roles.
Whether it is K8s or Rancher, some abstract objects (such as the stack/service of Rancher or the serivice/pod of K8s) will generate events when the attribute is updated, and events will be generated when changing these abstract objects at any service entry, so to ensure that Rancher and K8s are aware of each other's updates, then kubernetes-agent arises at the historic moment.
Information changes of objects such as namespaces, services, replicationcontrollers and pods of K8s will be notified to Rancher in time, and information changes of Host resources managed by Cattle (such as changes in host label) will also be notified to K8s.
To put it simply, kubernetes-agent is to maintain the object consistency between Rancher and K8s, but if you really want to create objects such as service or pod in K8s through Rancher, you need another service to achieve, which is kubectrld. Intuitively speaking, it wraps kubectrl and realizes kubectl create/apply/get and other functions.
All K8s object creation requests go through the cattle engine, and cattle proxies the request to an api service started by kubectrld. In addition, the Rancher events is listened to to assist in the implementation of the CRUD of related objects.
If the service created on K8s needs to be exposed, then LoadBalancer Type and Ingress kind are bound to be used. Note that LoadBalancer and Ingress under the concept of K8s are slightly different. The function of LoadBalancer is mainly focused on supporting http/tcp in L4, while Ingrees is to achieve L7 load balancing and can only support http. The LoadBalancer of K8s needs to implement a Cloud Provider in K8s. Currently there is only GCE, while Rancher maintains its own version of K8s in which Rancher Cloud Provider is provided. For Ingress, the Ingress-controller component is provided, which implements the ingress framework of K8s, which can obtain the creation information of ingress and execute the corresponding interface. Of course, in the end, both of them will call Cattle api to create the load balancer of Rancher, and both will be responsible for the balancing function through Haproxy.
With the current hot momentum of the K8s community, Rancher should continue to follow up and update the functional optimization architecture. After the release of Rancher1.2, CNI support will be a milestone, and then Kubernetes in Rancher will be more mature and make great strides towards the best use of Kubernetes distribution.
Original source: Rancher Labs
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.