【实例简介】Kubernetes 安全 - 安全运行 Kubernetes 集群和应用程序
Kubernetes Security - Operating Kubernetes Clusters and Applications Safely
【实例截图】





【核心代码】
Table of Contents
Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . v
1. Approaching Kubernetes Security. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Security Principles 3
2. Securing the Cluster. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
API Server 7
Kubelet 9
Running etcd Safely 11
Kubernetes Dashboard 12
Validating the Configuration 13
3. Authentication. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Identity 15
Authentication Concepts 20
Authentication Strategies 21
Tooling and Good Practices 22
4. Authorization. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Authorization Concepts 25
Authorization Modes 26
Access Control with RBAC 27
Tooling and Good Practices 32
5. Securing Your Container Images. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Scanning Container Images 36
Patching Container Images 36
iiiCI/CD Best Practices 37
Image Storage 38
Correct Image Versions 39
Image Trust and Supply Chain 40
Minimizing Images to Reduce the Attack Surface 41
6. Running Containers Securely. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
Say No to Root 43
Admission Control 44
Security Boundaries 45
Policies 47
7. Secrets Management. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
Applying the Principle of Least Privilege 57
Secret Encryption 58
Kubernetes Secret Storage 58
Passing Secrets into Containerized Code 60
Secret Rotation and Revocation 63
Secret Access from Within the Container 64
Secret Access from a Kubelet 64
8. Advanced Topics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
Monitoring, Alerting, and Auditing 67
Host Security 68
Sandboxing and Runtime Protection 69
Multitenancy 70
Dynamic Admission Control 72
Network Protection 72
Static Analysis of YAML 73
Fork Bombs and Resource-Based Attacks 73
Cryptocurrency Mining 74
Kubernetes Security Updates 74
网友评论
我要评论