Red Hat Training

A Red Hat training course is available for OpenShift Container Platform

15.8.8. hostPath 볼륨 플러그인 사용

Pod에서 privileged, host access 또는 hostmount-anyuid 와 같은 권한 있는 SCC에 대한 액세스 권한을 부여하지 않고 Pod에서 hostPath 볼륨 플러그인을 사용할 수 있도록 클러스터의 보안을 완화하려면 다음 작업을 수행합니다.

  1. hostpath 라는 새 SCC 만들기
  2. 새 SCC에 allowHostDirVolumePlugin 매개변수를 true 로 설정합니다.

    $ oc patch scc hostpath -p '{"allowHostDirVolumePlugin": true}'
  3. 모든 사용자에게 이 SCC에 대한 액세스 권한을 부여합니다.

    $ oc adm policy add-scc-to-group hostpath system:authenticated

이제 hostPath 볼륨을 요청하는 모든 Pod가 hostpath SCC에서 허용합니다.