PodSecurityPolicy 弃用
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
PodSecurityPolicy(Beta 版)在 Kubernetes 1.21 版中已弃用,在 1.25 版中已移除。如需了解详情,请参阅 PodSecurityPolicy 弃用相关博文。
对于运行 1.25 或更高版本的 Google Kubernetes Engine (GKE) 集群,您将无法再使用 PodSecurityPolicy,并且必须在升级到 1.25 版或更高版本之前停用该功能。有关说明,请参阅从 PodSecurityPolicy 迁移。
PodSecurityPolicy 的替代方案
如果您希望在 GKE 中继续使用 Pod 级层的安全控制措施,我们建议您采用以下解决方案之一:
使用 PodSecurity
准入控制器:您可以使用 PodSecurity
准入控制器,将 Pod 安全标准应用于在 GKE Standard 集群和 Autopilot 集群上运行的 Pod。Pod 安全标准是预定义的安全政策,可满足 Kubernetes 中 Pod 安全性的高层次需求。这些政策是累积式的,从高度宽松到高度严格。
如需将现有 PodSecurityPolicy 配置迁移到 PodSecurity
,请参阅从 PodSecurityPolicy 迁移。
将 Policy Controller 与 Pod 安全政策包搭配使用:Policy Controller 使您可以在 GKE 集群中应用和强制执行安全政策。与 Pod 安全政策包一样,Policy Controller 包可让您强制执行与 PodSecurityPolicy 相同的验证,并具有试运行和精细控制资源覆盖等功能。
如需了解详情,请参阅使用 Policy Controller 的 Pod 安全政策包。
使用 Gatekeeper:通过 GKE Standard 集群,您可以使用 Gatekeeper 应用安全政策。您可以使用 Gatekeeper 强制执行与 PodSecurityPolicy 相同的功能,并利用其他功能,例如试运行、逐步推出和审核。
如需了解详情,请参阅使用 Gatekeeper 以应用自定义 Pod 级层安全政策。
使用 GKE Autopilot 集群:默认情况下,GKE Autopilot 集群会实施许多推荐的安全政策。
如需了解详情,请参阅 Autopilot 概览。
查看弃用提示和建议
您可以使用弃用提示来检查哪些集群正在使用此已弃用的功能。运行任何 GKE 版本的集群均支持对此功能使用弃用提示。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2024-03-08。
[{
"type": "thumb-down",
"id": "hardToUnderstand",
"label":"Hard to understand"
},{
"type": "thumb-down",
"id": "incorrectInformationOrSampleCode",
"label":"Incorrect information or sample code"
},{
"type": "thumb-down",
"id": "missingTheInformationSamplesINeed",
"label":"Missing the information/samples I need"
},{
"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":"其他"
}]