实现operator常见的四种方式

有点囫囵吞枣的意思,找时间写一个简单的operator就能上手了

官方链接:https://kubernetes.io/docs/concepts/extend-kubernetes/operator/#what-s-next

四种方式

KUDO

  • 相关链接:https://kudo.dev/
  • 基本概念
    • KUDO is a toolkit that makes it easy to build Kubernetes Operators, in most cases just using YAML.
    • It provides a set of pre-built Operators, that you can use out of the box or easily customize.
    • Finally, KUDO lets you standardize the way you run Operators.

kubebuilder

  • 相关链接:https://book.kubebuilder.io/introduction.html
  • github链接:https://github.com/kubernetes-sigs/kubebuilder
  • 相关概念
    • Kubebuilder is a framework for building Kubernetes APIs using custom resource definitions (CRDs).
    • Note: kubebuilder does not exist as an example to copy-paste, but instead provides powerful libraries and tools to simplify building and publishing Kubernetes APIs from scratch.
  • 需要安装开发环境:golankubebuilder
    • Create a new project directory
    • Create one or more resource APIs as CRDs and then add fields to the resources
    • Implement reconcile loops in controllers and watch additional resources
    • Test by running against a cluster (self-installs CRDs and starts controllers automatically)
    • Update bootstrapped integration tests to test new fields and business logic
    • Build and publish a container from the provided Dockerfile

Matacontroller along with WebHooks

  • 相关链接:https://metacontroller.app/
  • 知乎链接:https://zhuanlan.zhihu.com/p/73036278
  • 相关概念
    • Metacontroller是一个方便编写和部署自定义控制器的Kubernetes的插件。
      自定义的资源描述了新的类型的对象是如何存储的,自定义的控制器描述了针对Kubernetes API扩展的行为。

operator framework(现阶段比较成熟)

  • 相关链接:https://github.com/operator-framework/getting-started
  • 相关概念:
    • Build an operator using the Operator SDK
      • The Operator SDK makes it easier to build Kubernetes native applications, a process that can require deep, application-specific operational knowledge.
    • 需要安装:
      • Operator SDK
      • 集群中安装 the Operator Lifecycle Manager:图形化的管理界面,具体可以看这个链接https://github.com/operator-framework/operator-lifecycle-manager
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值