NetBackup101 WebUIGuide KubernetesAdmin
NetBackup101 WebUIGuide KubernetesAdmin
Kubernetes Administrator's
Guide
Release 10.1
Last updated: 2022-08-30
Legal Notice
Copyright © 2022 Veritas Technologies LLC. All rights reserved.
Veritas, the Veritas Logo, and NetBackup are trademarks or registered trademarks of Veritas
Technologies LLC or its affiliates in the U.S. and other countries. Other names may be
trademarks of their respective owners.
This product may contain third-party software for which Veritas is required to provide attribution
to the third party (“Third-party Programs”). Some of the Third-party Programs are available
under open source or free software licenses. The License Agreement accompanying the
Software does not alter any rights or obligations you may have under those open source or
free software licenses. Refer to the Third-party Legal Notices document accompanying this
Veritas product or available at:
https://www.veritas.com/about/legal/license-agreements
The product described in this document is distributed under licenses restricting its use, copying,
distribution, and decompilation/reverse engineering. No part of this document may be
reproduced in any form by any means without prior written authorization of Veritas Technologies
LLC and its licensors, if any.
The Licensed Software and Documentation are deemed to be commercial computer software
as defined in FAR 12.212 and subject to restricted rights as defined in FAR Section 52.227-19
"Commercial Computer Software - Restricted Rights" and DFARS 227.7202, et seq.
"Commercial Computer Software and Commercial Computer Software Documentation," as
applicable, and any successor regulations, whether delivered by Veritas as on premises or
hosted services. Any use, modification, reproduction release, performance, display or disclosure
of the Licensed Software and Documentation by the U.S. Government shall be solely in
accordance with the terms of this Agreement.
http://www.veritas.com
Technical Support
Technical Support maintains support centers globally. All support services will be delivered
in accordance with your support agreement and the then-current enterprise technical support
policies. For information about our support offerings and how to contact Technical Support,
visit our website:
https://www.veritas.com/support
You can manage your Veritas account information at the following URL:
https://my.veritas.com
If you have questions regarding an existing support agreement, please email the support
agreement administration team for your region as follows:
Japan CustomerCare_Japan@veritas.com
Documentation
Make sure that you have the current version of the documentation. Each document displays
the date of the last update on page 2. The latest documentation is available on the Veritas
website:
https://sort.veritas.com/documents
Documentation feedback
Your feedback is important to us. Suggest improvements or report errors or omissions to the
documentation. Include the document title, document version, chapter title, and section title
of the text on which you are reporting. Send feedback to:
NB.docs@veritas.com
You can also see documentation information or ask a question on the Veritas community site:
http://www.veritas.com/community/
https://sort.veritas.com/data/support/SORT_Data_Sheet.pdf
Contents
■ Overview
Overview
The NetBackup web UI provides the capability for backups and restores of
Kubernetes applications in the form of namespaces. The protectable assets in the
Kubernetes clusters are automatically discovered in the NetBackup environment
and administrators can select one or more protection plans that contain the wanted
schedule, backup, and retention settings.
The NetBackup web UI lets you perform the following operations:
■ Add Kubernetes cluster for protection.
■ View discovered namespaces.
■ Manage permissions for roles
■ Set resource limits to optimize load on your infrastructure and network.
■ Manage protection and intelligent group to protect Kubernetes assets.
■ Restore namespaces and persistent volumes.
■ Monitor backup and restore operations.
■ Image expiration, image import, and image copy operations.
Overview of NetBackup for Kubernetes 7
Features of NetBackup support for Kubernetes
Feature Description
Integration with The NetBackup web UI provides RBAC roles to control which NetBackup users can manage
NetBackup Kubernetes operations in NetBackup. The user does not need to be a NetBackup administrator
role-based access to manage Kubernetes operations.
control (RBAC)
■ Use a single protection plan to protect multiple Kubernetes namespaces. The assets can
be spread over multiple clusters.
■ You are not required to know the Kubernetes commands to protect the Kubernetes assets.
Intelligent NetBackup automatically discovers the namespaces, persistent volumes, persistent volume
management of claims, and so on, in the Kubernetes clusters. You can also perform manual discovery. After
Kubernetes assets the assets are discovered, the Kubernetes workload administrator can select one or more
protection plans to protect them.
Kubernetes specific Kubernetes service accounts used to authenticate and manage the clusters.
credentials
■ Full discovery Discovery when a new cluster is added to the NetBackup is always a full discovery.
■ Incremental Once the Kubernetes cluster is added, auto discovery cycle is triggered to discover all the assets
discovery available on the Kubernetes cluster. The first auto discovery of the day is a full discovery and
subsequent auto discoveries are incremental.
■ Snapshot only ■ Backups are managed entirely by the NetBackup server from a central location. Administrators
backups can schedule automatic, unattended backups for namespaces on different Kubernetes
■ Backup from clusters.
snapshot ■ The NetBackup web UI supports backup and restore of namespaces from one interface.
■ Backup schedule configuration for full backups.
■ Manual backups and snapshot only backups.
■ Resource throttling for each cluster to improve the performance of backups.
■ NetBackup can perform backups of Kubernetes namespaces with snapshot methodology,
achieving faster recovery time objectives.
Overview of NetBackup for Kubernetes 8
Features of NetBackup support for Kubernetes
Feature Description
■ Restore from ■ Restore Kubernetes namespaces and persistent volumes to different locations.
snapshot ■ Restore to a different Kubernetes cluster flavor using restore from a backup copy.
■ Restore from
backup copy
Client side data Client side data deduplication support feature is enabled for Kubernetes.
deduplication
For more details, refer to the About client-side deduplication section in the NetBackup™
support
Deduplication Guide.
Chapter 2
Deploying and configuring
the NetBackup Kubernetes
operator
This chapter includes the following topics:
3. #./get_helm.sh
You must deploy the operator in each cluster, where you want to deploy NetBackup.
Note: You must install a new NetBackup plug-in Helm chart, as Helm chart upgrade
is not supported.
Before installing a new plug-in, you must uninstall the older plug-in.
netbackupkops-helm-chart
├── charts
├── Chart.yaml
├── templates
│ └── deployment.yaml
└── values.yaml
Directory structure:
5 To change the current directory to your home directory, run the command: cd
~
6 If you use a private docker registry, follow the instructions in this step to create
a secret nb-docker-cred in NetBackup namespace. Otherwise, skip to the
next step.
■ To log on to the private docker registry, run the command: docker login
-u <user name><repo-name>
After log in, the config.json file containing the authorization token is
created or updated. To view the config.json file, run the command: cat
~/.docker/config.json
The output looks like:
{
"auths": {
"https://index.docker.io/v1/": {
"auth": "c3R...zE2"
}
}
}
7 To load the image to the docker cache and push the image to the docker image
repository, run the commands:
docker load -i <name of the tar file>./
<repo-name/image-name:tag-name>
Example:
helm list -n netbackup
Example:
helm history veritas-netbackupkops -n netbackup
Deploying and configuring the NetBackup Kubernetes operator 13
Port requirements for Kubernetes operator deployment
Note: Review the Kubernetes configuration to ensure that the Kubernetes API server port
has not been changed from 443 to a non-default port; often 6443 or 8443.
Note: NetBackup Kubernetes Operator (KOps) and datamover pods have additional
requirements (new in NetBackup 10.0).
Kubernetes cluster TCP port 13724 bi-directional Primary and media server
if using Resilient Network.
Deleting the NetBackup Kubernetes operator results in the loss of metadata volume,
which also hosts the snapshot metadata. If any snapshots are already performed,
then restore from snapshot copy operation fails in the absence of metadata.
Do not delete the associated Velero snapshots before deleting the older snapshots
manually.
In NetBackup 10.0, you cannot perform expiration of Velero managed snapshots
which were created using NetBackup 9.1. When the backup images are expired in
NetBackup, the catalog is automatically cleared. But you must delete the snapshot
on Kubernetes server manually.
For more details on manual image expiration operation, see
https://www.veritas.com/content/support.
2 Enter the password upon prompt. Skip this step if you are already logged in
3 Run docker load -i <name of the datamover image file>
4 Run docker tag <datamover image name:tag of the loaded datamover
image> <repo-name/image-name:tag-name>
6 Ensure that the configmap with primary server name, have image value set to
<repo-name/image-name:tag-name> pushed in step no 4.
For more details on configmap, See the section called “Prerequisites for backup
from snapshot and restore from backup operations” on page 19.
4. Sizing for metadata persistent volume is required. The default persistent volume
size for Kubernetes operator is 10Gi. The persistent volume size is configurable.
You can change the value for storage from 10Gi to a higher value before
deploying the plugin. This leads to the nbukops pod have the size of the PVC
mounted in the pod.
Persistent Volume Claim looks like this:
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
labels:
component: netbackup
name: {{ .Release.Namespace }}-netbackupkops
namespace: {{ .Release.Namespace }}
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 10Gi
■ During fresh installation while configuring the Helm Chart. You can modify
the size of PVC storage in the deployment.yaml of the
netbackupkops-helm-chart which leads to creation of the initial PVC size.
■ Post installation, updating the PVC size (dynamic volume expansion) is
supported by few storage vendors. For more information, refer
tohttps://kubernetes.io/docs/concepts/storage/persistent-volumes
Deploying and configuring the NetBackup Kubernetes operator 16
Configure settings for NetBackup snapshot operation
Note: The default size of persistent volume can be resized to larger value without
losing the data. You are recommended to add the storage provider that supports
volume expansion.
Note: To get the configuration value, you can run the command: kubectl get
configmaps <namespace>-backup-operator-configuration -n <namespace>
-o yaml > {local.file}
Name Provisioner
ocs-storagecluster-ceph-rgw openshift-storage.ceph.rook.io/bucket
ocs-storagecluster-cephfs openshift-storage.cephfs.csi.ceph.com
openshift-storage.noobaa.io openshift-storage.noobaa.io/obc
thin kubernetes.io/vsphere-volume
Deploying and configuring the NetBackup Kubernetes operator 20
Configure settings for NetBackup snapshot operation
storageclass.storage.k8s.io/ocs-storagecluster-cephfs labeled
Example 4. Run the command:oc get sc ocs-storagecluster-cephfs
--show-labels
2. Label a valid volume snapshot class for NetBackup usage, add the following
label: netbackup.veritas.com/default-csi-volume-snapshot-class=true. If the
NetBackup labeled VolumeSnapshotClass class is not found, then backup
from snapshot job for metadata image and restore jobs fails with an error
message: Failed to create snapshot of the Kubernetes namespace.
To label the volume snapshot classes, run the following commands given the
examples:
Example 1. Run the command:# oc get volumesnapshotclass
Name Driver
ocs-storagecluster-cephfsplugin-snapclass openshift-storage.cephfs.csi.ceph.com
ocs-storagecluster-rbdplugin-snapclass openshift-storage.rbd.csi.ceph.co
Delete 2d2h
Delete 2d2h
Name Driver
ocs-storagecluster-cephfsplugin-snapclass openshift-storage.cephfs.csi.ceph.com
Delete 2d2h
volumesnapshotclass.snapshot.storage.k8s.io/ocs-storagecluster-cephfsplugin-snapclass
labeled
Example 4. Run the command:# oc get volumesnapshotclass
ocs-storagecluster-cephfsplugin-snapclass --show-labels
Name Driver
ocs-storagecluster-cephfsplugin-snapclass openshift-storage.cephfs.csi.ceph.com
Deploying and configuring the NetBackup Kubernetes operator 22
Configure settings for NetBackup snapshot operation
3. 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.
In the following configmap.yaml example,
■ backupserver.sample.domain.com and mediaserver.sample.domain.com
are the hostnames of NetBackup primary and media server.
■ IP: 10.20.12.13 and IP: 10.21.12.13 are the IP addresses of NetBackup
primary and media server.
apiVersion: v1
data:
datamover.hostaliases: |
10.20.12.13=backupserver.sample.domain.com
10.21.12.13=mediaserver.sample.domain.com
datamover.properties: |
image=reg.domain.com/datamover/image:latest
version: "1"
kind: ConfigMap
metadata:
name: backupserver.sample.domain.com
namespace: kops-ns
4. Specify datamover.properties:
image=reg.domain.com/datamover/image:latest with correct datamover
image.
5. Specify datamover.hostaliases, if the primary server and the media servers
connected to the primary server have short names and host resolution failing
from datamover. Provide a mapping of all hostnames to IPs for primary and
media servers.
Deploying and configuring the NetBackup Kubernetes operator 23
Configure settings for NetBackup snapshot operation
8. If Kubernetes operator is not able to resolve the primary server based on short
names
■ While fetching the certificates, if you get a message:EXIT STATUS 8500:
Connection with the web service was not established. Then, verify the
hostname resolution state from the nbcert logs.
■ If the hostname resolution fails, then do the following:
Update the kops deployment.yaml and add the hostAliases in the
deployment.
■ In the following hostAliases example,
■ backupserver.sample.domain.com and mediaserver.sample.domain.com
are the hostnames of NetBackup primary and media server.
■ IP: 10.20.12.13 and IP: 10.21.12.13 are the IP addresses of NetBackup
primary and media server.
hostAliases:
- hostnames:
- backupserver.sample.domain.com
ip: 10.20.12.13
- hostnames:
- mediaserver.sample.domain.com
ip: 10.21.12.13
Copy, paste the hostAliases example details in the text editor and add to
the hostAliases in the deployment.
Note: The hostAliases section must be added to the line 2104 in default
./netbackupkops-helm-chart/templates/deployment.yaml file.
Deploying and configuring the NetBackup Kubernetes operator 24
Configure settings for NetBackup snapshot operation
hostAliases example:
2104 hostAliases;
- ip:10.15.206.7
hostnames:
- lab02-linsvr-01.demo.sample.domain.com
- lab02-linsvr-01
- ip:10.15.206.8
hostnames:
- lab02-linsvr-02.demo.sample.domain.com
- lab02-linsvr-02
imagePullSecrets:
- name: {{ .values.netbackupKops.imagePullSecrets.name}}
apiVersion: v1
data:
datamover.hostaliases: |
10.20.12.13=backupserver.sample.domain.com
10.21.12.13=mediaserver.sample.domain.com
datamover.properties: |
image=reg.domain.com/datamover/image:latest
DTE_CLIENT_MODE=ON
Deploying and configuring the NetBackup Kubernetes operator 25
Troubleshooting NetBackup servers with short names
version: "1"
kind: ConfigMap
metadata:
name: backupserver.sample.domain.com
namespace: kops-ns
VXMS_VERBOSE Range:[0,99]
VERBOSE Range:[0,5]
DTE_CLIENT_MODE ■ AUTOMATIC
■ ON
■ OFF
apiVersion: v1
data:
datamover.properties: |
image=reg.domain.com/datamover/image:latest
VERBOSE=5
DTE_CLIENT_MODE=OFF
VXMS_VERBOSE=5
version: "1"
kind: ConfigMap
metadata:
name: backupserver.sample.domain.com
namespace: kops-ns
hostAliases:
- hostnames:
- backupserver.sample.domain.com
ip: 10.20.12.13
- hostnames:
- mediaserver.sample.domain.com
ip: 10.21.12.13
Copy, paste the hostAliases example details in the text editor and add to
the hostAliases in the deployment.
apiVersion: v1
data:
datamover.hostaliases: |
10.20.12.13=backupserver.sample.domain.com
10.21.12.13=mediaserver.sample.domain.com
datamover.properties: |
Deploying and configuring the NetBackup Kubernetes operator 27
Managing image groups
image=reg.domain.com/datamover/image:latest
version: "1"
kind: ConfigMap
metadata:
name: backupserver.sample.domain.com
namespace: kops-ns
■ If you have expired a single image in an image group, then it does not lead to
automatic expiration of remaining images. You must explicitly expire all images
in an image group.
■ If you have expired a few images then the recovery point will be incomplete.
Restore operation is not supported for incomplete recovery point.
■ If you have changed the expiration time for any of the images, then the expiration
time for rest of the images must be changed. Otherwise, the expiration time for
the images corresponding to recovery point gets skewed, leading to incomplete
recovery point at some point in time.
3. If the child image of a copy gets expired (with more than 1 child), then the copy
is marked as incomplete.
Chapter 3
Deploying certificates on
NetBackup Kubernetes
operator
This chapter includes the following topics:
Note: You must deploy the certificates before you can perform Backup from
Snapshot and Restore from Backup operations.
apiVersion: netbackup.veritas.com/v1
kind: BackupServerCert
metadata:
name: backupservercert-sample-nbca
namespace: kops-ns
spec:
clusterName: cluster.sample.com:port
backupServer: primary.server.sample.com
certificateOperation: Create | Update | Remove
certificateType: NBCA | ECA
nbcaAttributes:
nbcaCreateOptions:
secretName: "Secret name consists of token and fingerprint"
nbcaUpdateOptions:
secretName: "Secret name consists of token and fingerprint"
force: true | false
nbcaRemoveOptions:
hostID: "hostId of the nbca certificate. You can view on Netbackup UI"
ecaAttributes:
ecaCreateOptions:
ecaSecretName: "Secret name consists of cert, key, passphrase, cacert"
copyCertsFromSecret: true | false
isKeyEncrypted: true | false
ecaUpdateOptions:
ecaCrlCheck: DISABLE | LEAF | CHAIN
ecaCrlRefreshHours: [0,4380]
NBCA: ON
ECA: OFF
Deploying certificates on NetBackup Kubernetes operator 32
Perform Host-ID-based certificate operations
apiVersion: netbackup.veritas.com/v1
kind: BackupServerCert
metadata:
name: backupservercert-sample
namespace: kops-ns
spec:
clusterName: cluster.sample.com:port
backupServer: primaryserver.sample.domain.com
certificateOperation: Create | Update | Remove
certificateType: NBCA
nbcaAttributes:
nbcaCreateOptions:
secretName: "Secret name consists of token and fingerprint"
nbcaUpdateOptions:
secretName: "Secret name consists of token and fingerprint"
force: true
nbcaRemoveOptions:
hostID: "hostId of the nbca certificate. You can view on Netbackup UI"
apiVersion: v1
kind: Secret
metadata:
name: secret-name
namespace: kops-ns
type: Opaque
stringData:
token: "Authorization token | Reissue token"
fingerprint: "SHA256 Fingerprint"
apiVersion: netbackup.veritas.com/v1
kind: BackupServerCert
metadata:
name: backupserver-nbca-create
namespace: kops-ns
spec:
clusterName: cluster.sample.com:port
backupServer: backupserver.sample.domain.com
certificateOperation: Create
certificateType: NBCA
nbcaAttributes:
nbcaCreateOptions:
secretName: nbcaSecretName with token and fingerprint
Deploying certificates on NetBackup Kubernetes operator 34
Perform Host-ID-based certificate operations
9 Once the certificate is created, check custom resource status. If the custom
resource status is successful, you can run Backup from Snapshot jobs.
Note: You need to check that the BackupServerCert custom resource status
is successful before initiating Backup from Snapshot or Restore from Backup
Copy operations.
Note: Ensure to check whether the NetBackup primary server clock and the
NetBackup Kubernetes operator clock are in sync. For more details on the
CheckClockSkew errors, refer to the Implication of clock skew on certificate
validity section in the NetBackup™ Security and Encryption Guide.
apiVersion: netbackup.veritas.com/v1
kind: BackupServerCert
metadata:
name: backupserver-nbca-domain.com
namespace: kops-ns
spec:
clusterName: cluster.sample.com:port
backupServer: backupserver.sample.domain.com
certificateOperation: Remove
certificateType: NBCA
nbcaAttributes:
nbcaRemoveOptions:
hostID: nbcahostID
Note: If update certificate operation fails, you must remove the certificate first and
then create a new certificate.
apiVersion: netbackup.veritas.com/v1
kind: BackupServerCert
metadata:
name: backupserver-nbca-update
namespace:kops-ns
spec:
clusterName: cluster.sample.com:port
backupServer: backupserver.sample.domain.com
certificateOperation: Update
certificateType: NBCA
nbcaAttributes:
nbcaUpdateOptions:
secretName: "Name of secret containing
token and fingerprint"
force: true
3 Once the backupservercert object is created, then check the custom resource
status.
NBCA: ON
ECA: ON
To configure the backup server in ECA mode, refer to the About external CA support
in NetBackup section in the NetBackup™ Security and Encryption Guide
ECA certificate specification looks like this:
apiVersion: netbackup.veritas.com/v1
kind: BackupServerCert
metadata:
name: backupservercert-sample-eca
namespace: kops-ns
spec:
clusterName: cluster.sample.com:port
backupServer: primaryserver.sample.domain.com
certificateOperation: Create | Update | Remove
certificateType: ECA
ecaAttributes:
ecaCreateOptions:
ecaSecretName: "Secret name consists of cert, key, passphrase, cacert"
copyCertsFromSecret: true | false
isKeyEncrypted: true | false
ecaUpdateOptions:
ecaCrlCheck: DISABLE | LEAF | CHAIN
ecaCrlRefreshHours: range[0,4380]
Remove NA
├── cert_chain.pem
├── private
| |___key.pem
| |___passphrase.txt
|___trusted
|__cacerts.pem
apiVersion: netbackup.veritas.com/v1
kind: BackupServerCert
metadata:
name: backupservercert-eca-create
namespace: kops-ns
spec:
Deploying certificates on NetBackup Kubernetes operator 40
Perform ECA certificate operations
clusterName: cluster.sample.com:port
backupServer: backupserver.sample.domain.com
certificateOperation: Create
certificateType: ECA
ecaAttributes:
ecaCreateOptions:
ecaSecretName: eca-secret
copyCertsFromSecret: true
isKeyEncrypted: false
6 To copy certificate and keys to the Kubernetes operator, do any of the following:
■ Set copyCertsFromSecret as true
■ Set copyCertsFromSecret as false to avoid copying certificates and keys
existing on the Kubernetes Operator.
Note: ECA is common across all primary server thus Kubernetes operator
require one set of certificates and keys that can be enrolled with all primary
servers as required. No need to copy certificates and keys every time unless
there's issue with the previous copied certificates and keys.
7 If private key is encrypted, set isKeyEncrypted flag as true or else false for
unencrypted key. Ensure passphrase is provided in secret if private key is
encrypted.
8 Set ecaSecretName with the secret name, created backupservercert yaml
in step 5.
9 To create the eca-create-backupservercert.yaml file, run the command:
kubectl create -f eca-create-backupservercert.yaml
Deploying certificates on NetBackup Kubernetes operator 41
Perform ECA certificate operations
apiVersion: netbackup.veritas.com/v1
kind: BackupServerCert
metadata:
name: backupservercert-eca-remove
namespace: kops-ns
spec:
clusterName: cluster.sample.com:port
backupServer: backupserver.sample.domain.com
certificateOperation: Remove
certificateType: ECA
3 Once the object is created, then you need to check the custom resource status.
If failed, then you can take necessary actions.
These steps removes the external certificate details with respect to the specified
primary server from the local certificate store. The certificate is neither deleted from
the system nor from the NetBackup database.
If you want to disable ECA then refer to the Disabling an external CA in a NetBackup
domain section in the NetBackup™ Security and Encryption Guide
Deploying certificates on NetBackup Kubernetes operator 42
Perform ECA certificate operations
If you enrolled ECA on the Kubernetes operator for a backup server but later
reinstalled the backup server which supports just NBCA. Then, you have to remove
ECA enrolment from Kubernetes operator because during nbcertcmd communication
with backupserver CA support might get compared and if it mismatches then an
error occurs.
apiVersion: netbackup.veritas.com/v1
kind: BackupServerCert
metadata:
name: backupservercert-eca-update
namespace: kops-ns
spec:
clusterName: cluster.sample.com:port
backupServer: backupserver.sample.domain.com
certificateOperation: Update
certificateType: ECA
ecaAttributes:
ecaUpdateOptions:
ecaCrlCheck: DISABLE | LEAF | CHAIN
ecaCrlRefreshHours: [0,4380]
3 The ECA_CRL_CHECK option lets you specify the revocation check level for
external certificates of the host. It also lets you disable the revocation check
for the external certificates. Based on the check, the revocation status of the
certificate is validated against the Certificate Revocation List (CRL) during host
communication. For more information, refer to the ECA_CRL_CHECK for
NetBackup servers and clients section in the NetBackup™ Security and
Encryption Guide.
4 The ECA_CRL_REFRESH_HOURS option specifies the time interval in hours
to download the CRLs from the URLs that are specified in the peer host
certificate's Certificate Revocation List distribution points (CDP). For more
information, refer to the ECA_CRL_REFRESH_HOURS for NetBackup servers
and clients section in the NetBackup™ Security and Encryption Guide
2 Log on to the Kubernetes operator with administrator rights and run the
command:
kubectl exec pod/nbu-controller-manager-7c99fb8474-hzrsl -n
<namespace of Kubernetes operator> -c netbackupkops -it -- bash
Deploying certificates on NetBackup Kubernetes operator 44
Identify certificate types
3 To list backup servers which have NBCA certificate for Kubernetes, run the
command:
/nbcertcmdtool/nbcertcmdtool -atLibPath/nbcertcmdtool/
4 To list of backup servers which have ECA certificate for Kubernetes, run the
command:
/nbcertcmdtool/nbcertcmdtool -atLibPath/nbcertcmdtool/
■ Configure settings
4 Click Next. In the Manage credentials page, you can add credentials to the
cluster.
■ To use an existing credential, choose Select from an existing credential,
and click Next. In the next page, select the required credentials, and click
Next.
■ To create a new credential, click Add credential, and click Next. In the
Manage credentials page, enter the following:
■ Credential name: Enter a name of the credential.
■ Tag: Enter a tag to associate with the credential.
■ Description: Enter a description of the credential.
■ To add Kubernetes clusters in NetBackup you need CA Certificate and
a token. To get the CA Certificate and the token, run the following
command in the Kubernetes cluster: kubectl get secret
<[namespace-name]-backup-server-token-<id>> -n <namespace
name> -o yaml.
5 Click Next.
The credentials are validated and on successful validation, the cluster is added.
After the cluster is added, autodiscovery runs to discover available assets in
the cluster.
Note: In NetBackup Kubernetes version 10.1, edit cluster operation fails giving an
error message. The recommended action to resolve this issue is to first delete the
cluster and add the cluster again.
Configure settings
The Kubernetes settings let you configure the various aspects of the Kubernetes
deployment.
For an example to run a snapshot only backup job, if you protect 20 assets, and
you have set the limit to 5, only five assets can perform backup simultaneously,
rest of the 15 assets stand in a queue. After one of the first 5 assets completes the
backup, an asset from the queue takes its place.
For example, when running a snapshot job, the default value for the resource limit
is 1. Indicating that only one backup job per cluster can be in progress, while the
rest of the assets are the queued state.
Configuring this setting is recommended for optimized use of your system and
network resources. The settings apply to all Kubernetes backups for the selected
primary server.
To set the resource limit
1 On the left, Workloads > Kubernetes.
2 On top right, click Kubernetes settings > Resource limits.
3 Do any of the following to set the resource limits:
■ Click Edit, next to Backup jobs per Kubernetes cluster. By default, the
limit is 1.
By default, the resource limit is 1 for the Backup jobs per cluster.
■ Click Edit, next to Backup from Snapshot Jobs per Kubernetes Cluster.
By default, the resource limit is 4 for the Backup from Snapshot jobs per
cluster.
Note: In the NetBackup 10.0 release, the data mover pods exceed the Kubernetes
resource limit settings.
For more details, See “Datamover pods exceed the Kubernetes resource limit ”
on page 75.
Managing Kubernetes assets 49
Add protection to the assets
Configuring permissions
Using manage permissions, you can assign different access privileges to the user
roles. For more information see the Managing role-based access control chapter
in the NetBackup Web UI Administrator's Guide.
The Namespaces tab displays with all the discovered and imported Kubernetes
assets that NetBackup can protect. This tab displays the following information:
■ Namespaces: Display name of the asset.
■ Cluster: The cluster to which the asset belongs.
■ Protected by: Name of the protection plan applied to the asset.
■ Last successful backup: Date and time of the last successful backup of the
asset.
You can perform the following action in the Namespaces tab.
To add protection to an unprotected asset
1 On the left, click Workloads > Kubernetes.
2 Select the option in the rows of the assets. Click Add protection on top right.
Alternatively, click the Actions menu in the row of the asset and click Add
protection.
3 Select a protection plan from the list and click Next. In the next page, click
Protect.
To quickly back up an asset
1 Select the option in the rows of the assets, click Backup now on top right.
Alternatively, click the Actions menu in the row of the asset and click Backup
now.
2 In the next page,
■ If you backup an already protected asset, select a protection plan from the
list of plans to which the asset is already subscribed, and click Start backup.
■ If you are backing up an unprotected asset, select a protection plan from
the available plans for the asset, click Start backup.
Chapter 5
Managing Kubernetes
intelligent groups
This chapter includes the following topics:
Note: You can create, update, or delete the intelligent groups only if your role has
the necessary RBAC permissions for the assets that you require to manage. The
NetBackup security administrator can grant you access for an asset type (clusters,
namespaces, and VMGroup). Refer to the NetBackup Web UI Administrator's Guide.
Managing Kubernetes intelligent groups 52
Create an intelligent group
Note: Intelligent group can be created across multiple clusters. Ensure that
you have the required permissions to add clusters in the group. To view and
manage the group, the group administrator must have the view and manage
permission for the selected clusters and groups.
7 To add a condition, use the drop-downs to select a keyword and operator and
then enter a value.
To change the effect of the query, click + Condition and click AND or OR,
then select the keyword, operator, and value for the condition.
Note: To add label conditions, click Add label condition enter the label key
and value.
Note: You can choose to have only a label key in the condition without the
label value. As value is optional parameter to add a label condition.
Note: To add sub-query, click Add sub-query. You can add multiple level
sub-queries.
Managing Kubernetes intelligent groups 53
Create an intelligent group
Note: When using queries in Intelligent groups, the NetBackup web UI might
not display an accurate list of assets that match the query if the query condition
has non-English characters.
Using the not equals filter condition on any attribute returns assets including
those that have no value (null) present for the attribute.
Note: When you click Preview or you save the group, the query options are
treated as case-sensitive when the assets are selected for the group.
■ Configure backups
Note: The RBAC role that is assigned to you must give you access to the intelligent
groups that you want to manage and to the protection plans that you want to use.
Protecting Kubernetes assets 56
Remove protection from an intelligent group
Note: You must select the Create backup from snapshot option to enable
the replicate and duplicate options for backup copy.
■ If you do not select Create backup from snapshot option, then by default,
Snapshot only storage backup will get configured to run the backup jobs.
■ SelectCreate a replica copy (Auto Image Replication) of the backup
from snapshot option to create a replica copy of the backup.
■ Select Create a duplicate copy of the backup from snapshot option to
create a duplicate copy of the backup.
6 Continue creating the schedule in the Start window tab, as described in the
Managing protection plans section of the NetBackup Web UI Administrator's
Guide
7 Continue to configure the Storage options for backup from snapshot, as
described in the Managing protection plans section of the NetBackup Web UI
Administrator's Guide
■ Select Exclude the following resource kinds from the backup option to
exclude the resource kinds from the backup job. Click Select to choose the
resource kinds from the static list. The selected resource kinds are displayed
in the text field or you can manually enter the custom resource definition
(CRD) with correct format (type.group). You can delete the selected resource
kinds from the exclude list.
In case, the custom resource kind definitions are not present in the static
list then you can enter custom resource definition (CRD) manually. For
example: demo.nbu.com.
Note: Exclude list of resource kinds takes precedence in terms of mapping the
resources over the labels selected for backup.
2 Under the Labels selection section, click Add to add the labels to map its
associated resources for the backup, enter the label prefix and key, and then
select a operator. All associated resources of the included labels are mapped
for the backup job.
Following are the four operators which you can add to a label:
■ Enter a label key equal to a value.
■ Enter a label key which already exists, without any values.
■ Enter a label key which is in a set of values.
■ Enter a label key not in a set of values.
You can add multiple values for in/not in operators in the set of values with
comma separated.
Note: Selected labels must be present at the time of backup to ensure that the
conditions are applied successfully.
Note: Label selection must only be exclusive of selecting any resource kind
which doesn't contradict between multiple label conditions.
Review page displays the excluded list of resource kinds and the selected labels
for inclusions, and the selected storage units selected.
Note: You can edit or delete the protection plan created for Kubernetes workloads.
You cannot customize the protection plan created for Kubernetes workloads.
Protecting Kubernetes assets 59
Configure backups
Configure backups
NetBackup allows you to run two types of backup jobs in Kubernetes workload:
Snapshots only and Backup from Snapshot. Follow the steps to configure a backup
job for Kubernetes operator.
To perform backup on Kubernetes workload
1 On the left, click Protection > Protection plans and then click Add.
2 In Basic properties, enter a Name, Description, and select Kubernetes,
from the Workload drop-down list.
3 Click Next. In Schedules, click Add schedule.
In the Add backup schedule tab, you can configure the options for retaining
the backup and the snapshot.
4 From the Recurrence drop-down, specify the frequency of the backup.
5 In the Snapshot and backup copy options, do any of the following:
■ Select Create backup from snapshot option, to configure backup from
snapshot for the protection plan. Specify retention period for the backup
from snapshot using the Keep backup for drop-down.
Note: You must select the Create backup from snapshot option to enable
the replicate and duplicate options for backup copy.
■ If you do not select Create backup from snapshot option, then by default,
Snapshot only storage backup is configured to run the backup jobs.
■ SelectCreate a replica copy (Auto Image Replication) of the backup
from snapshot option to create a replica copy of the backup.
■ Select Create a duplicate copy of the backup from snapshot option to
create a duplicate copy of the backup.
Protecting Kubernetes assets 60
Configure Auto Image Replication (AIR) and duplication
6 Continue creating the schedule in the Start window tab, as described in the
Managing protection plans section of the NetBackup Web UI Administrator's
Guide
7 Continue to configure the Storage options for backup from snapshot, as
described in the Managing protection plans section of the NetBackup Web UI
Administrator's Guide
■ While selecting a storage for Backup from Snapshot option, the selected
storage unit must have the media servers of NetBackup version 10.0 or
later.
■ Media server managing the storage must have access to the selected
Kubernetes clusters.
■ Media server must be able to connect with the API server. The port
corresponding to the API server must be open for the outbound connection
from the media server. The datamover pod must be able to connect to the
media server.
Note: Kubernetes AIR configuration requires NetBackup primary and media servers
of version 10.0.1 or later.
■ Establish the trust relationship between two primary servers for interdomain
operations.
■ Log onto the source primary server, on the left, click Hosts > Host
properties to build a connection between a source and target primary
server.
■ Select a source primary server from the Hosts tab, and then click
Connect.
■ Click Edit primary server > Servers > Trusted primary servers >
Add to add a source server.
■ Click Validate Certificate Authority button, and then click Next to
proceed with the certificate authority validation.
■ There are two options to create trusted primary servers, do any of
the following:
■ Select Specify authentication token of the trusted primary
server to add an existing token or create a new token for the
source primary server.
■ Select Specify credentials of the trusted primary server to
add user credentials for the source primary server.
■ Click Add.
■ In the New operations > Properties > Operation, select the Import option
from the list.
■ In the Destination storage attributes > Destination storage select a
MSDP storage unit from the list.
■ Click Create.
4 Create Kubernetes protection plan with Create backup from snapshot option
to enable the replicate copy option.
On the left, click Kubernetes workloads > Protection plan > Schedules >
Add backup schedule
5 In the Snapshot and backup copy optionssection, select Create backup
from snapshot option to enable the replicate and duplicate copy options.
6 Select Create a replica copy (Auto Image Replication) of the backup from
snapshot option, and set a time duration to retain the replica copy.
Note: Auto Image Replication can only be created on the trusted NetBackup
primary servers.
7 Select Create a duplicate copy of the backup from snapshot option and
set a time duration to retain the duplicate copy.
8 Click Add.
9 Continue creating the schedule in the Start window tab, as described in
theManaging protection plans section of the NetBackup Web UI Administrator’s
Guide.
10 Click Next.
11 In the Storage options tab, select the storage units to backup from snapshot,
replicate or duplicate copy.
Note: For Backup from snapshot and duplication, you can add simple storage
units. But for replication, you must add a trusted storage unit with a import
storage lifecycle policies (SLPs).
12 On the right of the selected backup options, click Edit to modify selected the
storage units for backup.
■ For replica copy option, select replication target dialog, select the primary
server for replication copy, click Next.
Protecting Kubernetes assets 63
Configure storage units
Note: All storage types supported in Storage Lifecycle Policy (SLP) are supported
for backup jobs.
■ Media server must be able to connect with the API server. The port
corresponding to the API server must be open for the outbound connection
from the media server. The datamover pod must be able to connect to the
media server.
10 Review the setup of the storage unit and then click Save.
Chapter 7
Recovering Kubernetes
assets
This chapter includes the following topics:
Note: After recovery, the newly created namespaces, persistent volumes, and other
resources get new system-generated UIDs.
3 The Recovery points tab shows you all the recovery points with the date,
time, and copies of the backup. You can set filters to filter the displayed recovery
points. Click the date in the Date column, to view the details of the recovery
point. The Recovery points details dialog shows the resources that were
backed up, like configmaps, secrets, persistent volumes, pod, and so on. For
details about these resources, see
https://kubernetes.io/docs/reference/kubernetes-api/
Note: On the NetBackup web UI, a new column Copies is added, under
Recovery points tab of Kubernetes asset. This column displays the total
number of copies.
Note: By default, for a newly installed NetBackup version 10.0, the Copies
column is visible to you.
If NetBackup primary server is upgraded from version 9.1 to 10.0, and if you
are an existing user who have already visited the Recovery points tab, then
the Copies column is not visible to you.
Note: You can enable the visibility of Copies column using Show or hide
columns option available on Recovery points page.
4 Click Copies, click the ellipsis menu (three dots), in the row of the recovery
point that have the Snapshot type and a complete copy to restore.
5 In the Recovery target page, target cluster is auto populated.
7 Under Select resource types to recover, select any of the following resource
types to restore:
■ All resource types to recover all resource types. By default, this option is
selected.
Recovering Kubernetes assets 68
Restore from snapshot
Note: Select resource types to recover option is for advance users. If you
are not careful in selecting the resources that you want to restore, you may
not get a fully functional namespace after restoring.
8 Under Select Persistent volume claims to recover, select any of the following
persistent volume claims to recover:
■ All Persistent volume claims to recover all persistent volume claims. By
default, this option is selected.
■ Recover selected Persistent volume claims to recover selected persistent
volume claims.
Note: If you do not select any option in Recover selected resource types,
then include empty persistent volume claims option is selected and no persistent
volume claims is restored.
If you do not select any options in the Recover selected persistent volume
claims, and click Next, then in the Recovery options section, it includes empty
persistent volume claims and no persistent volume claims is restored.
9 Click on the Failure strategy section, to view the failure strategy options to
recover.
10 Under Select failure strategy to recover, select any of the following failure
strategies to recover:
■ Retry to specify a retry count for metadata or PVC restore If restore fails
even after retries then restore job terminates.
11 Click Next.
12 In Recovery options page, click Start recovery to submit the recovery entry.
13 In the Activity monitor tab, click the Job ID, to view the restore job details.
Note: NetBackup Kubernetes restore uses single job to restore all the persistent
volume claims and a namespace. You can view logs on the Activity monitor to
track which persistent volume, persistent volume claims or metadata is being
restored.
3 The Recovery pointstab shows you all the recovery points with the date, time,
and copies of the backup. You can set filters to filter the displayed recovery
points. Click the date in the Date column, to view the details of the recovery
point. The Recovery points details dialog shows the resources that were
backed up, like ConfigMaps, secrets, persistent volumes, pod, and so on. For
details about these resources, see https://kubernetes.io/docs/reference
Note: On the NetBackup web UI, a new column Copies is added, under
Recovery points tab of Kubernetes asset. This column displays the total
number of copies.
Note: By default, if you have newly installed NetBackup version 10.0, the
Copies column is visible to you.
But, if the NetBackup primary server is upgraded from version 9.1 to 10.0, and
if you are an existing user who has already visited the Recovery points tab,
then the Copies column is not visible to you.
Note: You can enable the visibility of Copies column using Show or hide
columns option available on the Recovery points page.
4 Click Copies, click the ellipsis menu (three dots), in the row of the recovery
point that have the Backup type and a complete copy to restore.
5 In the Recovery target page, to recover the asset to the same cluster source
are auto populated. Click Next
6 Under Specify destination namespace, select any of the following options
to restore:
■ Use original namespace to use original namespace. By default, this option
is selected.
■ Use alternate namespace and enter the alternate namespace and then,
click Next.
7 Under Select resource types to recover, select any of the following resource
types to restore:
■ All resource types to recover all resource types. By default, this option is
selected.
■ Recover selected resource types to recover only the selected resource
types.
Recovering Kubernetes assets 71
Restore from backup copy
8 Under Select Persistent volume claims to recover, select any of the following
persistent volume claims to recover:
■ All Persistent volume claims to recover all persistent volume claims. By
default, this option is selected.
■ Recover selected Persistent volume claims to recover selected persistent
volume claims.
Note: If you do not select any option in Recover selected resource types,
then include empty persistent volume claims option is selected and no persistent
volume claims is restored.
If you do not select any options in the Recover selected persistent volume
claims, and click Next, then in the Recovery options section, it includes empty
persistent volume claims and no persistent volume claims is restored.
9 Click on the Failure strategy section, to view the failure strategy options to
recover.
10 Under Select failure strategy to recover, select any of the following failure
strategies to recover:
■ Click Next
Recovering Kubernetes assets 72
Restore from backup copy
Note: NetBackup Kubernetes restore uses single job to restore all the persistent
volume claims and a namespace. You can view logs in the Activity monitor to
track which persistent volume, persistent volume claims, or metadata is being
restored.
Note: NetBackup version 10.0 do not support the restore job cancellation.
Note: NetBackup version 10.0 onwards support an alternate cluster restore only
for Restore from backup copy job. In some cases, restore to alternate cluster
might fail partially due to different object versions on the cluster.
Chapter 8
Troubleshooting
Kubernetes issues
This chapter includes the following topics:
■ Custom Kubernetes role created for specific clusters cannot view the jobs
Resource limit for Backup from Snapshot jobs per Kubernetes cluster is set to 1.
Job IDs 3020 and 3021 are the parent jobs for Backup from snapshot. The creation
of the data mover pod and its cleanup process are part of the backup job life cycle.
Job ID 3022 is the child job, where the data movement takes place from the cluster
to the storage unit.
Based on the resource limit setting, while job ID 3022 is in the running state, job ID
3021 will continue to be in queued state. Once, the backup job ID 3022 is completed,
then the parent Job ID 3021 will start.
Notice that the job ID 3020 is still in progress, since we are in process to clean up
the data mover pod and complete the life cycle of the parent job ID 3020.
Scenario no 2
Troubleshooting Kubernetes issues 77
Error during restore: Job fails on the highly loaded cluster
At this stage, we may encounter that there are 2 data mover pods running
simultaneously in the NetBackup Kubernetes operator deployment namespace.
Because the data mover pod created as part of job ID 3020 is still not cleaned up,
but we started with creation of data mover pod for job 3021.
In a busy environment, where multiple Backup from Snapshot jobs are triggered,
a low resource limit value setting may lead to backup jobs spending most of the
time in the queued state.
But if we have a higher resource limit setting, we may observe that the data mover
pods might exceed the count specified in the resource limit. This may lead to
resource starvation in the Kubernetes cluster.
While the data movement job like 3022 runs in parallel, cleanup activities are handled
sequentially. This when combined with the time it takes to cleanup the datamover
resource, if closer to the time it takes to backup the pvc/namespace data leads to
longer delay in the completion of the jobs.
If the combined time duration for data movement and clean up resources is like the
backup job. Then, the backup job of persistent volume or namespace data may
lead to delay in the job completion.
Recommended action: Ensure to review your system resources and performance,
to set the resource limit value accordingly. This measure will help you achieve the
best performance for all backup jobs.
Note: For such applications, the PVCs, are auto-provisioned as per the deployment
configurations even if a user does not select them for restore.