> This page is for NVIDIA Background Noise Removal on Holoscan for Media, version 2.0.0 (Latest) (default).
> For other versions, use one of these documentation indexes:
> - 2.0.0 (Latest) (default): https://docs.nvidia.com/nim/maxine/bnr-h4m/2.0.0/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.nvidia.com/nim/maxine/llms.txt.

# Kubernetes Operator Chart

The `nvidia-bnr-h4m-operator` Helm chart installs the BNR Kubernetes operator and its `NvidiaBnrMediaFunction` custom resource definition (CRD). The operator reconciles a BNR NIM deployment and supporting resources from a custom resource.

The operator path is useful when you want the BNR media function to be managed declaratively through Kubernetes-native APIs.

---

## Installation

### Prerequisites

Complete all prerequisite steps (Rivermax license, image pull and model pull secrets, high-speed network attachment) before installing the operator. For details, refer to [Getting Started](/nim/maxine/bnr-h4m/getting-started).

### Pull the Chart

```bash
helm pull nim-repo/nvidia-bnr-h4m-operator --version 2.0.0
```


For the full repository setup, refer to [Pull Helm Charts](/nim/maxine/bnr-h4m/installation#pull-helm-charts).

### Install the Operator

```bash
helm upgrade --install nvidia-bnr-h4m-operator \
  nvidia-bnr-h4m-operator-2.0.0.tgz
```


With explicit image pull secret and image overrides:

```bash
helm upgrade --install nvidia-bnr-h4m-operator \
  nvidia-bnr-h4m-operator-2.0.0.tgz \
  --set imageCredentials.registry=nvcr.io \
  --set imageCredentials.username='$oauthtoken' \
  --set imageCredentials.password=$NGC_API_KEY
```


Check the operator:

```bash
kubectl get crd nvidiabnrmediafunctions.nvidia.com
kubectl get pods
```

On Red Hat OpenShift, replace `kubectl` with `oc`.

---

## Create a BNR Media Function

Apply a `NvidiaBnrMediaFunction` custom resource after the operator is running.

### NMOS Example

```yaml
apiVersion: nvidia.com/v1alpha1
kind: NvidiaBnrMediaFunction
metadata:
  name: nvidia-bnr-nim-media-function
spec:
  schedulerName: topo-aware-scheduler
  nodeSelector:
    kubernetes.io/hostname: example-gpu-node
  parameters:
    highSpeedNetwork:
      - name: media-a-tx-net
    resources:
      limits:
        cpu: "4"
        memory: "8Gi"
        hugepages-2Mi: "2Gi"
        nvidia.com/gpu: "1"
      requests:
        cpu: "4"
        memory: "8Gi"
        hugepages-2Mi: "2Gi"
        nvidia.com/gpu: "1"
    ngcSecret:
      secretName: ngc-api-key
      secretKey: NGC_API_KEY
    nimModelCache:
      enabled: true
      size: "10Gi"
    nimLogs:
      enabled: true
      size: "5Gi"
    securityContext:
      runAsUser: 1000
      runAsGroup: 1000
      runAsNonRoot: true
      allowPrivilegeEscalation: true
      capabilities:
        add:
          - IPC_LOCK
          - NET_RAW
          - SYS_NICE
          - DAC_READ_SEARCH
        drop:
          - ALL
    podSecurityContext:
      fsGroup: 1000
      seccompProfileType: RuntimeDefault
    label: "BNR-NIM"
    description: "BNR NIM - background noise removal, ST2110"
    modelType: v2-48k
    intensityRatio: "1.0"
    nmosEnabled: true
    nimEnabled: true
    cpuAffinity: "0-3"
  inputs:
    audio_input:
      control: { nmos: {} }
      transport:
        rtp:
          packet_time: 1
      format:
        audio:
          sample_rate: 48000
          channel_count: 1
          sample_depth: 24
          media_type: "audio/L24"
      sessionName: audio_in
      localInterfaceName: net1
      hostIP: "234.5.8.9"
      hostPort: "5003"
      hostNumSubnetBits: 24
  outputs:
    audio_output:
      control: { nmos: {} }
      transport:
        rtp:
          packet_time: 1
      format:
        audio:
          sample_rate: 48000
          channel_count: 1
          sample_depth: 24
          media_type: "audio/L24"
      sessionName: audio_out
      localInterfaceName: net1
      hostIP: "234.5.8.9"
      hostPort: "5004"
      hostNumSubnetBits: 24
```

Create the custom resource:

```bash
kubectl apply -f nvidia-bnr-h4m.yaml
```

Check the reconciled workload:

```bash
kubectl get nvidiabnrmediafunction
kubectl get deploy,pods,pvc
```

---

## Important Fields

| Field | Description |
|-------|-------------|
| `spec.schedulerName` | Scheduler used by the reconciled NIM pod. Defaults are typically set for topology-aware scheduling. |
| `spec.nodeSelector` | Pins the NIM pod to the target GPU node. |
| `spec.parameters.highSpeedNetwork[].name` | Multus `NetworkAttachmentDefinition` for media traffic. |
| `spec.parameters.ngcSecret` | Generic secret containing the NGC API key used for model download. |
| `spec.parameters.modelType` | BNR denoiser variant. Use `v2-48k` for 48 kHz input or `v2-16k` for 16 kHz input. |
| `spec.parameters.intensityRatio` | Denoising strength from `"0.0"` to `"1.0"`. |
| `spec.parameters.label` | NMOS label advertised by the BNR NIM when NMOS is enabled. The examples use `BNR-NIM`. |
| `spec.inputs.audio_input` | ST 2110-30 audio input configuration. |
| `spec.outputs.audio_output` | ST 2110-30 audio output configuration. |

<Note>
The `sample_rate` under `inputs.audio_input.format.audio` and `outputs.audio_output.format.audio` must match `parameters.modelType`: use `48000` with `v2-48k`, and `16000` with `v2-16k`.
</Note>

---

## Uninstall

Delete BNR media function resources before uninstalling the operator:

```bash
kubectl delete nvidiabnrmediafunction --all
helm uninstall nvidia-bnr-h4m-operator
```