NetBackup103 Kubernetes Installation and Configuration Guide
NetBackup103 Kubernetes Installation and Configuration Guide
13724 bi-
Kubernetes cluster Primary Server VNETD for data movement
directional
13724 bi- VNETD for data movement
Kubernetes cluster Media Servers
directional
Deployment - Prerequisites for NetBackup Kubernetes Operators
1. Go to the support.veritas.com, to log onto the Veritas Entitlement Management System (VEMS)
and the, sign in and click Licensing.
2. Click Entitlements (within Veritas Entitlement Management System main menu).
3. Click More Options to expand filters.
4. Set the Product Line filter to NetBackup and click Apply Filters.
5. Look for entitlement's references, the version matches to the release note mentioned in the subject
line.
6. To access your new software and license key(s) utilize the Download Software and Generate
License buttons located in the Actions column.
7. You must download two packages:
➢ NetBackup Kubernetes operator package (netbackupkops-10.3.tar.gz).
➢ NetBackup Data mover image (veritasnetbackup-datamover-10.3.tar).
9. Extract the package to the home directory of a system that has access to the cluster where you can
run kubectl commands. The netbackupkops-helm-chart is part of the KOps package and is in the
home directory.
10. To list all cluster contexts, run the following command: kubectl config get-contexts
11. To switch to the cluster where you want to deploy the operator service, run the following command:
kubectl config use-context <cluster-context-name>
5. To load the image to the docker cache and push the image to the docker image repository, run the
following commands:
➢ docker load -i <name of the tar file>
➢ docker tag <image name:tag of the loaded image> <repo-name/image-name:tag-name>
➢ docker push <repo-name/image-name:tag-name>
6. Open the netbackupkops-helm-chart/values.yaml file in a text editor and then replace the value for
image in the manager section, with your netbackupkops repo image name and tag repo-
name/image-name:tag-name and then save the file
To load the image to the docker cache and push the image to the docker image repository, run the
following commands:
➢ docker load -i <name of the datamover image tar file>
➢ docker tag <datamover image name:tag of the loaded datamover image> <repo-name/image-
name:tag-name>
➢ docker push <repo-name/image-name:tag-name>
User can deploy and configure NBUKops in NetBackup web UI using the following methods:
1. Provide required parameters in values.yaml file to use Automated configuration:
➢ Before you run the helm install, you need to provide required values in the netbackupkops-helm-chart/values.yaml file.
➢ Follow the Helm install integrated manual configuration steps.
➢ As part of configuration deployment, a pod gets created each time user runs helm install. This pod runs the script to configure
Kubernetes workload protection.
➢ This process includes following operations:
• Prepares storage for backup and restore : Label volmesnapshotclass and storage classes for creating snapshots and
PVCs.
• Read service account token from nbukops namespace.
• Create NetBackup credentials for Kubernetes in NetBackup.
• Add Kubernetes Cluster to NetBackup.
• Create NetBackup token and fetch sha256 fingerprint.
• Create BackupServerCert for establishing secure communication for datamover pod.
• Configure primary server specific configmap for datamover image.
NGU
Kops
3-a. If you are protecting a Rancher Managed RKE2 cluster, then follow the steps on this slide.
• Enter the first 2 values which you extracted earlier from your temporary files into this file
• Once the k8stoken and k8scacert values have been entered, move to the API Key creation phase to enter the value for apikey
apiVersion: v1
kind: Secret
metadata:
name: <kops-namespace>-nb-config-deploy-secret
namespace: <kops-namespace>
type: Opaque
stringData:
# All the 3 fields are mandatory here to add a Rancher managed RKE2 cluster in Netbackup
apikey: A_YoUkgYQwkPLUkmyj9Q6A1-6RX8RNY-PtYX0SukbqCwIK_osPz8qVm9zCL9phje
k8stoken: kubeconfig-user-mvvgcm8sq8:nrsvcnx8hj46t24r2tjrxd2kn8tzo2bg4kj8waxpw36k8ktrchp826
k8scacert: |
-----BEGIN CERTIFICATE-----
MIIDDDCCAfSgAwIBAgIBATANBgkqhkiG9w0BAQsFADAmMSQwIgYDVQQDDBtpbmdy
ZXNzLW9wZXJhdG9yQDE2ODc1MzY4NjgwHhcNMjMwNjIzMTYxNDI3WhcNMjUwNjIy
XtXqbaBGrXIuCCo90mxv4g==
-----END CERTIFICATE-----
Note: This configuration step is necessary if you have custom CA certificates configured on your cluster’s API server for external access. This
step can be ignored if there is no custom CA setup
• If you have the custom CA certificates available, then simply enter them directly in the configuration yaml file mentioned in the next slide.
• If you don’t have the certificates available, you can extract them using the command given below on your Netbackup primary host.
• You can also use the openssl command tool to perform the same step on any Linux host.
<NBU_Install_Path>/bin/goodies/vxsslcmd s_client -showcerts -connect <cluster-fqdn>:<port-no> 2>/dev/null </dev/null
| sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p'
• Enter the certificate value which will be generated from the output of this command into the template file in the next step.
• Note:- Ensure the proper indentations are followed exactly like the template below.
• Enter the value which was extracted in the previous step into the k8scacert field & ensure the indentation is properly followed for the entire value.
apiVersion: v1
kind: Secret
metadata:
name: <kops-namespace>-nb-config-deploy-secret
namespace: <kops-namespace>
type: Opaque
stringData:
apikey: <Netbackup API Key>
k8scacert: |
-----BEGIN CERTIFICATE-----
MIIDDDCCAfSgAwIBAgIBATANBgkqhkiG9w0BAQsFADAmMSQwIgYDVQQDDBtpbmdy
ZXNzLW9wZXJhdG9yQDE2ODc1MzY4NjgwHhcNMjMwNjIzMTYxNDI3WhcNMjUwNjIy
XtXqbaBGrXIuCCo90mxv4g==
-----END CERTIFICATE-----
apiVersion: v1
kind: Secret
metadata:
name: <kops-namespace>-nb-config-deploy-secret
namespace: <kops-namespace>
type: Opaque
stringData:
apikey: A_YoUkgYQwkPLUkmyj9Q6A1-6RX8RNY-PtYX0SukbqCwIK_osPz8qVm9zCL9phje
1. Ensure the <kops-namespace>-nb-config-deploy-secret has been created before running the helm install
on the next step.
2. Run the following command to install the NetBackup Kubernetes Operator:
helm install <user defined name of the deployment> ./netbackupkops-helm-chart -n <kops-namespace>
An example:
helm install veritas-netbackupkops ./netbackupkops-helm-chart -n netbackup
3. To check the status of the deployments, run the command:
kubectl get pods -n <kops-namespace>
An example:
kubectl get pods -n netbackup
4. To verify that Kubernetes cluster is added to NetBackup, open NetBackup UI → Workloads → Kubernetes →
Kubernetes Clusters. Kubernetes cluster should be listed on this page.
If there is an issue, please check troubleshooting steps on next page.
2. If you see any failures in the deployment due to incorrect input values, set the replica count to zero for
deployment <kops-namespace>-netbackup-config-deploy to remove the deploy pod.
kubectl scale deployment <kops-namespace>-netbackup-config-deploy -n <kops-namespace> --replicas=0
4. Again, set the replica count to 1 to restart configuration. Use below command to set the replica count:
kubectl scale deployment <kops-namespace>-netbackup-config-deploy -n <kops-namespace> --replicas=1
1. To see what volume snapshot classes are available in the environment, run the following command:
➢ kubectl get volumesnapshotclass
➢ Following is the output example, you can see:
➢ The parameter you will use is the value in the name field from this command that is associated
with the appropriate CSI driver.
2. User must label a valid volume snapshot classes on the block and file system volume snapshot
classes to create a block and file system volume snapshots for NetBackup usage.
3. Add the following label on the block and file system volume snapshot classes to create block and file
system volume snapshots:
netbackup.veritas.com/default-csi-volume-snapshot-class=true
4. Run the following commands:
➢ kubectl label volumesnapshotclass <block-vol-snap-class-name>
netbackup.veritas.com/default-csi-volume-snapshot-class=true
➢ kubectl label volumesnapshotclass <filesystem-vol-snap-class-name>
netbackup.veritas.com/default-csi-volume-snapshot-class=true
5. If the NetBackup labeled VolumeSnapshotClass class is not found, then snapshot of a namespace
consisting of persistent volume fails with an error message: Failed to create snapshot of the
Kubernetes namespace.
6. To see storage classes available in the environment, run the following command:
➢ kubectl get sc
➢ Following is the output example, you can see:
7. Look for the storage that has CSI drivers listed under provisioner which consists of CSI in the name.
8. You must label each of the CSI supported storage classes with the labels in this section.
9. The command ‘kubectl get sc’ you ran earlier takes note of the default storage listed:
10. If the default storage for the cluster is not associated with the CSI storage you labeled. Then, any
namespaces created with default storage will not be able to protect.
11. Customers either must change the default storage to CSI storage which needs to protect, or
explicitly point to the CSI storage when the namespaces are created.
➢ Ensure that the user label a valid storage class (Block and Filesystem) for NetBackup
usage. (Refer :Prepare Storage section)
➢ Ensure that the user label a valid snapshotvolumeclass for NetBackup usage. (Refer:
Prepare PV for Backup section)
➢ Each primary server which runs the backup from snapshot and restore from backup copy
operations, needs to create a separate ConfigMap with the primary server's name. (Refer:
Deploy the NetBackup Kubernetes Operator - Create configmap.yaml file for each Primary
Server protecting the cluster)
➢ Ensure that the user deployed certificates on the Kubernetes operator. (Refer: Deploy
certificates on the Kubernetes Operator section)
3. Start backup of
Kubernetes asset using
the protection plan.
4. Duplication jobs gets
triggered only after
backup completed.
5. Duplication happen using
the backup from snapshot
copy
Configuration on the
source primary server.
Step 1
➢ Add target primary server
entry under trusted
servers.
➢ In the NetBackup web UI
navigate to the Host
properties
➢ Select primary server in host
entries, and connect.
➢ Kubernetes Cluster
❑ Kubernetes cluster should be deployed with FIPS enabled mode.
❑ The process to deploy K8s cluster in FIPS mode in vendor dependent.
❑ For example, deploying Openshift with FIPS Enabled.
Note – Customer need to make sure all the system on which K8s-WL is running are FIPS compliant.
➢ If Kubernetes add cluster operation fails in NetBackup with an error message Failed to validate cluster <cluster-name>. An
unknown error occurred. Then, there may be the following reasons for failure:
❑ User might have created credentials with incomplete ca.crt value in NetBackup.
❑ The ca.crt value was properly copied but the cluster’s service account and API endpoint have a different Certifying
Authority (CA). User can check CA by extracting CA certificate from the cluster API endpoint.
❑ Verify if <kops-namespace>-nb-config-deploy-secret has proper values for k8scacert,k8stoken with the right indentation.
➢ Solution: Refer to the techNote x509 certificate signed by unknown authority error during discovery and backupservercert
➢ In customer environment, where access to external repositories is limited, to pull ‘kube-rbac-proxy’ image while deploying
NetBackup Kops. NBUKops pod will fail to pull ‘kube-rbac-proxy’ image from external repositories.