2020-08-31 11:01:56 -04:00
|
|
|
|
|
|
|
.. vca1590088383576
|
|
|
|
.. _enable-pod-security-policy-checking:
|
|
|
|
|
|
|
|
===================================
|
|
|
|
Enable Pod Security Policy Checking
|
|
|
|
===================================
|
|
|
|
|
|
|
|
.. rubric:: |proc|
|
|
|
|
|
|
|
|
#. Set the kubernetes kube\_apiserver admission\_plugins system parameter to
|
|
|
|
include PodSecurityPolicy.
|
|
|
|
|
|
|
|
.. code-block:: none
|
|
|
|
|
2021-03-15 16:56:04 -03:00
|
|
|
~(keystone_admin)]$ system service-parameter-add kubernetes kube_apiserver admission_plugins=PodSecurityPolicy
|
2020-08-31 11:01:56 -04:00
|
|
|
|
|
|
|
#. Apply the Kubernetes system parameters.
|
|
|
|
|
|
|
|
.. code-block:: none
|
|
|
|
|
2021-03-15 16:56:04 -03:00
|
|
|
~(keystone_admin)]$ system service-parameter-apply kubernetes
|
2020-08-31 11:01:56 -04:00
|
|
|
|
|
|
|
#. View the automatically added pod security policies.
|
|
|
|
|
|
|
|
.. code-block:: none
|
|
|
|
|
|
|
|
$ kubectl get psp
|
|
|
|
$ kubectl describe <psp> privileged
|
|
|
|
$ kubectl describe <psp> restricted
|
|
|
|
|
|
|
|
|