k8s可以把整个datacenter作为一个完整的计算资源来运行apps。

k8s是一个软件系统,它可以允许你在这上面轻松的部署和管理容器应用,它是基于features of linux containers来运行不同的applications而不用去理会任何的应用的internal details,(云供应商可以将不同客户的不同应用部署在同一台机器上这样可以充分利用硬件资源而不会影响每一个应用的使用)。

k8s可以视作一个cluster(部署不同application的集群)的操作系统。k8s还提供诸如服务发现,动态扩容,负载均衡,自我修复和选主的功能。让开发者可以专注于application的开发。k8s还可以最大化资源利用,在容器中运行的app可以随时迁移,不需要绑定固定的node,所以kubernetes可以动态的计算出最优的资源利用方案,从而动态的调整app所在的node。

 

一个k8s cluster由多个node组成,分为master node(hosts the kubernets control plane that controls and manages the whole kubernetes system but not run your applications) 和 worker nodes(run the actual applicaiton you deploy)。

control plane

  • The Kubernetes API Server, which you and the other Control Plane components communicate with
  • The Scheduler, which schedules your apps (assigns a worker node to each deployable component of your application)
  • The Controller Manager, which performs cluster-level functions, such as replicating components, keeping track of worker nodes, handling node failures, and so on
  • etcd, a reliable distributed data store that persistently stores the cluster configuration.

worker nodes

  • Docker, rkt, or another container runtime, which runs your containers
  • The Kubelet, which talks to the API server and manages containers on its node
  • The Kubernetes Service Proxy (kube-proxy), which load-balances network traffic between application components

 

这个图意味着有四个container被分成了3个pod(最后一个pod有两个container,这意味着这两个container需要一起运行,不是完全isolated),然后由control plane 指定给每个pod一个具体数量的replicas到可用的worker nodes上运行。每个pod都有一个唯一的IP address。

Logo

K8S/Kubernetes社区为您提供最前沿的新闻资讯和知识内容

更多推荐