Detailed explanation of building Docker cluster management based on Kubernetes

Before the formal introduction, it is necessary for everyone to understand several core concepts of Kubernetes and the functions it undertakes. The following is the architecture design diagram of Kubernetes:

1. Pods

In the Kubernetes system, the smallest particle of scheduling is not a simple container, but is abstracted into a Pod. A Pod is the smallest deployment unit that can be created, destroyed, scheduled, and managed. Such as a container or a group of containers.

2. Replication Controllers

Replication Controller is the most useful function in the Kubernetes system. It realizes the replication of multiple Pod copies. Often an application needs multiple Pods to support, and it can guarantee the number of copies to be copied. The Controller can ensure that the same number of Pods are enabled on other hosts. Replication Controller can create multiple Pod replicas through the repcon template, and can also directly copy existing Pods, which need to be associated through the Label selector.

3. Services

Services is the most peripheral unit of Kubernetes. By virtualizing an access IP and service port, you can access the Pod resources we defined. The current version is implemented by nat forwarding of iptables. The forwarding target port is a random port generated by Kube_proxy. Currently Only provide access scheduling on GOOGLE cloud, such as GCE. How to integrate with our self-built platform? Please pay attention to the next article "Integration of kubernetes and HECD Architecture".

4. Labels

Labels are key/value pairs used to distinguish Pods, Services, and Replication Controllers. They are only identified by the relationship between Pods, Services, and Replication Controllers. However, when operating on these units, name labels must be used.

5. Proxy

Proxy not only solves the problem of the same service port conflict on the same host, but also provides the ability of Service to forward service ports to provide services to the outside world. The Proxy backend uses a random and round-robin load balancing algorithm.

Let me talk about my personal opinion. At present, Kubernetes maintains the rhythm of a small version a week and a large version a month. The iteration speed is extremely fast. At the same time, it also brings differences in the operation methods of different versions. In addition, the update speed of the official website documents is relatively lagging and lacking. Beginners pose some challenges. In the upstream access layer, the official focus is also on the optimization of GCE (Google Compute Engine) connection, and a feasible access solution has not yet been launched for personal private clouds. The service proxy forwarding mechanism was only introduced in the v0.5 version, and it was implemented through iptables. The performance was worrying under high concurrency. However, the author is still optimistic about the future development of Kubernetes. At least we have not yet seen another platform with a system and a good ecosystem. It is believed that in V1.0, it will have the service support capability of the production environment.

 

http://www.csdn.net/article/2014-12-24/2823292-Docker-Kubernetes

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326633798&siteId=291194637