Module 02 · Kubernetes Basics
Summary & Highlights: Kubernetes Basics概要与重点:Kubernetes 基础
Congratulations! You have completed this module. At this point, you know:
恭喜!您已完成本模块。此时,您知道:
- Container orchestration automates the container lifecycle resulting in faster deployments, reduced errors, higher availability, and more robust security.
容器编排自动化了容器生命周期,从而实现了更快的部署、减少错误、提高可用性和更强的安全性。 - Kubernetes Is a highly portable, horizontally scalable, open-source container orchestration system with automated deployment and simplified management capabilities.
Kubernetes 是一个高度可移植、水平可扩展的开源容器编排系统,具有自动化部署和简化管理功能。 - Kubernetes architecture consists of a control plane and one or more worker planes.
Kubernetes 架构由一个控制平面和多个工作平面组成。 - A control plane includes controllers, an API server, a scheduler, and an etcd.
控制平面包括控制器、API 服务器、调度器和 etcd。 - A worker plane includes nodes, a kubelet, container runtime, and kube-proxy.
一个工作节点包括节点、kubelet、容器运行时和 kube-proxy。 - Kubernetes objects include Namespaces, Pods, ReplicaSets, Deployments, and Services.
Kubernetes 对象包括命名空间、Pod、副本集、部署和服务。 - Namespaces help in isolating groups of resources within a single cluster.
命名空间有助于在单个集群中隔离资源组。 - Pods represent a process or an instance of an app running in the cluster.
Pod 代表在集群中运行的进程或应用程序实例。 - ReplicaSets create and manage horizontally scaled running Pods.
ReplicaSets 用于创建和管理水平扩展的运行 Pod。 - Deployments provide updates for Pods and ReplicaSets.
Deployments 为 Pods 和 ReplicaSets 提供更新。 - A service in Kubernetes is a REST object that provides policies for accessing the pods and cluster.
Kubernetes 中的服务是一个提供访问 Pods 和集群策略的 REST 对象。 - Kubernetes capabilities include automated rollouts and rollbacks, storage orchestration, horizontal scaling, automated bin packing, secret and configuration management, Ipv4/Ipv6 dual-stack support, batch execution, self-healing, service discovery, load balancing, and extensible design.
Kubernetes 的功能包括自动发布和回滚、存储编排、水平扩展、自动二进制打包、密钥和配置管理、IPv4/IPv6 双栈支持、批处理执行、自我修复、服务发现、负载均衡和可扩展设计。 - Services in Kubernetes are REST objects that provide policies for accessing the pods and cluster. ClusterIP provides Inter-service communication within the cluster; a NodePort Service creates and routes the incoming requests automatically to the ClusterIP Service; the External Load Balancer, or ELB, creates NodePort and ClusterIP Services automatically and External Name service represents external storage as well as enables Pods from different namespaces to talk to each other.
Kubernetes 中的服务是提供对 Pod 和集群访问策略的 REST 对象。ClusterIP 提供集群内服务间的通信;NodePort 服务自动创建并路由传入请求到 ClusterIP 服务;外部负载均衡器(ELB)自动创建 NodePort 和 ClusterIP 服务;外部名称服务将外部存储表示出来,并允许不同命名空间中的 Pod 相互通信。 - Ingress is an API object that provides routing rules to manage external users' access to multiple services in a Kubernetes cluster; whereas using a DaemonSet ensures that there is at least one copy of the pod on all nodes; a StatefulSet manages stateful applications, manages Pod deployment and scaling, maintains a sticky identity for each Pod request and provides persistent storage volumes for your workloads and lastly a Job creates pods and tracks the Pod completion process; Jobs are retried until completed.
Ingress 是一个 API 对象,提供路由规则以管理外部用户对 Kubernetes 集群中多个服务的访问;而使用 DaemonSet 可确保所有节点上至少有一个 Pod 副本;StatefulSet 管理有状态的应用,管理 Pod 的部署和扩展,为每个 Pod 请求维护一个粘性身份,并为工作负载提供持久化存储卷;最后,Job 创建 Pod 并跟踪 Pod 的完成过程;Job 会一直重试直到完成。