operator系列文章:一、诞生的故事

https://coreos.com/blog/introducing-operators.html

concepts

  • 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 includes domain or application-specific knowledge to automate common tasks.

Stateless is Easy, Stateful is Hard

  • A larger challenge is managing stateful applications, like databases, caches, and monitoring systems.
  • These systems require application domain knowledge to correctly scale, upgrade, and reconfigure while protecting against data loss or unavailability.
  • Operator manages multiple instances across the cluster.
  • An Operator is software that encodes this domain knowledge and extends the Kubernetes API through the third party resources mechanism, enabling users to create, configure, and manage applications.

operator example

  • The etcd Operator creates, configures, and manages etcd clusters. etcd is a reliable, distributed key-value store introduced by CoreOS for sustaining the most critical data in a distributed system, and is the primary configuration datastore of Kubernetes itself.

  • The Prometheus Operator creates, configures, and manages Prometheus monitoring instances. Prometheus is a powerful monitoring, metrics, and alerting tool.

How is an Operator Built?

  • when scaling an etcd cluster manually, a user has to perform a number of steps: create a DNS name for the new etcd member, launch the new etcd instance, and then use the etcd administrative tools (etcdctl member add) to tell the existing cluster about this new member. Instead with the etcd Operator a user can simply increase the etcd cluster size field by 1.

How can you create an Operator?

  • the hard work is going to be encoding all of the application operational domain knowledge into a reasonable configuration resource and control loop.
  • important points
    • 部署简单
    • 向后兼容
    • operator被删除,operator对应的应用不受影响
    • 版本升级
    • 应对pod、配置、网络的错误

future of Operators

  • We envision a future where users install Postgres Operators, Cassandra Operators, or Redis Operators on their Kubernetes clusters, and operate scalable instances of these programs as easily they deploy replicas of their stateless web applications today.

FAQ

StatefulSets
  • “stateful resources” like static IPs and storage
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值