Patching of containers
This section describes the procedure for patching of the following containers (listed with examples):
Primary (main) containers
For example,
netbackup/main:10.4-patchMedia containers
For example,
netbackup/media:10.4-patchPoddependency-init containers
For example,
netbackup/operator:10.4-patch
To patch the main, media and poddependency-init container
- Use the following command to obtain the environment name:
$ kubectl get environments -n <namespace>
- Depending on the container, use the following respective command to verify if serviceImageTag is present:
For primary container:
$ kubectl get environment -n <namespace> -o=jsonpath='{$.items[0].spec.primary.serviceImageTag}'
For media container:
$ kubectl get environment -n <namespace> -o=jsonpath='{$.items[0].spec.mediaServers[0].serviceImageTag}'
For poddependency-init container:
$ kubectl get environment -n <namespace> -o=jsonpath='{$.items[0].spec.mediaServers[0].serviceImageTag}'
Depending on the output perform one of the following:
If serviceImageTag is present, then run the following command by changing the value field. For example, change
10.4-patchto the required image tag:For primary container:
$ kubectl patch environment <env-name> -n <namespace> --type=json --patch '[{"op": "replace", "path": "/spec/primary/serviceImageTag/primary.main", "value": "10.4-patch"}]'
For media container:
$ kubectl patch environment <env-name> -n <namespace> --type=json --patch '[{"op": "replace", "path": "/spec/mediaServers/0/serviceImageTag/media.main", "value": "10.4-patch"}]'
For poddependency-init container:
$ kubectl patch environment <env-name> -n <namespace> --type=json --patch '[{"op": "replace", "path": "/spec/mediaServers/0/serviceImageTag/media.pod-dependency-init", "value": "10.4-patch"}]'
Or
If serviceImageTag is not present, then run the following command by changing the value field. For example, change
10.4-patchto the required image tag:For primary container:
$ kubectl patch environment <env-name> -n <namespace> --type=json --patch '[{"op": "replace", "path": "/spec/primary/serviceImageTag", "value": {}},{"op": "replace", "path": "/spec/primary/serviceImageTag/primary.main", "value": "10.4-patch"}]'
For media container:
$ kubectl patch environment nbu -n netbackup --type=json --patch '[{"op": "replace", "path": "/spec/mediaServers/0/serviceImageTag", "value": {}},{"op": "replace", "path": "/spec/mediaServers/0/serviceImageTag/media.main", "value": "10.4-patch"}]'
For poddependency-init container:
$ kubectl patch environment <env-name> -n <namespace> --type=json --patch '[{"op": "replace", "path": "/spec/mediaServers/0/serviceImageTag", "value": {}},{"op": "replace", "path": "/spec/mediaServers/0/serviceImageTag/media.pod-dependency-init", "value": "10.4-patch"}]'