您现在的位置是:首页 > 文章详情

K8s Security Best Practices-K8S安全最佳实践

日期:2021-05-13点击:353

  1. 关于安全-写在前面的:
    Security is complex and a process 安全是复杂的,而且是一个过程  
    1. Security combines many diffenrent things 安全结合了许多不同的东西
    2. Environments change,security cannot stay in a certain state 环境变化,安全性不能保持一定状态
    3. Attackers have advantage ***者有优势
      3.1 . They decide time 他们决定的时间(任意时间)
      3.2. They pick what to attack ,like weakest link 他们选择要***的内容,例如最薄弱的环节

1. Security Principles 安全原则

在这里插入图片描述

  1. Defense in depth 深度防御
  2. Least Privilege 最小权限原则
  3. Limiting the Attack Surface 限制***面
  4. Layered defence and Redundancy 分层防御和冗余
    在这里插入图片描述

2. K8s Security Categories k8S安全分类

在这里插入图片描述

2.1 Host OS Security 宿主机操作系统安全

在这里插入图片描述

 1. kubernets Node should only do one thing :  Kubernetes      kubernets节点应该只运行kubernets     1.1. Reduce Attack Surface   减少***面                  1.2. Remove unnecessary applications   移除不必要的应用                            2. Keep up to date     保持升级  3. Rutime security tools     运行时安全工具  4. Find and identify malicious processes  查找和识别恶意进程  5. Restrict IAM  ssh access      限制IAM(Identity and Access Management  身份识别与访问管理服务) 与SSH访问

2.2 Kubernetes Cluster Security k8s集群安全

在这里插入图片描述
kubernetes components are runing secure and up-to-data kubernetes集群组件保持安全和最新的运行

1. apiserver
2. kubelet
3. etcd

Restrict(external)access 限制(外部)访问
use authentication ->authorization 使用身份认证 授权
Admission Controllers 控制器准入?
noderestriction 节点限制
custom policies(opa) 自定义规则
Enable Audit Logging 启用审计日志记录
Security Benchmarking 安全基线测试

由此可见最新的还是很重要的,老的版本会有漏洞,有必要保证组件版本的更新升级
在这里插入图片描述
一个通过 pod ***etcd的例子展现与etcd的安全策略:
加密etcd
限制访问etcd
加密与etcd的通信

2.3 Application Security 应用安全

在这里插入图片描述

 1. Use Secrets /no hardcoded credentials  使用secrets秘钥 而不是硬编码的凭据  2. RBAC                       基于角色的访问控制    3. Container Sandboxing                          容器沙盒  4. Container Hardening                            容器加固    4.1 Attack Surface                             ***表面        4.2 Run as user                                 作为用户运行 no root        4.3 Readonly filesystem                    只读的文件系统     5. Vulnerability Scanning                         漏洞扫描 6. MTLS/ServiceMeshes                          双向认证/服务网格在这里插入代码片

               

原文链接:https://blog.51cto.com/u_1153710/2774417
关注公众号

低调大师中文资讯倾力打造互联网数据资讯、行业资源、电子商务、移动互联网、网络营销平台。

持续更新报道IT业界、互联网、市场资讯、驱动更新,是最及时权威的产业资讯及硬件资讯报道平台。

转载内容版权归作者及来源网站所有,本站原创内容转载请注明来源。

文章评论

共有0条评论来说两句吧...

文章二维码

扫描即可查看该文章

点击排行

推荐阅读

最新文章