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编程
概论
23
“改变资源状态”并不意味着这个资源必须是
Kubernetes
集群中的一部分。
也就是说,控制器可以改变不受
Kubernetes
控制的资源,比如一个云存储服
务。以
AWS Service Operator
为例,通过它就可以管理
AWS
的资源。比如可
以通过它来管理
S3
Bucket
,在这个过程中,内含的
S3
控制器就实现了脱
Kubernetes
控制的资源(
S3 Bucket
)的管理,其状态变化情况取决于其生
命周期中的具体阶段:创建了一个
S3 Bucket
,或在某个时刻删除了它。
这个例子向你证明了通过自定义控制器,不但可以管理
Kubernetes
的核心资
源,比如
Pod
或其他自定义资源(就像我们的
cnat
例子中所演示的),还可
以管理
Kubernetes
集群以外的计算或存储资源。这样的设计让控制器成为一
种非常灵活、强的集成机制,可以在不同的平台或环境中,提供对不同的资
源的统一管理界面。
1.4.5
乐观并发
在“
1.4.1
控制循环”中,我们讨论过控制器运行逻辑中的第
3
步:按照指定
的条件更新集群的对象或其他外部资源后,把结果写入资源的状态中,这么
做会触发控制器回头去做第
1
步逻辑。
现实情况中,当前或其他写入操作(在第
2
步中)都可能出错。在一个分布
式系统中,当前的控制器可能只是众多要更新资源的请求来源中的一个,并
发的写可能会因为写入冲突而失败。
为了更好的理解幕后的知识,让我们再退后一小步,看看图
1-4
2
在该文献中,定义了
Omega
的并行调度器的架构:
我们的解决方案是一个全新的并行调度器架构,它基于共享状态 ...
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