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即学即用(第二版)
常用的
kubectl
命令
|
51
在的位置以及身份验证所需的信息。例如,你可以通过以下命令,创建一个
拥有不同默认命名空间的上下文,供
kubectl
命令使用:
$
kubectl config set-context my-context --namespace=mystuff
该命令会创建一个新的上下文,但并不会实际投入使用。如果想使用这个新
创建的上下文,则需运行如下命令:
$
kubectl config use-context my-context
此外,我们还可以利用上下文来管理多个集群或针对多个用户进行身份认证,
方法是在
set-context
命令中指定
--users
或
--clusters
标志。
4.3
查看
Kubernetes API
对象
Kubernetes
中包含的一切都由
RESTful
资源表示。在本书中,我们称这些资
源为
Kubernetes
对象。每个
Kubernetes
对象都拥有唯一的
HTTP
路径。例如,
https://your-k8s.com/api/v1/namespaces/default/pods/my-pod
代表了默认命名空
间中一个名叫
my-pod
的
Pod
。
kubectl
命令可以向这些
URL
发送
HTTP
请求,
访问这些路径表示的
Kubernetes
对象。
通过
kubectl
查看
Kubernetes
对象的最基本命令是
get
。如果运行
kubectl
get
<
资源名称
>
,则可以获得当前命名空间中所有资源的清单。如果想获取
特定资源,则可以使用
kubectl get
<
资源名称 ...
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