이 콘텐츠는 선택한 언어로 제공되지 않습니다.

Chapter 13. Configuring the node agent as a non-root and non-privileged user


To enhance the node agent security, you can configure the OADP Operator node agent daemonset to run as a non-root and non-privileged user by using the spec.configuration.velero.disableFsBackup setting in the DataProtectionApplication (DPA) custom resource (CR).

By setting the spec.configuration.velero.disableFsBackup setting to true, the node agent security context sets the root file system to read-only and sets the privileged flag to false.

Note

Setting spec.configuration.velero.disableFsBackup to true enhances the node agent security by removing the need for privileged containers and enforcing a read-only root file system.

However, it also disables File System Backup (FSB) with Kopia. If your workloads rely on FSB for backing up volumes that do not support native snapshots, then you should evaluate whether the disableFsBackup configuration fits your use case.

Prerequisites

  • You have installed the OADP Operator.

Procedure

  • Configure the disableFsBackup field in the DPA as shown in the following example:

    apiVersion: oadp.openshift.io/v1alpha1
    kind: DataProtectionApplication
    metadata:
      name: ts-dpa
      namespace: openshift-adp
    spec:
      backupLocations:
      - velero:
          credential:
            key: cloud
            name: cloud-credentials
          default: true
          objectStorage:
            bucket: <bucket_name>
            prefix: velero
          provider: gcp
      configuration:
        nodeAgent:
          enable: true
          uploaderType: kopia
        velero:
          defaultPlugins:
          - csi
          - gcp
          - openshift
          disableFsBackup: true
    Copy to Clipboard Toggle word wrap

    where:

    nodeAgent
    Specifies to enable the node agent in the DPA.
    disableFsBackup
    Specifies to set the disableFsBackup field to true.

Verification

  1. Verify that the node agent security context is set to run as non-root and the root file system is readOnly by running the following command:

    $ oc get daemonset node-agent -o yaml
    Copy to Clipboard Toggle word wrap

    The example output is as following:

    apiVersion: apps/v1
    kind: DaemonSet
    metadata:
      ...
      name: node-agent
      namespace: openshift-adp
      ...
    spec:
      ...
      template:
        metadata:
          ...
        spec:
          containers:
          ...
            securityContext:
              allowPrivilegeEscalation: false
              capabilities:
                drop:
                - ALL
              privileged: false
              readOnlyRootFilesystem: true
            ...
          nodeSelector:
            kubernetes.io/os: linux
          os:
            name: linux
          restartPolicy: Always
          schedulerName: default-scheduler
          securityContext:
            runAsNonRoot: true
            seccompProfile:
              type: RuntimeDefault
          serviceAccount: velero
          serviceAccountName: velero
          ....
    Copy to Clipboard Toggle word wrap

    where:

    allowPrivilegeEscalation
    Specifies that the allowPrivilegeEscalation field is false.
    privileged
    Specifies that the privileged field is false.
    readOnlyRootFilesystem
    Specifies that the root file system is read-only.
    runAsNonRoot
    Specifies that the node agent is run as a non-root user.
Red Hat logoGithubredditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

Red Hat을 사용하는 고객은 신뢰할 수 있는 콘텐츠가 포함된 제품과 서비스를 통해 혁신하고 목표를 달성할 수 있습니다. 최신 업데이트를 확인하세요.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

Theme

© 2026 Red Hat
맨 위로 이동