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即学即用(第二版)
64
|
第
5
章
$
kubectl get pods
NAME READY STATUS RESTARTS AGE
kuard 1/1 Running 0 44s
你可以看到这个
Pod
的名称(
kuard
)正是我们在前面的
YAML
文件中给出的
名称。除了准备就绪的容器数(
1/1
)外,输出还显示了
Pod
的状态、重新启
动的次数以及
Pod
的寿命。
如果在
Pod
创建之后立即运行该命令,则有可能看到:
NAME READY STATUS RESTARTS AGE
kuard 0/1 Pending 0 1s
Pending
状态表明
Pod
已提交,但尚未调度。
如果发生重大错误(例如尝试使用不存在的容器镜像创建
Pod
),则会显示
在状态字段中。
默认情况下,
kubectl
命令行工具会尽量简化报告的信息,但是你可以通过
命令行标志获取更多信息。在
kubectl
的命令中添加
-o
wide
可以输出更多
信息(但这些信息仍然会在一行中显示)。添加
-o
json
或
-o
yaml
,则会
分别以
JSON
或
YAML
的格式输出完整的对象。
5.4.2 Pod
的详细信息
有时,仅通过一行输出了解
Pod
还不够,因为这些信息过于简短。此外,
Kubernetes
的事件流中还包含大量有关
Pod
的事件,但这些事件并未直接关
联到
Pod
对象上。
如果想查看有关
Pod
(或任何
Kubernetes
对象)的更多信息,可以使用
kubectl describe ...
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