CoreOS Kubernetes Operators 与原生 Kubernetes 初始化器有何不同?

How are CoreOS Kubernetes Operators different from native Kubernetes initializers?

Kubernetes 1.7 有一个名为 initializers. CoreOS has the concept of an operator 的 alpha 功能。两者似乎都涉及部署代码来监视 Kubernetes API 服务器的资源更改(可能是自定义的),基于这些资源包含的注释和代码理解的注释。

有什么区别?如果初始化程序是核心平台的一部分,为什么我需要创建一些新的东西来做我眼中看起来像的东西?

Kubernetes 在 1.7 之前就有 初始化器的概念,但后来它们是 API 服务器的固定部分。您链接到的新 initializers 功能主要是将这些部分与 API 服务器分离:

Today each of these plugins must be compiled into Kubernetes. As Kubernetes grows, the requirement that all policy enforcement beyond coarse grained access control be done through in-tree compilation and distribution becomes unwieldy and limits administrators and the growth of the ecosystem.

(来自 the design document

Operators 是独立的 "microservices" 持续和异步地将配置的期望状态与系统的当前状态相协调。初始化器是同步挂钩,在创建或更新运行时对象之前验证或改变它们。另见准入控制器。它们通常被烘烤成一些"microservice"。当您考虑运行时对象的生命周期时,初始化器首先起作用,就像一次。然后观察运行时对象的操作员根据他们想要的定义协调系统。