OLM是一组cluster资源的集合,用来管理一个operator的lifecycle.
安装olm
假设你已经安装operator-sdk
operator-sdk olm install operator-sdk olm status
我的输出为
INFO[0000] Fetching CRDs for version "v0.21.2" INFO[0000] Fetching resources for resolved version "v0.21.2"
使用olm获取operator list
kubectl get packagemanifest -n olm
安装一个operator
- 创建一个group
carawang@carawangs-MacBook-Pro olm % kubectl apply -f operatorgroup.yaml operatorgroup.operators.coreos.com/og-single created carawang@carawangs-MacBook-Pro olm % cat operatorgroup.yaml kind: OperatorGroup apiVersion: operators.coreos.com/v1 metadata: name: og-single namespace: default spec: targetNamespaces: - default
2. 创建一个订阅
carawang@carawangs-MacBook-Pro olm % kubectl apply -f subscription.yaml subscription.operators.coreos.com/etcd created carawang@carawangs-MacBook-Pro olm % cat subscription.yaml apiVersion: operators.coreos.com/v1alpha1 kind: Subscription metadata: name: etcd namespace: default spec: channel: singlenamespace-alpha installPlanApproval: Automatic name: etcd source: operatorhubio-catalog sourceNamespace: olm startingCSV: etcdoperator.v0.9.2
今天的文章
OLM(operator lifecycle manager)简介分享到此就结束了,感谢您的阅读。
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。
如需转载请保留出处:https://bianchenghao.cn/bian-cheng-ji-chu/92082.html