Kubernetes控制器vs Kubernetes运营商? [英] Kubernetes Controller vs Kubernetes Operator?

查看:94
本文介绍了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 API,以代表Kubernetes用户创建,配置和管理复杂的有状态应用程序实例.它建立在基本的Kubernetes资源和控制器概念的基础上,还包括领域或特定于应用程序的知识,以自动化由计算机更好地管理的常见任务.

An Operator is an application-specific controller that extends the Kubernetes API to create, configure and manage instances of complex stateful applications on behalf of a Kubernetes user. It builds upon the basic Kubernetes resource and controller concepts, but also includes domain or application-specific knowledge to automate common tasks better managed by computers.

因此,基本上,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:

所有操作员都使用控制器模式,但并非所有控制器都是操作员.它只有一个运算符:控制器模式+ API扩展+单个应用程序焦点.

All Operators use the controller pattern, but not all controllers are Operators. It's only an Operator if it's got: controller pattern + API extension + single-app focus.

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运营商?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆