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即学即用(第二版)
基于角色的访问控制
|
199
14.2 RBAC
的管理技巧
管理集群的
RBAC
既复杂又令人沮丧。更令人担心的是,配置错误的
RBAC
可能导致安全问题。幸运的是,我们有几种工具和技术可以降低管理
RBAC
的难度。
14.2.1
使用
can-i
测试授权
第一个非常实用的工具是
kubectl
的
auth
can-i
命令。该工具可以测试某个
特定用户是否可以执行某个特定操作。你可以使用
can-i
验
证配置设定是否符
合集群的配置,也可以在用户提交错误报告时,要求他们使用这个工具验证
他们是否有权限访问。
最简单的用法是,通过
can-i
命
令验证一个动词和一个资源。
例如,如下命令可以验证当前
kubectl
用户是否被授权创建
Pod
:
$
kubectl auth can-i create pods
你还可以使用
--subresource
命令行标志来测试日志或端口转发之类的子资
源:
$
kubectl auth can-i get pods --subresource=logs
14.2.2
通过源代码控制管理
RBAC
与
Kubernetes
中所有的资源同样,
RBAC
资源也可以使用
JSON
或
YAML
表
示。鉴于这两种方式都是基于文本的,我们可以将这些资源存储在版本控制中。
实际上,由于
RBAC
策略更改在审核、责任性以及回滚方面有非常严格的要求,
因此通过版本控制管理
RBAC
资源非常重要。
幸运的是,
kubectl
命令行工具提供了一个
reconcile
命令,该命令的操作有
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