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编程
Kubernetes API
基础
47
在变更阶段,允许改变请求的内容。比如,镜像的拉取策略可以根据
准入配置被修改为
Always
IfNotPresent
Never
第二个准入阶段纯粹是验证。比如验证
Pod
相关的安全设置,或者在
指定命名空间中创建对象之前先验证该命名空间是否存在。
验证
对请求带来的每一个系统对象进行一系列复杂的验证。比如,对
Service
名字中出现的字符进行验证,看它是否都由
DNS
中允许使用
的字符组成或者验证
Pod
中的所有的容器名字是否都互不相同。
基于
etcd
CRUD
逻辑
2.1.1 API
服务器的
HTTP
接口”中所提到的不同的动词都在这一步
来实现。比如,更新逻辑会把对象从
etcd
中读出,按照“
1.4.5
乐观并发”
中介绍的方式确认没有其他人在修改这个对象,并将修改后的对象写
etcd
在后续的章节中,我们还将进一步深入了解这些处理步骤,比如:
对于自定义资源
在“
4.3.1
自定义资源合法性验证”中介绍对其进行验证的方法,在“
9.2
准入
Webhook
”中介绍准入控制,在第
4
章“使用自定义资源”中介绍常
规的
CRUD
语义。
对于
Go
语言原生资源
在“
8.4.8
验证”介绍对其进行验证的方法,在“
8.4.11
准入”中介绍准入
控制,在“
8.4.9
注册表与策略”中实现
CRUD
语义。
2.4
小结
在这一章中,我们先把
Kubernetes API
服务器当成一个黑盒,通过其
HTTP
接口探索它的行为。然后我们学习了如何通过命令行与这个黑盒进行交互,
48
2
最后我们打开了这个黑盒
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