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编程
自定义
API
服务器
193
将允许配料列表里中出现重复,比如需要在一个披萨加上双份的奶酪。
这些通过
CRD
都可以很容易地实现。下面我们加入一些超出基本
CRD
能力
的需求
3
我们只允许在披萨饼规格中出现有相应
Topping
对象的配料。
我们假设先引入一个
v1alpha1
版本的
API
,但是后来发现我们想要在
v1beta1
版本的
API
中更换配料的表示方式。
换句话说,我们想要实现两个版本的服务,并且想在两个版本间进行无缝地
转换。
在本书的
GitHub
仓库里可以找到通过自定义
API
服务器实现该
API
的完整
代码。在本章后续的部分,我们会全面介绍该项目的所有主要部件,了解它
是如何工作的。在这个过程中,你会以新的视角理解先前章节提到过的概念,
因为
Kubernetes API
服务器在幕后也使用了相似的
Golang
实现。很多
CRD
中强调过的设计决策也会变得更明晰起来。
因此,即使你不打算走自定义
API
服务器的路线,我们仍强烈建议你通读本
章内容,也许这里展示所的概念未来也会在
CRD
中提供,但是了解自定义
API
服务器的相关知识或多或少会对你有所帮助。
8.3
架构:聚合
在了解技术实现细节之前,我们希望在
Kubernetes
集群的语境中对自定义
API
服务器的架构有一个初步的了解。
自定义
API
服务器是为
API
组提供服务的进程,它们通常使用
k8s.io/
apiserver
这个通用的
API
服务器库来构建。这类进程可以在
Kubernetes
集群
3
在第
9
章中,我们会看到在最新版本的
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