Skip to Content
For Enterprise
For Government
For Higher Ed
For Individuals
For Marketing
For Enterprise
For Government
For Higher Ed
For Individuals
For Marketing
Explore Skills
Cloud Computing
Microsoft Azure
Amazon Web Services (AWS)
Google Cloud
Cloud Migration
Cloud Deployment
Cloud Platforms
Data Engineering
Data Warehouse
SQL
Apache Spark
Microsoft SQL Server
MySQL
Kafka
Data Lake
Streaming & Messaging
NoSQL Databases
Relational Databases
Data Science
Pandas
R
MATLAB
SAS
D3
Power BI
Tableau
Statistics
Exploratory Data Analysis
Data Visualization
AI & ML
Generative AI
Machine Learning
Artificial Intelligence (AI)
Deep Learning
Reinforcement Learning
Natural Language Processing
TensorFlow
Scikit-Learn
Hyperparameter Tuning
MLOps
Programming Languages
Java
JavaScript
Spring
Python
Go
C#
C++
C
Swift
Rust
Functional Programming
Software Architecture
Object-Oriented
Distributed Systems
Domain-Driven Design
Architectural Patterns
IT/Ops
Kubernetes
Docker
GitHub
Terraform
Continuous Delivery
Continuous Integration
Database Administration
Computer Networking
Operating Systems
IT Certifications
Security
Network Security
Application Security
Incident Response
Zero Trust Model
Disaster Recovery
Penetration Testing / Ethical Hacking
Governance
Malware
Security Architecture
Security Engineering
Security Certifications
Design
Web Design
Graphic Design
Interaction Design
Film & Video
User Experience (UX)
Design Process
Design Tools
Business
Agile
Project Management
Product Management
Marketing
Human Resources
Finance
Team Management
Business Strategy
Digital Transformation
Organizational Leadership
Soft Skills
Professional Communication
Emotional Intelligence
Presentation Skills
Innovation
Critical Thinking
Public Speaking
Collaboration
Personal Productivity
Confidence / Motivation
Features
All features
Verifiable skills
AI Academy
Courses
Certifications
Interactive learning
Live events
Superstreams
Answers
Insights reporting
Radar Blog
Buy Courses
Plans
Sign In
Try Now
O'Reilly Platform
book
Kubernetes即学即用(第二版)
by
Brendan Burns
,
Joe Beda
,
Kelsey Hightower
June 2021
Intermediate to advanced
300 pages
5h 4m
Chinese
China Electric Power Press Ltd.
Content preview from
Kubernetes即学即用(第二版)
88
|
第
6
章
6.2
注释
注释提供了一个存储
Kubernetes
对象元数据的地方,其唯一的目的是服务于
各类工具和库。注释是其他程序通过
API
在
Kubernetes
对象中存储不透明数
据的一种方式。注释可用于工具本身,也可以在外部系统之间传递配置信息。
标签的主要用途是标识和分组对象,而注释则可以提供有关对象来源、对象
的用途以及对象的相关策略等附加信息。二者的作用有一定的重叠,而何时
使用注释、何时使用标签则取决于个人喜好。如果拿不定主意,则可以暂时
通过注释向对象添加信息,等到将来需要在选择器中使用这些信息的时候,
再改为标签。
注释的用途包括:
•
记录对象最近一次更新的“原因”。
•
向专用的调度器传达专用的调度策略。
•
扩展数据,记录更新资源的最后一个工具及其更新方式(方便其他工具检
测变化,并执行智能合并)。
•
不适合通过标签记录的信息:构建、发布或镜像的信息(包括
Git
哈希、
时间戳,
PR
编号等)。
•
帮助部署对象(请参见第
10
章)跟踪其负责推出的副本集。
•
提供额外的数据,以增强
UI
的视觉质量或易用性。例如,对象可以包含
指向图标的链接(或包含图标的
base64
编码)。
•
Kubernetes
中的
Alpha
功能(不必创建一级的
API
字段,而是将该功能的
参数编码到注释中)。
注释的应用遍布
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.
Start your free trial
You might also like
PyTorch深度学习
Posts & Telecom Press, Vishnu Subramanian
Python数据分析
Posts & Telecom Press, Ivan Idris
Python贝叶斯分析(第2版)
Posts & Telecom Press, Osvaldo Martin
Python高级编程(第2版)
Posts & Telecom Press, Michał Jaworski, Tarek Ziadé
Publisher Resources
ISBN: 9787519856762