4.9. Verifying pods after resolving a mismatch


Verify the security context constraint (SCC) and the SELinux label of both the pods by using the following verification steps.

Verification

  1. Verify that the same SCC is assigned to the first pod by running the following command:

    $ oc describe pod <pod_name_a> |grep -i scc 
    1
    1
    Replace <pod_name_a> with the name of the first pod.

    Example output

    openshift.io/scc: restricted

  2. Verify that the same SCC is assigned to first second pod by running the following command:

    $ oc describe pod <pod_name_b> |grep -i scc 
    1
    1
    Replace <pod_name_b> with the name of the second pod.

    Example output

    openshift.io/scc: restricted

  3. Verify that the same SELinux label is applied to first pod by running the following command:

    $ oc exec <pod_name_a> -- ls -laZ <pvc_mountpoint> 
    1
    1
    Replace <pod_name_a> with the name of the first pod and replace <pvc_mountpoint> with the mount point within the first pod.

    Example output

    total 4
    drwxrwsrwx. 2 root       1000670000 system_u:object_r:container_file_t:s0:c10,c26 19 Aug 29 18:17 .
    dr-xr-xr-x. 1 root       root       system_u:object_r:container_file_t:s0:c10,c26 61 Aug 29 18:16 ..
    -rw-rw-rw-. 1 1000670000 1000670000 system_u:object_r:container_file_t:s0:c10,c26 29 Aug 29 18:17 test1
    [...]

  4. Verify that the same SELinux label is applied to second pod by running the following command:

    $ oc exec <pod_name_b> -- ls -laZ <pvc_mountpoint> 
    1
    1
    Replace <pod_name_b> with the name of the second pod and replace <pvc_mountpoint> with the mount point within the second pod.

    Example output

    total 4
    drwxrwsrwx. 2 root       1000670000 system_u:object_r:container_file_t:s0:c10,c26 19 Aug 29 18:17 .
    dr-xr-xr-x. 1 root       root       system_u:object_r:container_file_t:s0:c10,c26 61 Aug 29 18:16 ..
    -rw-rw-rw-. 1 1000670000 1000670000 system_u:object_r:container_file_t:s0:c10,c26 29 Aug 29 18:17 test1
    [...]

Red Hat logoGithubredditYoutubeTwitter

詳細情報

試用、購入および販売

コミュニティー

会社概要

Red Hat は、企業がコアとなるデータセンターからネットワークエッジに至るまで、各種プラットフォームや環境全体で作業を簡素化できるように、強化されたソリューションを提供しています。

多様性を受け入れるオープンソースの強化

Red Hat では、コード、ドキュメント、Web プロパティーにおける配慮に欠ける用語の置き換えに取り組んでいます。このような変更は、段階的に実施される予定です。詳細情報: Red Hat ブログ.

Red Hat ドキュメントについて

Legal Notice

Theme

© 2026 Red Hat
トップに戻る