PodSecurityPolicy 弃用
从 Kubernetes 1.21 版开始,PodSecurityPolicy(Beta 版)已弃用。Kubernetes 项目的目标是在 1.25 版中关停此功能。此功能关停后,您将无法再在 Google Kubernetes Engine (GKE) 中使用 PodSecurityPolicy。
如需详细了解此次弃用的情况,请参阅 PodSecurityPolicy 弃用相关博文。
PodSecurityPolicy 的替代方案
如果您希望在 GKE 中继续使用 Pod 级层的安全控制措施,我们建议您采用以下解决方案之一:
使用 PodSecurity
准入控制器(预览版):您可以使用 PodSecurity
准入控制器,将 Pod 安全标准应用于在 GKE Standard 集群和 Autopilot 集群上运行的 Pod。Pod 安全标准是预定义的安全政策,可满足 Kubernetes 中 Pod 安全性的高层次需求。这些政策是累积式的,从高度宽松到高度严格。
如需了解详情,请参阅使用 PodSecurity 应用预定义的 Pod 级层安全政策。
使用 Gatekeeper:通过 GKE Standard 集群,您可以使用 Gatekeeper 应用安全政策。您可以使用 Gatekeeper 强制执行与 PodSecurityPolicy 相同的功能,并利用其他功能,例如试运行、逐步推出和审核。
如需了解详情,请参阅使用 Gatekeeper 以应用自定义 Pod 级层安全政策。
使用 GKE Autopilot 集群:GKE
默认情况下,Autopilot 集群会实施许多推荐的安全政策。
如需了解详情,请参阅 Autopilot 概览。
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2022-02-15 UTC.
[{
"type": "thumb-down",
"id": "hardToUnderstand",
"label":"很难理解"
},{
"type": "thumb-down",
"id": "incorrectInformationOrSampleCode",
"label":"信息或代码不正确"
},{
"type": "thumb-down",
"id": "missingTheInformationSamplesINeed",
"label":"没有我需要的信息/示例"
},{
"type": "thumb-down",
"id": "translationIssue",
"label":"翻译问题"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"其他"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"易于理解"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"解决了我的问题"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"其他"
}]