Skip to Content
Kubernetes编程
book

Kubernetes编程

by Michael Hausenblas, Stefan Schimanski
June 2021
Intermediate to advanced
335 pages
5h 50m
Chinese
China Electric Power Press Ltd.
Content preview from Kubernetes编程
发布控制器和
Operator
179
证程序),它不仅是一个推荐的流程,而且对任何部署场景它都是非常重要的,
哪怕你并不打算把你的应用发布在
Operator Hub
上。
7.2
准生产部署
这一节我们来回顾和讨论如何让你的自定义控制器和
Operator
达到准生产状
态。下面是一个基本的检查表:
使用
Kubernetes Deployment
或者
DaemonSet
来管理你的自定义控制器,
这样当它们出现问题后(这迟早会发生),会自动重启。
对特定的端点进行健康检查,来进行存活和可用性探测。这和前一步一起
保证了你的
Operator
有更好的自我恢复能力。
考虑主从
/
冷备模型,保证即使在你的控制器
Pod
出现问题的情况下,其
Pod
还可以接管它的工作。不过需要注意,状态同步是一个重要且不简
单的工作。
提供访问控制资源,例如服务账号和角色,且遵循最小特权原则;参考“
7.2.1
将权限设置正确”了解更多细节。
考虑自动化构建和测试。相关的建议可参考“
7.2.2
自动构建与测试”。
主动处理监控和日志。参考“
7.2.3
自定义控制器和可观测性”了解其重
要性及应该怎么做。
我们同时建议你细读前面提到过的文章“
Kubernetes Operator Development
Guidelines for Improved Usability
”了解更多细节。
7.2.1
将权限设置正确
你的自定义控制器是
Kubernetes
控制平面的一部分。它需要读取资源的状态、
Kubernetes
内部或(也可能是)外部创建资源,并操作它自己的资源。为 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

解密金融数据

解密金融数据

Justin Pauley
Python机器学习案例精解

Python机器学习案例精解

Posts & Telecom Press, Yuxi (Hayden) Liu
软件开发实践:项目驱动式的Java开发指南

软件开发实践:项目驱动式的Java开发指南

Raoul-Gabriel Urma, Richard Warburton

Publisher Resources

ISBN: 9787519854799