K8s explore

01 dive in

k8s是什么?

官网上大字写着,Production-Grade Container Orchestration ,生产级别的容器交响乐,funny

一句话描述, Kubernetes (K8s) is an open-source system for automating deployment, scaling, and management of containerized applications.

重点集中在 deployment, scaling, automating, management。

02 概念

k8s中,抽象了很多概念,借助图形,这些概念很容易理解。可以结合docker的概念来协助理解。

  • Cluster > 组织
  • Master > 领头人
  • Node > A host, VM or phyzical machine
  • Deployment > 先用docker run理解, 意为部署一个应用
  • Pod > container 承载应用的一个instance
  • Label > docker name, 不过这里是 key value形式,而且打label的对象是service,而不是一个contanier,1个service可能会包含多个contianer,也就是多个Pod
  • Label Selector > 选择器,类比css 或 js selector
  • Service > 在不同的pods之间路由流量。Service可以从字面意思理解,你只需关心这个Service提供了什么服务,比如图像处理的一个api,这这个api后面用了多少个pod来load balance,他们之间怎么分发流量,不需关心。对外表现专一,对内协调。
  • Scale > k8s的特点,伸缩性。 拽几个instance来load balance和high availability , 由Service来协调。
  • Rolling Update > 利用几个instance高可用的特性,实现版本升级,downtime为0, 也能平滑rollback

03 setup runtime

Waiting…

Reference: https://kubernetes.io/docs/tutorials/kubernetes-basics/