NBUKOPS (NetBackup K8S Operators) Installation Steps
# Agenda:
- COMMAND TO UNINSTALL EXISTING NBUKOPS
- Installation Steps:
- STEP-1: Get Packages
- STEP-2: Extract Package & create NS for nbukops installation.
- STEP-3: Create a secret under the above ns. This secret would be used for pulling Docker Images.
- STEP-4: Load DM image to local cache & upload it to repo.
- STEP-5: Update values.yaml file.
- STEP-6: Create NetBackup API KEY
- STEP-7: Create a secret in k8s namespace
- STEP-8: Run helm install
- STEP-9: Check status of Deployment
- STEP-10: Trigger Reinstall (Optional - For failed case)
- Validate Installation
# COMMAND TO UNINSTALL EXISTING NBUKOPS:
---
helm uninstall veritas-netbackupkops -n <ns>
k delete ns <ns>
E.g:
helm uninstall veritas-netbackupkops -n shakti-nbukops-ns
k delete ns shakti-nbukops-ns
1) STEP-1: Get Packages.
---
Download following two packages from support.veritas.com
➢ NetBackup Kubernetes operator package (netbackupkops-10.3.1.tar.gz).
➢ NetBackup Data mover image (veritasnetbackup-datamover-10.3.1.tar).
2) STEP-2: Extract Package & create NS for nbukops installation.
---
1) tar -xf netbackupkops-10.3.1.tar.gz -C /root/nbkops
2) kubectl create ns <ns>
E.G: kubectl create ns shakti-nbukops-ns
namespace/shakti-nbukops-ns created
3) STEP-3: Create a secret under the above ns. This secret would be used for pulling Docker Images.
---
1) First Login to all docker repos:
docker login -u <user_name> <repo>
eg :
docker login -u <> <repo_where_above_images_would_be_placed>
2) CMD to create netbackupkops-docker-cred:
Traverse to /root before executing below command.
Run CMD: kubectl create secret generic netbackupkops-docker-cred --from-file=.dockerconfigjson=
NOTE: The name of the secret should be netbackupkops-docker-cred
3) CMD to validate: kubectl get secrets -n <ns>
4) STEP-4: Load DM image to local cache & upload it to nbartifactory repo.
---
1) docker load -i veritasnetbackup-datamover-10.
2) docker tag veritasnetbackup/datamover:10.
3) docker push k8s-nb-support.sbs.com/datamover:10.3.1_0004
5) STEP-5: Update values.yaml file.
---
Location: /root/nbkops/netbackupkops-
Sample file: values.yaml
Change image, nbsha256fingerprint, datamoverimage
6) STEP-6: Create NBU API KEY
---
Go to NetBackup Primary Server WEBUI -> USER -> ADD API KEY
E.G: A34f09vl6iiHfXQqLZIBUWP84bo1CA
7) STEP-7: Create a secret in k8s namespace
---
NOTE-1: Update apikey in below yaml with the API key you got in previous step.
NOTE-2: The name of the Secret should be <ns>-nb-config-deploy-secret E.g: shakti-nbukops-ns-nb-config-
deply-secret.yaml:
apiVersion: v1
kind: Secret
metadata:
name: shakti-nbukops-ns-nb-config-
namespace: shakti-nbukops-ns
type: Opaque
stringData:
apikey: AzXFQtsYYXW0Ks2zx1KLQJ-d6Ww_
# RUN: kubectl create -f ./deply-secret.yaml
8) STEP-8: Run helm install
---
E.g: helm install veritas-netbackupkops /root/NBKOPS_10.3.1_004/
NOTE 1 - The storage class must have default tag otherwise pods will not be running successfully.
Command to set storage class as default -
oc patch storageclass ocs-storagecluster-cephfs -p '{"metadata": {"annotations": {"storageclass.kubernetes.io/
[root@r7515-117-vm18 nbkops]# oc get sc
NAME PROVISIONER RECLAIMPOLICY VOLUMEBINDINGMODE ALLOWVOLUMEEXPANSION AGE
localblock kubernetes.io/no-provisioner
ocs-storagecluster-ceph-rbd openshift-storage.rbd.csi.
ocs-storagecluster-ceph-rgw openshift-storage.ceph.rook.
ocs-storagecluster-cephfs (
openshift-storage.noobaa.io openshift-storage.noobaa.io/
NOTE 2 - If you are installing two nbkops in a single cluster which will talk to 2 different primary, you may get below error.
[root@sbs]# helm install veritas-netbackupkops /root/netbackupkops-
WARNING: Kubernetes configuration file is group-readable. This is insecure. Location: /etc/kubernetes/admin.conf
WARNING: Kubernetes configuration file is world-readable. This is insecure. Location: /etc/kubernetes/admin.conf
Error: INSTALLATION FAILED: rendered manifests contain a resource that already exists. Unable to continue with install: CustomResourceDefinition "backups.netbackup.veritas.com
Solution - Open deployment file for current installation: <base_path>/netbackupkops-
With most of the content will get deleted.
Then try again.
[CMD]: helm install veritas-netbackupkops /root/NBKOPS_10.3.1_004/
9) STEP-9: Check status of Deployment
---
k get pods -n <ns>
10) STEP-10: Trigger Reinstall (Optional - For failed case)
---
+ Please ensure this secret is created in the next 10 minutes after running helm install.
+ If you fail to create secret set the replica count to zero for deployment <kops-namespace>-netbackup-
kubectl scale --replicas=1 deployment <kops-namespace>-netbackup-
E.g: kubectl scale --replicas=1 deployment shakti-nbukops-ns-netbackup-
## helm install veritas-netbackupkops /root/nbkops/netbackupkops-
# Validate Installation -
1)
k get all -n shakti-nbukops-ns
NAME READY STATUS RESTARTS AGE
pod/shakti-nbukops-ns-
pod/shakti-nbukops-ns-
pod/shakti-pod-3 0/1 CrashLoopBackOff 1109 (36s ago) 3d22h
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
service/shakti-nbukops-ns-
NAME READY UP-TO-DATE AVAILABLE AGE
deployment.apps/shakti-
deployment.apps/shakti-
NAME DESIRED CURRENT READY AGE
replicaset.apps/shakti-
replicaset.apps/shakti-
2) k describe <controller manager name as per above output> -n shakti-nbukops-ns
3) K logs shakti-nbukops-ns-netbackup-
4) Run Backup and restore of K8S namespace.
Comments
Post a Comment