简体   繁体   English

Kubernetes 中的复制控制器 V/S 入口控制器

[英]Replication Controller V/S Ingress Controller in Kubernetes

Kubernetes 中的复制控制器和入口控制器有什么区别?

The Replication Controller is the original form of replication in Kubernetes.复制控制器是 Kubernetes 中复制的原始形式。 It's being replaced by Replica Sets, but it's still in wide use.它正在被 Replica Sets 取代,但它仍在广泛使用。 A Replication Controller is a structure that enables you to easily create multiple pods, then make sure that that number of pods always exists.复制控制器是一种结构,可让您轻松创建多个 Pod,然后确保该数量的 Pod 始终存在。 If a pod does crash, the Replication Controller replaces it.如果 pod 崩溃,复制控制器会替换它。

Ingress exposes HTTP and HTTPS routes from outside the cluster to services within the cluster. Ingress 将来自集群外部的 HTTP 和 HTTPS 路由暴露给集群内的服务。 Traffic routing is controlled by rules defined on the ingress resource.流量路由由在入口资源上定义的规则控制。 An ingress can be configured to give services externally-reachable URLs, load balance traffic, terminate SSL, and offer name based virtual hosting.入口可以配置为为服务提供外部可访问的 URL、负载平衡流量、终止 SSL 并提供基于名称的虚拟主机。 An ingress controller is responsible for fulfilling the ingress, usually with a loadbalancer, though it may also configure your edge router or additional frontends to help handle the traffic.入口控制器负责完成入口,通常使用负载均衡器,但它也可能配置您的边缘路由器或其他前端来帮助处理流量。

In order for ingress resource to work, the cluster must have an ingress controller running.为了让入口资源工作,集群必须有一个入口控制器在运行。 This is unlike other types of controllers, which run as part of the kube-controller-manager binary, and are typically started automatically with a cluster.这与其他类型的控制器不同,它们作为 kube-controller-manager 二进制文件的一部分运行,并且通常随集群自动启动。 Ingress Controllers can technically be any system capable of reverse proxying, but the most common is Nginx.从技术上讲,入口控制器可以是任何能够进行反向代理的系统,但最常见的是 Nginx。

In a nutshell, replication controller is a controller which handles the pod replication in your cluster and makes sure you're running the desired number of replicas of pods.简而言之,复制控制器是一个控制器,它处理集群中的 pod 复制,并确保您运行所需数量的 pod 副本。 This controller comes as a part of kube-controller-manager by default.默认情况下,该控制器是 kube-controller-manager 的一部分。 While Ingress controller is reverse proxy controller which is used to route the HTTP/HTTPS traffic from outside the cluster to services withing the kubernetes cluster. Ingress 控制器是反向代理控制器,用于将 HTTP/HTTPS 流量从集群外部路由到 kubernetes 集群中的服务。

Replication Controller is one of the key features of Kubernetes, which is responsible for managing the pod lifecycle. Replication Controller 是 Kubernetes 的关键特性之一,它负责管理 pod 生命周期。 It is responsible for making sure that the specified number of pod replicas are running at any point of time.它负责确保指定数量的 pod 副本在任何时间点都在运行。 It is used in time when one wants to make sure that the specified number of pod or at least one pod is running.当需要确保指定数量的 pod 或至少一个 pod 正在运行时使用。 It has the capability to bring up or down the specified no of pod.它具有启动或关闭指定数量的 pod 的能力。

A Kubernetes Ingress controller is a specialized load balancer for Kubernetes environments. Kubernetes Ingress 控制器是 Kubernetes 环境的专用负载均衡器。 Kubernetes is the de facto standard for managing containerized applications. Kubernetes 是管理容器化应用程序的事实标准。 For many enterprises, moving production workloads into Kubernetes brings additional challenges and complexities around application traffic management.对于许多企业而言,将生产工作负载迁移到 Kubernetes 会带来应用流量管理方面的额外挑战和复杂性。 An Ingress controller abstracts away the complexity of Kubernetes application traffic routing and provides a bridge between Kubernetes services and external ones. Ingress 控制器抽象了 Kubernetes 应用程序流量路由的复杂性,并在 Kubernetes 服务和外部服务之间架起了一座桥梁。

Kubernetes Ingress controllers: Kubernetes 入口控制器:

  • Accept traffic from outside the Kubernetes platform, and load balance it to pods (containers) running inside the platform接受来自 Kubernetes 平台外部的流量,并将其负载均衡到在平台内部运行的 Pod(容器)
  • Can manage egress traffic within a cluster for services which need to communicate with other services outside of a cluster可以管理集群内需要与集群外其他服务通信的服务的出口流量
  • Are configured using the Kubernetes API to deploy objects called “Ingress Resources”使用 Kubernetes API 进行配置以部署名为“Ingress Resources”的对象

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM