7.4. Security Profiles Operator 활성화

Security Profiles Operator를 사용하려면 먼저 Operator가 클러스터에 배포되었는지 확인해야 합니다.

중요

Security Profiles Operator는 RHCOS(Red Hat Enterprise Linux CoreOS) 작업자 노드만 지원합니다. RHEL(Red Hat Enterprise Linux) 노드는 지원되지 않습니다.

7.4.1. Security Profiles Operator 설치

사전 요구 사항

  • admin 권한이 있어야 합니다.

절차

  1. OpenShift Container Platform 웹 콘솔에서 OperatorOperatorHub로 이동합니다.
  2. Security Profiles Operator를 검색한 다음 설치를 클릭합니다.
  3. 기본 설치 모드네임스페이스 를 계속 선택하여 Operator가 openshift-security-profiles 네임스페이스에 설치되도록 합니다.
  4. 설치를 클릭합니다.

검증

설치에 성공했는지 확인하려면 다음을 수행하십시오.

  1. Operator설치된 Operator 페이지로 이동합니다.
  2. Security Profiles Operator가 openshift-security-profiles 네임스페이스에 설치되어 있고 해당 상태는 Succeeded 인지 확인합니다.

Operator가 성공적으로 설치되지 않은 경우 다음을 수행하십시오.

  1. Operator설치된 Operator 페이지로 이동하여 Status 열에 오류 또는 실패가 있는지 점검합니다.
  2. 워크로드Pod 페이지로 이동하여 openshift-security-profiles 프로젝트에서 문제를 보고하는 Pod의 로그를 확인합니다.

7.4.2. CLI를 사용하여 Security Profiles Operator 설치

사전 요구 사항

  • admin 권한이 있어야 합니다.

절차

  1. Namespace 오브젝트를 정의합니다.

    namespace-object.yaml

    apiVersion: v1
    kind: Namespace
    metadata:
        name: openshift-security-profiles
    labels:
      openshift.io/cluster-monitoring: "true"

  2. Namespace 오브젝트를 생성합니다.

    $ oc create -f namespace-object.yaml
  3. OperatorGroup 오브젝트를 정의합니다.

    operator-group-object.yaml

    apiVersion: operators.coreos.com/v1
    kind: OperatorGroup
    metadata:
      name: security-profiles-operator
      namespace: openshift-security-profiles

  4. OperatorGroup 개체를 생성합니다.

    $ oc create -f operator-group-object.yaml
  5. Subscription 오브젝트를 정의합니다.

    예: subscription-object.yaml

    apiVersion: operators.coreos.com/v1alpha1
    kind: Subscription
    metadata:
      name: security-profiles-operator-sub
      namespace: openshift-security-profiles
    spec:
      channel: release-alpha-rhel-8
      installPlanApproval: Automatic
      name: security-profiles-operator
      source: redhat-operators
      sourceNamespace: openshift-marketplace

  6. Subscription 오브젝트를 생성합니다.

    $ oc create -f subscription-object.yaml
참고

글로벌 스케줄러 기능을 설정하고 defaultNodeSelector 를 활성화하는 경우 네임스페이스를 수동으로 생성하고 openshift-security-profiles 네임스페이스의 주석 또는 Security Profiles Operator가 설치된 네임스페이스를 openshift.io/node-selector: "" 로 업데이트해야 합니다. 이렇게 하면 기본 노드 선택기가 제거되고 배포 실패가 발생하지 않습니다.

검증

  1. 다음 CSV 파일을 검사하여 설치에 성공했는지 확인합니다.

    $ oc get csv -n openshift-security-profiles
  2. 다음 명령을 실행하여 Security Profiles Operator가 작동하는지 확인합니다.

    $ oc get deploy -n openshift-security-profiles

7.4.3. 로깅 세부 정보 표시 구성

Security Profiles Operator는 기본 로깅 세부 정보 0 과 향상된 세부 정보 표시성을 1 로 지원합니다.

절차

  • 향상된 로깅 세부 정보 표시를 활성화하려면 spod 구성을 패치하고 다음 명령을 실행하여 값을 조정합니다.

    $ oc -n openshift-security-profiles patch spod \
        spod --type=merge -p '{"spec":{"verbosity":1}}'

    출력 예

    securityprofilesoperatordaemon.security-profiles-operator.x-k8s.io/spod patched