本文介绍了Kubernetes控制器vs Kubernetes运营商?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

据我了解,Kubernetes Controller的目的是确保当前状态等于所需状态.尽管如此,Kubernetes Operator还是做同样的工作.

As I understand the purpose of the Kubernetes Controller is to make sure that current state is equal to the desired state. Nevertheless, Kubernetes Operator does the same job.

控制面板中的控制器列表:

The list of controller in the Control-plane:

  • 部署
  • ReplicaSet
  • StatefulSet
  • DaemonSet

在Google搜索中,我发现有K8s运算符,例如

From the Google Search, I found out that there are K8s Operators such as

  • etcd运算符
  • 普罗米修斯算子
  • 空中运营商

但是,我无法理解为什么无法使用Controller做到这一点?

However, I was not able to understand why it cannot be done using Controller?

操作员是对控制器的补充吗?

Is Operator complementing the Controllers?

这两种设计的目的和功能有什么区别?

What's the difference between these two design as a purpose and functionality.

在控制器和操作员之间进行选择时,需要记住哪些特定事项? ?

What certain things need to keep in mind to choose between Controller and Operator? ?

推荐答案

我相信"kubernetes运算符"一词是由引入的.这里的CoreOS人员

I believe the term "kubernetes operator" was introduced by the CoreOS people here

因此,基本上,kubernetes运算符是一种模式的名称,该模式由kubernetes控制器组成,该控制器将新对象添加到Kubernetes API中,以便配置和管理Prometheus或etcd之类的应用程序.

So basically, a kubernetes operator is the name of a pattern that consists of a kubernetes controller that adds new objects to the Kubernetes API, in order to configure and manage an application, such as Prometheus or etcd.

在一句话中:运算符是特定于域的控制器.

In one sentence: An operator is a domain specific controller.

在Github上有一个关于Github的新讨论,链接到同一篇博客文章.讨论的相关内容是:

There is a new discussion on Github about this very same topic, linking to the same blog post. Relevant bits of the discussion are:

Operator是带有CRD的自定义控制器工具.内置控制器(即观看,比较,动作)遵循相同的模式.

Operator is a customized controller implement with CRD. It follow the same pattern with build-in controllers (i.e. watch, diff, action).

更新2

我发现了新的博文,该博文也试图解释这种差异

Update 2

I found a new blog post that tries to explain the difference as well.

这篇关于Kubernetes控制器vs Kubernetes运营商?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-13 12:45