Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
PodSecurityPolicy (beta) tidak digunakan lagi di Kubernetes versi 1.21 dan dihapus di versi 1.25. Untuk mempelajari lebih lanjut, lihat postingan blog penghentian PodSecurityPolicy.
Untuk cluster Google Kubernetes Engine (GKE) yang menjalankan versi 1.25 atau yang lebih baru, Anda tidak dapat lagi menggunakan PodSecurityPolicy dan harus menonaktifkan fitur tersebut sebelum melakukan upgrade ke versi 1.25 atau yang lebih baru. Untuk mengetahui petunjuknya, lihat Bermigrasi dari PodSecurityPolicy.
Alternatif untuk PodSecurityPolicy
Jika Anda ingin terus menggunakan kontrol keamanan level Pod di GKE,
kami merekomendasikan salah satu solusi berikut:
Menggunakan pengontrol penerimaan PodSecurity: Anda dapat menggunakan
pengontrol penerimaan PodSecurityuntuk menerapkan Standar Keamanan Pod ke Pod yang berjalan di GKE Cluster Standar dan Autopilot. Standar Keamanan Pod
adalah kebijakan keamanan yang telah ditetapkan dan memenuhi kebutuhan keamanan Pod tingkat tinggi di Kubernetes. Kebijakan ini bersifat kumulatif, dan bervariasi mulai dari yang sangat permisif hingga sangat ketat.
Gunakan Pengontrol Kebijakan dengan paket Kebijakan Keamanan Pod: Pengontrol Kebijakan memungkinkan Anda menerapkan dan menerapkan kebijakan keamanan di cluster GKE. Paket Pengontrol Kebijakan, seperti paket Kebijakan Keamanan Pod, memungkinkan Anda menerapkan validasi yang sama seperti PodSecurityPolicy dengan kemampuan seperti uji coba dan kendali terperinci atas cakupan sumber daya.
Menggunakan Gatekeeper: Dengan cluster GKE Standard, Anda dapat menerapkan kebijakan keamanan menggunakan Gatekeeper. Anda dapat menggunakan Gatekeeper untuk menerapkan kemampuan yang sama seperti PodSecurityPolicy, serta memanfaatkan fungsionalitas lainnya seperti uji coba, peluncuran bertahap, dan audit.
Lihat insight dan rekomendasi penghentian penggunaan
Anda dapat memeriksa cluster mana yang menggunakan fitur yang tidak digunakan lagi ini dengan menggunakan
analisis penghentian.
Insight penghentian penggunaan fitur ini didukung untuk cluster yang menjalankan versi GKE.
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Sulit dipahami","hardToUnderstand","thumb-down"],["Informasi atau kode contoh salah","incorrectInformationOrSampleCode","thumb-down"],["Informasi/contoh yang saya butuhkan tidak ada","missingTheInformationSamplesINeed","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2025-07-31 UTC."],[],[],null,["# PodSecurityPolicy deprecation\n\n*** ** * ** ***\n\nPodSecurityPolicy (beta) is deprecated in Kubernetes version 1.21 and removed in\nversion 1.25. To learn more, refer to the [PodSecurityPolicy deprecation blog\npost](https://kubernetes.io/blog/2021/04/06/podsecuritypolicy-deprecation-past-present-and-future/).\nFor Google Kubernetes Engine (GKE) clusters running version 1.25 or later, you can\nno longer use PodSecurityPolicy, and you must disable the feature before\nupgrading to versions 1.25 or later. For instructions, refer to [Migrate from\nPodSecurityPolicy](/kubernetes-engine/docs/how-to/migrate-podsecuritypolicy#disable-psp).\n\nAlternatives to PodSecurityPolicy\n---------------------------------\n\nIf you want to continue using Pod-level security controls in GKE,\nwe recommend one of the following solutions:\n\n- **Use the `PodSecurity` admission controller** : You can use the\n [`PodSecurity` admission controller](/kubernetes-engine/docs/how-to/podsecurityadmission)\n to apply Pod Security Standards to Pods running on your GKE\n Standard and Autopilot clusters. Pod Security Standards\n are predefined security policies that meet the high-level needs of Pod\n security in Kubernetes. These policies are cumulative, and range from being\n highly permissive to being highly restrictive.\n\n To migrate your existing PodSecurityPolicy configuration to `PodSecurity`,\n refer to\n [Migrate from PodSecurityPolicy](/kubernetes-engine/docs/how-to/migrate-podsecuritypolicy).\n- **Use Policy Controller with the Pod Security Policy bundle** :\n Policy Controller lets you apply and enforce security policies in your GKE\n clusters. Policy Controller [*bundles*](/anthos-config-management/docs/concepts/policy-controller-bundles),\n like the Pod Security Policy bundle, let you enforce the same validations as\n PodSecurityPolicy with capabilities such as dry-run and fine-grained control\n over resource coverage.\n\n For more information, refer to\n [Use Policy Controller's Pod Security Policy bundle](/anthos-config-management/docs/how-to/using-constraints-to-enforce-pod-security).\n- **Use Gatekeeper**: GKE Standard clusters allow you\n to apply security policies using Gatekeeper. You can use Gatekeeper to\n enforce the same capabilities as PodSecurityPolicy, as well as take\n advantage of other functionality such as dry-run, gradual rollouts, and\n auditing.\n\n For more information, refer to\n [Apply custom Pod-level security policies using Gatekeeper](/kubernetes-engine/docs/how-to/pod-security-policies-with-gatekeeper).\n- **Use GKE Autopilot clusters**: GKE\n Autopilot clusters implement many of the recommended security\n policies by default.\n\n For more information, refer to the\n [Autopilot overview](/kubernetes-engine/docs/concepts/autopilot-overview).\n\nView deprecation insights and recommendations\n---------------------------------------------\n\nYou can check which clusters use this deprecated feature by using\n[deprecation insights](/kubernetes-engine/docs/deprecations/viewing-deprecation-insights-and-recommendations#view-deprecation-insights-recs).\nDeprecation insights for this feature are supported for clusters running any\nGKE version."]]