Velero - Backup & Restore Kubernetes Cluster (Application with Persistent Volume )

preview_player
Показать описание
Velero (formerly Heptio Ark) gives you tools to back up and restore your Kubernetes cluster resources and persistent volumes. You can run Velero with a cloud provider or on-premises. Velero lets you:

Take backups of your cluster and restore in case of loss.
Migrate cluster resources to other clusters.
Replicate your production cluster to development and testing clusters.
Velero consists of:

A server that runs on your cluster
A command-line client that runs locally

Рекомендации по теме
Комментарии
Автор

Thanks Rohtash to share this demo. this will help for me to namespace backup.

ramveergupta
Автор

thanks for your nice video but do I need to install miniO in the same k8s machine? or I can install that in a separate server for storage only?

subhankarb
Автор

Thanks Rohtash for the video. I have an issue, this my case MIGRATION K8s cluster GCP to AKS, I used velero, It does a backup and restore from gcp to AKS .. but data from the disk missed .. Is there a way to retreive data stored on the cloud provider's managed disk from gcp to azure disk ?

roodolphekueteagbassah
Автор

Thanks for the video..Can you post the velero video for AKS clsuter where the storage will be Azure blob storage instead of minio? . Thanks in advance

dhirajraj
Автор

Thanks for the video!
Can you please put the commands you executed?
Did you try to actually install Velero inside a kubernetes Cluster? Can you make a video for that?
Thanks!

Martin-pdmc
Автор

I tried this but my server nodeport have issue. When I try to access minio the port no change itself to console port. In log I can see console have different port no than nodeport service . Any advice please

tauqeerahmad
Автор

I did not find this command
Please paste it here

taimurmalik
Автор

#### Dow#### Download The Release





Change NodePort for S3 Compatible local Storage



clusterIP replaced by NodePort


kubectl apply -f 00-minio-deployment.yaml


Credential File for minio setup
vim credentials-velero
[default]
aws_access_key_id = minio
aws_secret_access_key = minio123
kubectl get svc -n velero


velero Install
./velero install \
--provider aws \
--plugins \
--bucket velero \
--secret-file ./credentials-velero \
--use-volume-snapshots=false \


Veryfy the Installation
kubectl get deployments -l component=velero --namespace=velero
Create your App with PV


PVC
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: local-path-pvc
namespace: nginx
spec:
accessModes:
- ReadWriteOnce
storageClassName: hostpath ### Depend upon your SC
resources:
requests:
storage: 5Mi



apiVersion: v1
kind: Pod
metadata:
name: volume-test
namespace: nginx
spec:
containers:
- name: volume-test
image: nginx:stable-alpine
imagePullPolicy: IfNotPresent
volumeMounts:
- name: volv
mountPath: /data
ports:
- containerPort: 80
volumes:
- name: volv
persistentVolumeClaim:
claimName: local-path-pvc





./velero backup create nginx --include-namespaces nginx --wait


./velero backup logs nginx







./velero restore create --from-backup nginx

kubectl get pod -n ngix
kubectl get pod -n nginx
nload The Release





Change NodePort for S3 Compatible local Storage



clusterIP replaced by NodePort


kubectl apply -f 00-minio-deployment.yaml


Credential File for minio setup
vim credentials-velero
[default]
aws_access_key_id = minio
aws_secret_access_key = minio123
kubectl get svc -n velero


velero Install
./velero install \
--provider aws \
--plugins \
--bucket velero \
--secret-file ./credentials-velero \
--use-volume-snapshots=false \


Veryfy the Installation
kubectl get deployments -l component=velero --namespace=velero
Create your App with PV


PVC
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: local-path-pvc
namespace: nginx
spec:
accessModes:
- ReadWriteOnce
storageClassName: hostpath ### Depend upon your SC
resources:
requests:
storage: 5Mi



apiVersion: v1
kind: Pod
metadata:
name: volume-test
namespace: nginx
spec:
containers:
- name: volume-test
image: nginx:stable-alpine
imagePullPolicy: IfNotPresent
volumeMounts:
- name: volv
mountPath: /data
ports:
- containerPort: 80
volumes:
- name: volv
persistentVolumeClaim:
claimName: local-path-pvc





./velero backup create nginx --include-namespaces nginx --wait


./velero backup logs nginx







./velero restore create --from-backup nginx

kubectl get pod -n ngix
kubectl get pod -n nginx

wemake