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
Verify that the same SCC is assigned to the first pod by running the following command:
$ oc describe pod <pod_name_a> |grep -i scc1 - 1
- Replace
<pod_name_a>with the name of the first pod.
Example output
openshift.io/scc: restrictedVerify that the same SCC is assigned to first second pod by running the following command:
$ oc describe pod <pod_name_b> |grep -i scc1 - 1
- Replace
<pod_name_b>with the name of the second pod.
Example output
openshift.io/scc: restrictedVerify 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 [...]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 [...]