Docker 简明教程

Docker - Kubernetes Architecture

Kubernetes 是一个用于 Docker 容器的编排框架,可帮助将容器作为服务暴露给外部世界。例如,您可以拥有两项服务 − 一项服务包含 nginxmongoDB ,另一项服务包含 nginxredis 。每项服务都可以有可以由其他应用程序连接的 IP 或服务点。然后,Kubernetes 用于管理这些服务。

Kubernetes is an orchestration framework for Docker containers which helps expose containers as services to the outside world. For example, you can have two services − One service would contain nginx and mongoDB, and another service would contain nginx and redis. Each service can have an IP or service point which can be connected by other applications. Kubernetes is then used to manage these services.

下图以一种简单的格式显示了 Kubernetes 从架构角度的工作方式。

The following diagram shows in a simplistic format how Kubernetes works from an architecture point of view.

kubernetes architecture

minion 是所有服务运行的节点。你可以一次运行多个手下。每个手下将托管一个或多个 POD。每个 POD 就像托管一项服务。每个 POD 随后包含 Docker 容器。每个 POD 可以托管一组不同的 Docker 容器。然后代理用来控制向外部世界公开这些服务。

The minion is the node on which all the services run. You can have many minions running at one point in time. Each minion will host one or more POD. Each POD is like hosting a service. Each POD then contains the Docker containers. Each POD can host a different set of Docker containers. The proxy is then used to control the exposing of these services to the outside world.

Kubernetes 在其架构中有多个组件。每个组件的角色如下所述 &mius;

Kubernetes has several components in its architecture. The role of each component is explained below &mius;

  1. etcd − This component is a highly available key-value store that is used for storing shared configuration and service discovery. Here the various applications will be able to connect to the services via the discovery service.

  2. Flannel − This is a backend network which is required for the containers.

  3. kube-apiserver − This is an API which can be used to orchestrate the Docker containers.

  4. kube-controller-manager − This is used to control the Kubernetes services.

  5. kube-scheduler − This is used to schedule the containers on hosts.

  6. Kubelet − This is used to control the launching of containers via manifest files.

  7. kube-proxy − This is used to provide network proxy services to the outside world.