Translated message

A translation of this page exists in English.

デプロイメントの PodSecurity Admission 警告を修正する

Solution In Progress - Updated -

Issue

  • デプロイメントが restricted-v2 SCC で実行されているにもかかわらず、Pod セキュリティーに関連する警告が表示される理由は?
$ oc  create deployment hello-node --image=k8s.gcr.io/e2e-test-images/agnhost:2.33 -- /agnhost serve-hostname
Warning: would violate PodSecurity "restricted:v1.24": allowPrivilegeEscalation != false (container "agnhost" must set securityContext.allowPrivilegeEscalation=false), unrestricted capabilities (container "agnhost" must set securityContext.capabilities.drop=["ALL"]), runAsNonRoot != true (pod or container "agnhost" must set securityContext.runAsNonRoot=true), seccompProfile (pod or container "agnhost" must set securityContext.seccompProfile.type to "RuntimeDefault" or "Localhost")
deployment.apps/hello-node created
$ oc describe pod hello-node-855787d74c-h99pg | grep scc
             openshift.io/scc: restricted-v2
  • openshift-operators namespace 内で実行されている Pod でも、同様の警告が表示されます。

Environment

  • Red Hat OpenShift Container Platform 4.11 以降

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content