Upgrading Snapshot Manager
Ensure that all the steps mentioned in the following section are performed before performing the upgrade of Snapshot Manager operator:
Preparing for NetBackup upgrade
Upgrading the Snapshot Manager operator
- Push the new operator images, Snapshot Manager main image to container registry with different tags.
- Update the new image name and tag in
images.cloudpointoperatorsection inkustomization.yamlfile in operator folder available in the new package folder. - Update the node selector and tolerations in
operator_patch.yamlfile inoperator/patchesfolder in the new package folder. - To upgrade the operator, apply the new image changes using the following command:
kubectl apply -k <operator folder name>
After applying the changes, new Snapshot manager operator pod will start in operator namespace and run successfully.
Edit the field in the CR to upgrade Snapshot Manager using environment CR. MODIFY event will be sent to Snapshot Manager operator which will trigger upgrade workflow.
To upgrade Snapshot Manager
- Update the variables appropriately:
NB_VERSION=10.4.0 OPERATOR_NAMESPACE="netbackup-operator-system" ENVIRONMENT_NAMESPACE="ns-155" NB_DIR=/home/azureuser/VRTSk8s-netbackup-${NB_VERSION}/ - Edit the
operator/kustomization.yamlfile as follows:KUSTOMIZE_FILE=${NB_DIR}operator/kustomization.yaml nano $KUSTOMIZE_FILE
Update the newName and newTag under
cloudpointoperator. - Upgrade the operator using the following command:
cd $NB_DIR kubectl apply -k operator sleep 20s
- Check (Wait for) if the operator is upgraded and running:
kubectl describe pod $(kubectl get pods -n $OPERATOR_NAMESPACE | grep flexsnap-operator | awk '{printf $1" " }') | grep Image: kubectl get all -n $OPERATOR_NAMESPACE
- Once the operator is upgraded successfully and it is running, update the cpServer.tag in
environment.yamlfile as follows:nano ${NB_DIR}/environment.yaml
- Delete the cpServer.credential section from
environment.yamlfile. - Apply
environment.yamlfile to start upgrading Snapshot Manager services using the following command:kubectl apply -f ${NB_DIR}/environment.yaml -n $ENVIRONMENT_NAMESPACE
- Check upgrade logs in flexsnap-operator using the following command:
kubectl logs -f $(kubectl get pods -n $OPERATOR_NAMESPACE | grep flexsnap-operator | awk '{printf $1" " }')
- Check Snapshot Manager status using the following command:
kubectl get cpserver -n $ENVIRONMENT_NAMESPACE