SlideShare a Scribd company logo
Velero Search &
Practice
Overview
Velero 1.6
● Introduction
● Install
● Use
● Practice
● QA
Introduction
Introduction
Velero is an open source tool to safely backup and restore,
perform disaster recovery, and migrate Kubernetes cluster
resources and persistent volumes
Aiming to help with:
● Disaster Recovery: Recover from an issue
● Data Migration: Migrate apps between clusters
● Data Protection: Scheduled Actions
Etcd backup vs. Velero bacup
● Etcd's backup/restore tooling is
good for recovering from data
loss in a single etcd cluster
● you don't have access to etcd
(e.g. you're running on GKE)
● backing up both Kubernetes
resources and persistent
volume state
● cluster migrations
● backing up a subset of your
Kubernetes resources
● backing up Kubernetes
resources that are stored
across multiple etcd clusters
(for example if you run a
custom apiserver)
Velero CRD
● backups.velero.io
● backupstoragelocations.velero.io
● deletebackuprequests.velero.io
● downloadrequests.velero.io
● podvolumebackups.velero.io
● podvolumerestores.velero.io
● resticrepositories.velero.io
● restores.velero.io
● schedules.velero.io
● serverstatusrequests.velero.io
● volumesnapshotlocations.velero.io
Backup workflow
● On-demand
● Scheduled
Backup Storage Locations and
Volume Snapshot Locations
● BackupStorageLocation (Velero backups)
○ Bucket (Object Store)
○ K8s resources
○ One or more
● VolumeSnapshotLocation (associated persistent)
○ defined entirely by provider-specific fields (AWS region, Azure
resource group, Portworx snapshot type, etc.
○ One or more
Backup Storage Locations and
Volume Snapshot Locations Conts.
● Single Velero backup snapshots
○ Multiple Persistent Volume (both EBS volumes and Portworx
volumes)
● Multiple Velero backups to different Buckets
○ eastern USA region
○ western USA region
○ or to a different storage provider
● volume providers that support (Portworx)
○ you can have some snapshots stored locally on the cluster and have
others stored in the cloud
Backup Storage Locations and
Volume Snapshot Locations Conts.
● It is not possible (yet) to send a single Velero backup to
multiple backup storage locations simultaneously
● Cross-provider snapshots are not supported
● Other Limitations / Caveats
Install
Install
● Client (CLI)
● Server
○ Plugins
○ Enable restic integration --use-restic
○ Default Pod Volume backup to restic
--default-volumes-to-restic
○ Customize resource requests and limits
○ Configure more than one storage location for backups or volume
snapshots
○ Install an additional volume snapshot provider
Providers
● Velero supported providers
● Community supported providers
● S3-Compatible object store providers
● Non-supported volume snapshots
Providers - Velero supported providers
Providers - Community supported providers
Providers - S3-Compatible object store
providers
● IBM Cloud
● Oracle Cloud
● Minio
● DigitalOcean
● NooBaa
● Tencent Cloud
● Ceph RADOS v12.2.7
● Quobyte
● Cloudian HyperStore
Providers - Non-supported volume snapshots
In the case you want to take volume snapshots but didn’t find a plugin for your
provider, Velero has support for snapshotting using restic. Please see the restic
integration documentation.
Set up server
velero install 
--provider aws 
--plugins velero/velero-plugin-for-aws:v1.0.0 
--bucket velero 
--secret-file ./credentials-velero-minio 
--use-volume-snapshots=true 
--backup-location-config region=default,s3ForcePathStyle="true",s3Url=http://minio.infra.svc.cluster.local:9000 
--snapshot-location-config region="default" 
--use-restic 
--wait
velero install 
--provider gcp 
--plugins velero/velero-plugin-for-gcp:v1.2.0 
--bucket velero 
--secret-file ./credentials-velero-minio 
--use-volume-snapshots=true 
--backup-location-config region=default,s3ForcePathStyle="true",s3Url=http://minio.infra.svc.cluster.local:9000 
--snapshot-location-config region="default" 
--use-restic 
--wait
Set up server - helm
helm install velero vmware-tanzu/velero 
--namespace velero 
--create-namespace 
-f velero-values.yaml
configuration:
provider: aws
backupStorageLocation:
bucket: velero
config:
region: default
s3ForcePathStyle: true
publicUrl: http://172.18.0.155:9000
s3Url: http://minio.minio.svc.cluster.local:9000
volumeSnapshotLocation:
config:
region: default
credentials:
useSecret: true
secretContents:
cloud: |
[default]
aws_access_key_id = minio
aws_secret_access_key = minio123
….
initContainers:
- name: velero-plugin-for-aws
image: velero/velero-plugin-for-aws:v1.1.0
imagePullPolicy: IfNotPresent
volumeMounts:
- mountPath: /target
name: plugins
Use
Disaster recovery
The default backup retention period, expressed as TTL (time to live), is
30 days (720 hours). --ttl <DURATION> flag to change this as
necessary
velero schedule create <SCHEDULE NAME> --schedule "0 7 * * *"
Resource filtering (Support
Backup and Restore)
● Includes
○ –include-namespaces
○ –include-resources
○ –include-cluster-resources
○ –selector
● Excludes
○ –exclude-namespaces
○ –exclude-resources
○ velero.io/exclude-from-backup=true
Backup Hooks (Pre/Post)
● pre(post).hook.backup.velero.io/container
○ The container where the command should be executed. Defaults to the first container in the pod.
Optional.
● pre(post).hook.backup.velero.io/command
○ The command to execute. If you need multiple arguments, specify the command as a JSON array, such as
["/usr/bin/uname", "-a"]
● pre(post).hook.backup.velero.io/on-error
○ What to do if the command returns a non-zero exit code. Defaults to Fail. Valid values are Fail and
Continue. Optional.
● pre(post).hook.backup.velero.io/timeout
○ How long to wait for the command to execute. The hook is considered in error if the command exceeds
the timeout. Defaults to 30s. Optional.
Velero backup create
# Create a backup containing all resources.
velero backup create backup1
# Create a backup including only the nginx namespace.
velero backup create nginx-backup --include-namespaces nginx
# Create a backup excluding the velero and default namespaces.
velero backup create backup2 --exclude-namespaces velero,default
# Create a backup based on a schedule named daily-backup.
velero backup create --from-schedule daily-backup
# View the YAML for a backup that doesn't snapshot volumes, without sending it to the server.
velero backup create backup3 --snapshot-volumes=false -o yaml
# Wait for a backup to complete before returning from the command.
velero backup create backup4 --wait
Restore Hooks
● InitContainer Restore Hooks
○ init.hook.restore.velero.io/container-image
○ init.hook.restore.velero.io/container-name
○ init.hook.restore.velero.io/command
● Exec Restore Hooks
○ post.hook.restore.velero.io/container
○ post.hook.restore.velero.io/command
○ post.hook.restore.velero.io/on-error
○ post.hook.restore.velero.io/exec-timeout
○ post.hook.restore.velero.io/wait-timeout
Practice
Backup from KIND and Restore to KIND
Backup from GKE and Restore to GKE
Migrate KIND to GKE
Q&A

More Related Content

PDF
SSL/TLS Handshake
PPTX
Diabetes Mellitus
PPTX
Hypertension
PPTX
Republic Act No. 11313 Safe Spaces Act (Bawal Bastos Law).pptx
PPTX
Power Point Presentation on Artificial Intelligence
PDF
Caça palavras - Bullying
PPTX
SSL/TLS Handshake
Diabetes Mellitus
Hypertension
Republic Act No. 11313 Safe Spaces Act (Bawal Bastos Law).pptx
Power Point Presentation on Artificial Intelligence
Caça palavras - Bullying

What's hot (20)

PDF
Velero & Beyond: Backup & Restore for Kubernetes Applications (Cloud Native S...
PPTX
Kubernetes Disaster Recovery - Los Angeles K8s meetup Dec 10 2019
PDF
Multi-cloud Kubernetes BCDR with Velero
PPTX
Effective terraform
PPTX
Navigating Disaster Recovery in Kubernetes and CNCF Crossplane
PDF
Kubernetes GitOps featuring GitHub, Kustomize and ArgoCD
PPTX
Helm.pptx
PDF
Getting Started with Kubernetes
PDF
Introduction to Docker Compose
PDF
AKS backup with Velero and Workload Identities
PPTX
Docker 101 : Introduction to Docker and Containers
PPTX
Docker Networking Overview
PDF
Introduction to Kubernetes and Google Container Engine (GKE)
PDF
Introduction to Google Compute Engine
ODP
Introduction to Ansible
PDF
Gitlab, GitOps & ArgoCD
PDF
NGINX: Basics and Best Practices EMEA
PPTX
Deploying Azure DevOps using Terraform
PPTX
Getting started with Docker
PPTX
Introduction to kubernetes
Velero & Beyond: Backup & Restore for Kubernetes Applications (Cloud Native S...
Kubernetes Disaster Recovery - Los Angeles K8s meetup Dec 10 2019
Multi-cloud Kubernetes BCDR with Velero
Effective terraform
Navigating Disaster Recovery in Kubernetes and CNCF Crossplane
Kubernetes GitOps featuring GitHub, Kustomize and ArgoCD
Helm.pptx
Getting Started with Kubernetes
Introduction to Docker Compose
AKS backup with Velero and Workload Identities
Docker 101 : Introduction to Docker and Containers
Docker Networking Overview
Introduction to Kubernetes and Google Container Engine (GKE)
Introduction to Google Compute Engine
Introduction to Ansible
Gitlab, GitOps & ArgoCD
NGINX: Basics and Best Practices EMEA
Deploying Azure DevOps using Terraform
Getting started with Docker
Introduction to kubernetes
Ad

Similar to Velero search &amp; practice 20210609 (20)

PDF
Where is my cache architectural patterns for caching microservices by example
PDF
Deep dive into OpenStack storage, Sean Cohen, Red Hat
PDF
Deep Dive into Openstack Storage, Sean Cohen, Red Hat
PPTX
Introduction to Container Storage Interface (CSI)
PDF
Best Practices for Developing & Deploying Java Applications with Docker
PPTX
Introduction to containers
PPTX
Kubernetes #4 volume &amp; stateful set
PDF
Crikeycon 2019 Velociraptor Workshop
PPTX
Troubleshooting containerized triple o deployment
PDF
Autopilot : Securing Cloud Native Storage
PDF
Backing up Wikipedia Databases
PDF
Introduction to Docker storage, volume and image
PDF
Magento Docker Setup.pdf
PDF
Introduction to Docker and Monitoring with InfluxData
PDF
The Future of Security and Productivity in Our Newly Remote World
PDF
GeoServer Developers Workshop
PDF
Containarized Gluster Storage in Kubernetes
PDF
Persistent Storage in Docker Platform
PPTX
OpenStack Cinder
PPTX
Introduction to rook
Where is my cache architectural patterns for caching microservices by example
Deep dive into OpenStack storage, Sean Cohen, Red Hat
Deep Dive into Openstack Storage, Sean Cohen, Red Hat
Introduction to Container Storage Interface (CSI)
Best Practices for Developing & Deploying Java Applications with Docker
Introduction to containers
Kubernetes #4 volume &amp; stateful set
Crikeycon 2019 Velociraptor Workshop
Troubleshooting containerized triple o deployment
Autopilot : Securing Cloud Native Storage
Backing up Wikipedia Databases
Introduction to Docker storage, volume and image
Magento Docker Setup.pdf
Introduction to Docker and Monitoring with InfluxData
The Future of Security and Productivity in Our Newly Remote World
GeoServer Developers Workshop
Containarized Gluster Storage in Kubernetes
Persistent Storage in Docker Platform
OpenStack Cinder
Introduction to rook
Ad

More from KAI CHU CHUNG (20)

PDF
Devfest 2023 - Service Weaver Introduction - Taipei.pdf
PDF
DevFest 2022 - Skaffold 2 Deep Dive Taipei.pdf
PDF
DevFest 2022 - Cloud Workstation Introduction TaiChung
PDF
Devfest 2021' - Artifact Registry Introduction (Taipei)
PDF
Coscup x ruby conf tw 2021 google cloud buildpacks 剖析與實踐
PDF
Gdg cloud taipei ddt meetup #53 buildpack
PDF
GDG Cloud Taipei: Meetup #52 - Istio Security: API Authorization
PDF
如何透過 Go-kit 快速搭建微服務架構應用程式實戰
PDF
Dev fest 2020 taiwan how to debug microservices on kubernetes as a pros (ht...
PDF
Google App Engine: Basic
PDF
COSCUP 2020 Google 技術 x 公共參與 x 開源 口罩地圖技術開源
PDF
GDG Cloud Taipei meetup #50 - Build go kit microservices at kubernetes with ...
PDF
GDG Devfest 2019 - Build go kit microservices at kubernetes with ease
PDF
Global GDG Leaders Summit, Google I/O 2018 經驗分享
PDF
Google apps script introduction
PDF
Screenshot as a service
PDF
Nas 也可以揀土豆
PDF
60分鐘完送百萬edm,背後雲端ci/cd實戰大公開
PDF
Django oscar introduction
PDF
Continuous Integration & Continuous Delivery with GCP
Devfest 2023 - Service Weaver Introduction - Taipei.pdf
DevFest 2022 - Skaffold 2 Deep Dive Taipei.pdf
DevFest 2022 - Cloud Workstation Introduction TaiChung
Devfest 2021' - Artifact Registry Introduction (Taipei)
Coscup x ruby conf tw 2021 google cloud buildpacks 剖析與實踐
Gdg cloud taipei ddt meetup #53 buildpack
GDG Cloud Taipei: Meetup #52 - Istio Security: API Authorization
如何透過 Go-kit 快速搭建微服務架構應用程式實戰
Dev fest 2020 taiwan how to debug microservices on kubernetes as a pros (ht...
Google App Engine: Basic
COSCUP 2020 Google 技術 x 公共參與 x 開源 口罩地圖技術開源
GDG Cloud Taipei meetup #50 - Build go kit microservices at kubernetes with ...
GDG Devfest 2019 - Build go kit microservices at kubernetes with ease
Global GDG Leaders Summit, Google I/O 2018 經驗分享
Google apps script introduction
Screenshot as a service
Nas 也可以揀土豆
60分鐘完送百萬edm,背後雲端ci/cd實戰大公開
Django oscar introduction
Continuous Integration & Continuous Delivery with GCP

Recently uploaded (20)

PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PPTX
Big Data Technologies - Introduction.pptx
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
KodekX | Application Modernization Development
PDF
Modernizing your data center with Dell and AMD
PPTX
A Presentation on Artificial Intelligence
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Machine learning based COVID-19 study performance prediction
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Per capita expenditure prediction using model stacking based on satellite ima...
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Big Data Technologies - Introduction.pptx
Digital-Transformation-Roadmap-for-Companies.pptx
KodekX | Application Modernization Development
Modernizing your data center with Dell and AMD
A Presentation on Artificial Intelligence
20250228 LYD VKU AI Blended-Learning.pptx
Agricultural_Statistics_at_a_Glance_2022_0.pdf
The Rise and Fall of 3GPP – Time for a Sabbatical?
Advanced methodologies resolving dimensionality complications for autism neur...
Machine learning based COVID-19 study performance prediction
Diabetes mellitus diagnosis method based random forest with bat algorithm
Network Security Unit 5.pdf for BCA BBA.
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Bridging biosciences and deep learning for revolutionary discoveries: a compr...

Velero search &amp; practice 20210609

  • 2. Overview Velero 1.6 ● Introduction ● Install ● Use ● Practice ● QA
  • 4. Introduction Velero is an open source tool to safely backup and restore, perform disaster recovery, and migrate Kubernetes cluster resources and persistent volumes Aiming to help with: ● Disaster Recovery: Recover from an issue ● Data Migration: Migrate apps between clusters ● Data Protection: Scheduled Actions
  • 5. Etcd backup vs. Velero bacup ● Etcd's backup/restore tooling is good for recovering from data loss in a single etcd cluster ● you don't have access to etcd (e.g. you're running on GKE) ● backing up both Kubernetes resources and persistent volume state ● cluster migrations ● backing up a subset of your Kubernetes resources ● backing up Kubernetes resources that are stored across multiple etcd clusters (for example if you run a custom apiserver)
  • 6. Velero CRD ● backups.velero.io ● backupstoragelocations.velero.io ● deletebackuprequests.velero.io ● downloadrequests.velero.io ● podvolumebackups.velero.io ● podvolumerestores.velero.io ● resticrepositories.velero.io ● restores.velero.io ● schedules.velero.io ● serverstatusrequests.velero.io ● volumesnapshotlocations.velero.io
  • 8. Backup Storage Locations and Volume Snapshot Locations ● BackupStorageLocation (Velero backups) ○ Bucket (Object Store) ○ K8s resources ○ One or more ● VolumeSnapshotLocation (associated persistent) ○ defined entirely by provider-specific fields (AWS region, Azure resource group, Portworx snapshot type, etc. ○ One or more
  • 9. Backup Storage Locations and Volume Snapshot Locations Conts. ● Single Velero backup snapshots ○ Multiple Persistent Volume (both EBS volumes and Portworx volumes) ● Multiple Velero backups to different Buckets ○ eastern USA region ○ western USA region ○ or to a different storage provider ● volume providers that support (Portworx) ○ you can have some snapshots stored locally on the cluster and have others stored in the cloud
  • 10. Backup Storage Locations and Volume Snapshot Locations Conts. ● It is not possible (yet) to send a single Velero backup to multiple backup storage locations simultaneously ● Cross-provider snapshots are not supported ● Other Limitations / Caveats
  • 12. Install ● Client (CLI) ● Server ○ Plugins ○ Enable restic integration --use-restic ○ Default Pod Volume backup to restic --default-volumes-to-restic ○ Customize resource requests and limits ○ Configure more than one storage location for backups or volume snapshots ○ Install an additional volume snapshot provider
  • 13. Providers ● Velero supported providers ● Community supported providers ● S3-Compatible object store providers ● Non-supported volume snapshots
  • 14. Providers - Velero supported providers
  • 15. Providers - Community supported providers
  • 16. Providers - S3-Compatible object store providers ● IBM Cloud ● Oracle Cloud ● Minio ● DigitalOcean ● NooBaa ● Tencent Cloud ● Ceph RADOS v12.2.7 ● Quobyte ● Cloudian HyperStore
  • 17. Providers - Non-supported volume snapshots In the case you want to take volume snapshots but didn’t find a plugin for your provider, Velero has support for snapshotting using restic. Please see the restic integration documentation.
  • 18. Set up server velero install --provider aws --plugins velero/velero-plugin-for-aws:v1.0.0 --bucket velero --secret-file ./credentials-velero-minio --use-volume-snapshots=true --backup-location-config region=default,s3ForcePathStyle="true",s3Url=http://minio.infra.svc.cluster.local:9000 --snapshot-location-config region="default" --use-restic --wait velero install --provider gcp --plugins velero/velero-plugin-for-gcp:v1.2.0 --bucket velero --secret-file ./credentials-velero-minio --use-volume-snapshots=true --backup-location-config region=default,s3ForcePathStyle="true",s3Url=http://minio.infra.svc.cluster.local:9000 --snapshot-location-config region="default" --use-restic --wait
  • 19. Set up server - helm helm install velero vmware-tanzu/velero --namespace velero --create-namespace -f velero-values.yaml configuration: provider: aws backupStorageLocation: bucket: velero config: region: default s3ForcePathStyle: true publicUrl: http://172.18.0.155:9000 s3Url: http://minio.minio.svc.cluster.local:9000 volumeSnapshotLocation: config: region: default credentials: useSecret: true secretContents: cloud: | [default] aws_access_key_id = minio aws_secret_access_key = minio123 …. initContainers: - name: velero-plugin-for-aws image: velero/velero-plugin-for-aws:v1.1.0 imagePullPolicy: IfNotPresent volumeMounts: - mountPath: /target name: plugins
  • 20. Use
  • 21. Disaster recovery The default backup retention period, expressed as TTL (time to live), is 30 days (720 hours). --ttl <DURATION> flag to change this as necessary velero schedule create <SCHEDULE NAME> --schedule "0 7 * * *"
  • 22. Resource filtering (Support Backup and Restore) ● Includes ○ –include-namespaces ○ –include-resources ○ –include-cluster-resources ○ –selector ● Excludes ○ –exclude-namespaces ○ –exclude-resources ○ velero.io/exclude-from-backup=true
  • 23. Backup Hooks (Pre/Post) ● pre(post).hook.backup.velero.io/container ○ The container where the command should be executed. Defaults to the first container in the pod. Optional. ● pre(post).hook.backup.velero.io/command ○ The command to execute. If you need multiple arguments, specify the command as a JSON array, such as ["/usr/bin/uname", "-a"] ● pre(post).hook.backup.velero.io/on-error ○ What to do if the command returns a non-zero exit code. Defaults to Fail. Valid values are Fail and Continue. Optional. ● pre(post).hook.backup.velero.io/timeout ○ How long to wait for the command to execute. The hook is considered in error if the command exceeds the timeout. Defaults to 30s. Optional.
  • 24. Velero backup create # Create a backup containing all resources. velero backup create backup1 # Create a backup including only the nginx namespace. velero backup create nginx-backup --include-namespaces nginx # Create a backup excluding the velero and default namespaces. velero backup create backup2 --exclude-namespaces velero,default # Create a backup based on a schedule named daily-backup. velero backup create --from-schedule daily-backup # View the YAML for a backup that doesn't snapshot volumes, without sending it to the server. velero backup create backup3 --snapshot-volumes=false -o yaml # Wait for a backup to complete before returning from the command. velero backup create backup4 --wait
  • 25. Restore Hooks ● InitContainer Restore Hooks ○ init.hook.restore.velero.io/container-image ○ init.hook.restore.velero.io/container-name ○ init.hook.restore.velero.io/command ● Exec Restore Hooks ○ post.hook.restore.velero.io/container ○ post.hook.restore.velero.io/command ○ post.hook.restore.velero.io/on-error ○ post.hook.restore.velero.io/exec-timeout ○ post.hook.restore.velero.io/wait-timeout
  • 27. Backup from KIND and Restore to KIND
  • 28. Backup from GKE and Restore to GKE
  • 30. Q&A