> For the complete documentation index, see [llms.txt](https://docs.trilio.io/kubernetes/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.trilio.io/kubernetes/configuration/custom-job-environment-variables.md).

# Custom Environment Variables for Worker Pods

How to set custom environment variables on Trilio for Kubernetes worker pods.

Use `customJobEnvs` to add extra environment variables to TVK worker pods (backup, restore, metadata, target browser, and other target-related Jobs and Deployments).

The same variables are applied to all of those pods. They take effect on **new** pods only. Running Job pods are not updated.

Control-plane and UI pods are not included.

## Set the variables (operator install)

Edit the `TrilioVaultManager` CR in the install namespace:

```yaml
spec:
  helmValues:
    customJobEnvs:
      AWS_MAX_ATTEMPTS: "10"
      S3_ADDRESSING_STYLE: "path"
```

Or:

```bash
kubectl patch tvm triliovault-manager -n <install-namespace> --type merge -p '{
  "spec": {"helmValues": {"customJobEnvs": {
    "AWS_MAX_ATTEMPTS": "10",
    "S3_ADDRESSING_STYLE": "path"
  }}}}'
```

This is the supported way on OpenShift and upstream operator installs. The change is kept across upgrades.

{% hint style="info" %}
If you installed the `k8s-triliovault` chart directly (no operator):

`helm upgrade <release> <repo>/k8s-triliovault -n <install-namespace> --reuse-values --set customJobEnvs.AWS_MAX_ATTEMPTS=10`
{% endhint %}

Do not edit `k8s-triliovault-config` by hand for a lasting change. The next upgrade can overwrite it.

## Check that it applied

```bash
kubectl get cm k8s-triliovault-config -n <install-namespace> \
  -o jsonpath='{.data.customJobEnvs}'

kubectl get pod <worker-pod> -n <namespace> \
  -o jsonpath='{.spec.containers[*].env}'
```

Target browser and similar Deployments roll out on their own. For Jobs, run a new backup or restore (or wait for the next scheduled Job).

## Remove them

```bash
kubectl patch tvm triliovault-manager -n <install-namespace> --type merge \
  -p '{"spec":{"helmValues":{"customJobEnvs":null}}}'
```

{% hint style="warning" %}
If a custom name matches a TVK built-in env var, the custom value is used. Do not put secrets in `customJobEnvs`.
{% endhint %}
