SlideShare a Scribd company logo
1 of 19
Download to read offline
Ryan Kaw
DoK Day Europe 2022 @ KubeCon
“The Many Uses of Kubernetes Cross-Cluster
Migration of Persistent Data”
Ryan Kaw
DoK Day Europe 2022 @ KubeCon
“The Many Uses of Kubernetes Cross-Cluster
Migration of Persistent Data”
q Many reasons for having multiple Kubernetes clusters
q Operations - overcoming scale limits, reducing complexity, geo separation, redundancy
q CI/CD pipeline - separate production, staging, and development environments
q Hybrid environments may have clusters on-prem and cloud, or different cloud vendors.
Production Staging Development QA
Cloud On-Prem
Why Multiple Kubernetes Clusters?
2
Ryan Kaw
DoK Day Europe 2022 @ KubeCon
“The Many Uses of Kubernetes Cross-Cluster
Migration of Persistent Data”
q Major platform or infrastructure upgrades (upgrade Kubernetes version, compute and storage hardware)
q Move to different location data center, region, or migrate to cloud
q Migrate data between different cloud vendors, or across cloud accounts
q Clone production workload to staging or QA clusters to test code updates, as part of dev workflow
q Migrate workloads if your production clusters are having hardware issues
q Reduce cluster overload by moving some workloads to new cluster
Production Development
Workload + data
Cross-Cluster Data Management Use Cases
3
Ryan Kaw
DoK Day Europe 2022 @ KubeCon
“The Many Uses of Kubernetes Cross-Cluster
Migration of Persistent Data”
Kubernetes clusters are typically isolated from each other. One cluster does not have any knowledge about
another cluster. They are both isolated in terms of storage and networking.
Production Staging Development QA Cloud
Challenges: Kubernetes Cluster are Isolated
4
Ryan Kaw
DoK Day Europe 2022 @ KubeCon
“The Many Uses of Kubernetes Cross-Cluster
Migration of Persistent Data”
q Moving persistent workloads between clusters is a challenge.
q Persistent data resides on Persistent Volumes (PVs) within a cluster.
q No native Kubernetes infrastructure to copy, clone, or migrate PVs between clusters.
Production Staging Development QA Cloud
PV PV PV PV PV
Persistent Workloads
5
Ryan Kaw
DoK Day Europe 2022 @ KubeCon
“The Many Uses of Kubernetes Cross-Cluster
Migration of Persistent Data”
q No network communications between source and target cluster other then publicly exposed services
q PV data is not typically exposed on the network for Ingress or Egress
q Need a way to transfer data without connectivity between clusters, or exposing PV to public network
q Make sure not to overload network bandwidth, storage bandwidth
q Don’t want to affect production environment during transfers
q Applications should always reference both internal and external services using DNS names, rather than IP
addresses.
Networking Challenges with Moving Persistent Workloads Across Clusters
Workload
Cluster1
PV PV
Cluster2
6
Ryan Kaw
DoK Day Europe 2022 @ KubeCon
“The Many Uses of Kubernetes Cross-Cluster
Migration of Persistent Data”
q Entire Cluster
q Re-create an entire cluster
q During migration, change properties on target cluster for DevOps purposes
q Don’t need a full cost production environment in QA, staging, or development.
q Granular selection
q You may only want to move workloads within a particular namespace or label
q Move both etcd resources and PV in a logical unit so that application remains intact
Migration: Entire Cluster or Granular
AWS EKS cluster2
Region: us-east
namespace
AWS EKS Cluster1
Region: us-west
PV PV
Label
7
Ryan Kaw
DoK Day Europe 2022 @ KubeCon
“The Many Uses of Kubernetes Cross-Cluster
Migration of Persistent Data”
q PVs on each cluster could be using different storage classes
q In the case below, we want to clone our persistent workload from Cluster1 to Cluster2
q PV on cluster 1 is using the ebs CSI driver, however, cluster2 does not have CSI enabled and is using
storageclass gp2.
Storage Class Differences
Storageclass: ebs-sc
AWS EKS Cluster2
Region: us-east
workload
AWS EKS Cluster1
Region: us-west
PV Storageclass: gp2
PV
8
Ryan Kaw
DoK Day Europe 2022 @ KubeCon
“The Many Uses of Kubernetes Cross-Cluster
Migration of Persistent Data”
Velero and Restic:
Tools for Migrating or Cloning Workloads Across Clusters
q Requires manual setup, install on both clusters
q Requires users to setup a common S3 storage endpoint that both clusters can access
q Need to create target cluster manually
9
Ryan Kaw
DoK Day Europe 2022 @ KubeCon
“The Many Uses of Kubernetes Cross-Cluster
Migration of Persistent Data”
CloudCasa.io:
q SaaS service with light weight agent - does not
require dedicated cluster or cluster resources,
and infrastructure is hosted by SaaS service
q Network and disk throttling to prevent
overloading production environment
q Self service web UI and RBAC - let’s users only
access their workloads for cloning and migration.
q Tight integration with EKS and AKS - auto
discovers clusters and re-creates EKS/AKS
clusters on restores.
q No need for standby clusters.
Tools for Migrating or Cloning Workloads Across Clusters
10
Ryan Kaw
DoK Day Europe 2022 @ KubeCon
“The Many Uses of Kubernetes Cross-Cluster
Migration of Persistent Data”
q Migration tools
overcome isolated K8s
networking and storage
via a common storage
such as S3 object
storage
q Tools leverage API
Server to pull etcd
meta-data and use CSI
snapshots to backup
consistent PV data.
q Both clusters should
have access to S3
object storage
How Migration Tools Work – General Workflow
Production QA
PV
PV
snapsho
t
Object
storage
Migration
tool
backup
API server
Create snapshot and
read data from snapshot
Read Etcd
metadata
Write to
object
storage
PV
Migration
tool
restore
Read from
object
storage
Create PV
and write
data
API server
Apply
metadata
1
2
4
5
3
6
11
Ryan Kaw
DoK Day Europe 2022 @ KubeCon
“The Many Uses of Kubernetes Cross-Cluster
Migration of Persistent Data”
Cross-Account Restore
Walkthrough
12
Ryan Kaw
DoK Day Europe 2022 @ KubeCon
“The Many Uses of Kubernetes Cross-Cluster
Migration of Persistent Data”
Onboard Source and
Target AWS Accounts
via CloudFormation
Stack
13
Ryan Kaw
DoK Day Europe 2022 @ KubeCon
“The Many Uses of Kubernetes Cross-Cluster
Migration of Persistent Data”
Both Source and Target
Cluster Registered
14
Ryan Kaw
DoK Day Europe 2022 @ KubeCon
“The Many Uses of Kubernetes Cross-Cluster
Migration of Persistent Data”
Install CloudCasa
Agent on Both Source
and Target Clusters
via kubectl Apply
15
Ryan Kaw
DoK Day Europe 2022 @ KubeCon
“The Many Uses of Kubernetes Cross-Cluster
Migration of Persistent Data”
Backup Workload
“test-website” on
Source Cluster
16
Ryan Kaw
DoK Day Europe 2022 @ KubeCon
“The Many Uses of Kubernetes Cross-Cluster
Migration of Persistent Data”
Restore Workload
”test-website” on
Target Cluster and
Remap Storageclass
to gp2
17
Ryan Kaw
DoK Day Europe 2022 @ KubeCon
“The Many Uses of Kubernetes Cross-Cluster
Migration of Persistent Data”
Workload “test-
website” with
Resources and PVs
are Migrated to
Cluster2
18
DoK Day North America 2021 @ KubeCon
Ryan Kaw
“The Many Uses of Kubernetes Cross-Cluster
Migration of Persistent Data”
Ryan Kaw
rkaw@catalogicsoftware.com
@cloudcasa
cloudcasa.io
Thank you!
19

More Related Content

Similar to The many uses of Kubernetes cross cluster migration of persistent data

Similar to The many uses of Kubernetes cross cluster migration of persistent data (20)

Episode 1: Building Kubernetes-as-a-Service
Episode 1: Building Kubernetes-as-a-ServiceEpisode 1: Building Kubernetes-as-a-Service
Episode 1: Building Kubernetes-as-a-Service
 
Build and Deploy Cloud Native Camel Quarkus routes with Tekton and Knative
Build and Deploy Cloud Native Camel Quarkus routes with Tekton and KnativeBuild and Deploy Cloud Native Camel Quarkus routes with Tekton and Knative
Build and Deploy Cloud Native Camel Quarkus routes with Tekton and Knative
 
Cloudstack container service
Cloudstack container serviceCloudstack container service
Cloudstack container service
 
CloudStack Container Service
CloudStack Container ServiceCloudStack Container Service
CloudStack Container Service
 
1000 node Cassandra cluster on Amazon's EKS?
1000 node Cassandra cluster on Amazon's EKS?1000 node Cassandra cluster on Amazon's EKS?
1000 node Cassandra cluster on Amazon's EKS?
 
1000 node Cassandra cluster on Amazon's EKS? - Matt Overstreet (DoK Day EU 2022)
1000 node Cassandra cluster on Amazon's EKS? - Matt Overstreet (DoK Day EU 2022)1000 node Cassandra cluster on Amazon's EKS? - Matt Overstreet (DoK Day EU 2022)
1000 node Cassandra cluster on Amazon's EKS? - Matt Overstreet (DoK Day EU 2022)
 
What’s New in CloudStack 4.15 - CloudStack European User Group Virtual, May 2021
What’s New in CloudStack 4.15 - CloudStack European User Group Virtual, May 2021What’s New in CloudStack 4.15 - CloudStack European User Group Virtual, May 2021
What’s New in CloudStack 4.15 - CloudStack European User Group Virtual, May 2021
 
Run Containerized Database SQL Server 2017 Linux
Run Containerized Database SQL Server 2017 LinuxRun Containerized Database SQL Server 2017 Linux
Run Containerized Database SQL Server 2017 Linux
 
FIWARE Global Summit - Leveraging Kubernetes for FIWARE Components Automations
FIWARE Global Summit - Leveraging Kubernetes for FIWARE Components AutomationsFIWARE Global Summit - Leveraging Kubernetes for FIWARE Components Automations
FIWARE Global Summit - Leveraging Kubernetes for FIWARE Components Automations
 
Federated Kubernetes: As a Platform for Distributed Scientific Computing
Federated Kubernetes: As a Platform for Distributed Scientific ComputingFederated Kubernetes: As a Platform for Distributed Scientific Computing
Federated Kubernetes: As a Platform for Distributed Scientific Computing
 
KCD2022 Predictive Autoscaling Patterns in k8s.pdf
KCD2022 Predictive Autoscaling Patterns in k8s.pdfKCD2022 Predictive Autoscaling Patterns in k8s.pdf
KCD2022 Predictive Autoscaling Patterns in k8s.pdf
 
Kubernetes on on on on on on on on on on on on on on Azure Deck.pptx
Kubernetes on on on on on on on on on on on on on on Azure Deck.pptxKubernetes on on on on on on on on on on on on on on Azure Deck.pptx
Kubernetes on on on on on on on on on on on on on on Azure Deck.pptx
 
Kubernetes: https://youtu.be/KnjnQj-FvfQ
Kubernetes: https://youtu.be/KnjnQj-FvfQKubernetes: https://youtu.be/KnjnQj-FvfQ
Kubernetes: https://youtu.be/KnjnQj-FvfQ
 
Kubernetes intro
Kubernetes introKubernetes intro
Kubernetes intro
 
Successful K8S Platforms in Airgapped Environments
Successful K8S Platforms in Airgapped EnvironmentsSuccessful K8S Platforms in Airgapped Environments
Successful K8S Platforms in Airgapped Environments
 
Bringing Apache Cassandra closer to Kubernetes
Bringing Apache Cassandra closer to KubernetesBringing Apache Cassandra closer to Kubernetes
Bringing Apache Cassandra closer to Kubernetes
 
Webinar- Tea for the Tillerman
Webinar- Tea for the TillermanWebinar- Tea for the Tillerman
Webinar- Tea for the Tillerman
 
(SACON) Anand Tapikar - Attack vectors of Kubernetes infra. Are we on right ...
 (SACON) Anand Tapikar - Attack vectors of Kubernetes infra. Are we on right ... (SACON) Anand Tapikar - Attack vectors of Kubernetes infra. Are we on right ...
(SACON) Anand Tapikar - Attack vectors of Kubernetes infra. Are we on right ...
 
Building A Diverse Geo-Architecture For Cloud Native Applications In One Day
Building A Diverse Geo-Architecture For Cloud Native Applications In One DayBuilding A Diverse Geo-Architecture For Cloud Native Applications In One Day
Building A Diverse Geo-Architecture For Cloud Native Applications In One Day
 
Pivotal Cloud Foundry: Building a diverse geo-architecture for Cloud Native A...
Pivotal Cloud Foundry: Building a diverse geo-architecture for Cloud Native A...Pivotal Cloud Foundry: Building a diverse geo-architecture for Cloud Native A...
Pivotal Cloud Foundry: Building a diverse geo-architecture for Cloud Native A...
 

More from DoKC

The Kubernetes Native Database
The Kubernetes Native DatabaseThe Kubernetes Native Database
The Kubernetes Native Database
DoKC
 
Overcoming challenges with protecting and migrating data in multi-cloud K8s e...
Overcoming challenges with protecting and migrating data in multi-cloud K8s e...Overcoming challenges with protecting and migrating data in multi-cloud K8s e...
Overcoming challenges with protecting and migrating data in multi-cloud K8s e...
DoKC
 
We will Dok You! - The journey to adopt stateful workloads on k8s
We will Dok You! - The journey to adopt stateful workloads on k8sWe will Dok You! - The journey to adopt stateful workloads on k8s
We will Dok You! - The journey to adopt stateful workloads on k8s
DoKC
 

More from DoKC (20)

Distributed Vector Databases - What, Why, and How
Distributed Vector Databases - What, Why, and HowDistributed Vector Databases - What, Why, and How
Distributed Vector Databases - What, Why, and How
 
Is It Safe? Security Hardening for Databases Using Kubernetes Operators
Is It Safe? Security Hardening for Databases Using Kubernetes OperatorsIs It Safe? Security Hardening for Databases Using Kubernetes Operators
Is It Safe? Security Hardening for Databases Using Kubernetes Operators
 
Stop Worrying and Keep Querying, Using Automated Multi-Region Disaster Recovery
Stop Worrying and Keep Querying, Using Automated Multi-Region Disaster RecoveryStop Worrying and Keep Querying, Using Automated Multi-Region Disaster Recovery
Stop Worrying and Keep Querying, Using Automated Multi-Region Disaster Recovery
 
Transforming Data Processing with Kubernetes: Journey Towards a Self-Serve Da...
Transforming Data Processing with Kubernetes: Journey Towards a Self-Serve Da...Transforming Data Processing with Kubernetes: Journey Towards a Self-Serve Da...
Transforming Data Processing with Kubernetes: Journey Towards a Self-Serve Da...
 
The State of Stateful on Kubernetes
The State of Stateful on KubernetesThe State of Stateful on Kubernetes
The State of Stateful on Kubernetes
 
Colocating Data Workloads and Web Services on Kubernetes to Improve Resource ...
Colocating Data Workloads and Web Services on Kubernetes to Improve Resource ...Colocating Data Workloads and Web Services on Kubernetes to Improve Resource ...
Colocating Data Workloads and Web Services on Kubernetes to Improve Resource ...
 
Make Your Kafka Cluster Production-Ready
Make Your Kafka Cluster Production-ReadyMake Your Kafka Cluster Production-Ready
Make Your Kafka Cluster Production-Ready
 
Dynamic Large Scale Spark on Kubernetes: Empowering the Community with Argo W...
Dynamic Large Scale Spark on Kubernetes: Empowering the Community with Argo W...Dynamic Large Scale Spark on Kubernetes: Empowering the Community with Argo W...
Dynamic Large Scale Spark on Kubernetes: Empowering the Community with Argo W...
 
Run PostgreSQL in Warp Speed Using NVMe/TCP in the Cloud
Run PostgreSQL in Warp Speed Using NVMe/TCP in the CloudRun PostgreSQL in Warp Speed Using NVMe/TCP in the Cloud
Run PostgreSQL in Warp Speed Using NVMe/TCP in the Cloud
 
The Kubernetes Native Database
The Kubernetes Native DatabaseThe Kubernetes Native Database
The Kubernetes Native Database
 
ING Data Services hosted on ICHP DoK Amsterdam 2023
ING Data Services hosted on ICHP DoK Amsterdam 2023ING Data Services hosted on ICHP DoK Amsterdam 2023
ING Data Services hosted on ICHP DoK Amsterdam 2023
 
Implementing data and databases on K8s within the Dutch government
Implementing data and databases on K8s within the Dutch governmentImplementing data and databases on K8s within the Dutch government
Implementing data and databases on K8s within the Dutch government
 
StatefulSets in K8s - DoK Talks #154
StatefulSets in K8s - DoK Talks #154StatefulSets in K8s - DoK Talks #154
StatefulSets in K8s - DoK Talks #154
 
Running PostgreSQL in Kubernetes: from day 0 to day 2 with CloudNativePG - Do...
Running PostgreSQL in Kubernetes: from day 0 to day 2 with CloudNativePG - Do...Running PostgreSQL in Kubernetes: from day 0 to day 2 with CloudNativePG - Do...
Running PostgreSQL in Kubernetes: from day 0 to day 2 with CloudNativePG - Do...
 
Analytics with Apache Superset and ClickHouse - DoK Talks #151
Analytics with Apache Superset and ClickHouse - DoK Talks #151Analytics with Apache Superset and ClickHouse - DoK Talks #151
Analytics with Apache Superset and ClickHouse - DoK Talks #151
 
Overcoming challenges with protecting and migrating data in multi-cloud K8s e...
Overcoming challenges with protecting and migrating data in multi-cloud K8s e...Overcoming challenges with protecting and migrating data in multi-cloud K8s e...
Overcoming challenges with protecting and migrating data in multi-cloud K8s e...
 
Evaluating Cloud Native Storage Vendors - DoK Talks #147
Evaluating Cloud Native Storage Vendors - DoK Talks #147Evaluating Cloud Native Storage Vendors - DoK Talks #147
Evaluating Cloud Native Storage Vendors - DoK Talks #147
 
Kubernetes Cluster Upgrade Strategies and Data: Best Practices for your State...
Kubernetes Cluster Upgrade Strategies and Data: Best Practices for your State...Kubernetes Cluster Upgrade Strategies and Data: Best Practices for your State...
Kubernetes Cluster Upgrade Strategies and Data: Best Practices for your State...
 
We will Dok You! - The journey to adopt stateful workloads on k8s
We will Dok You! - The journey to adopt stateful workloads on k8sWe will Dok You! - The journey to adopt stateful workloads on k8s
We will Dok You! - The journey to adopt stateful workloads on k8s
 
Mastering MongoDB on Kubernetes, the power of operators
Mastering MongoDB on Kubernetes, the power of operators Mastering MongoDB on Kubernetes, the power of operators
Mastering MongoDB on Kubernetes, the power of operators
 

Recently uploaded

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Recently uploaded (20)

Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 

The many uses of Kubernetes cross cluster migration of persistent data

  • 1. Ryan Kaw DoK Day Europe 2022 @ KubeCon “The Many Uses of Kubernetes Cross-Cluster Migration of Persistent Data”
  • 2. Ryan Kaw DoK Day Europe 2022 @ KubeCon “The Many Uses of Kubernetes Cross-Cluster Migration of Persistent Data” q Many reasons for having multiple Kubernetes clusters q Operations - overcoming scale limits, reducing complexity, geo separation, redundancy q CI/CD pipeline - separate production, staging, and development environments q Hybrid environments may have clusters on-prem and cloud, or different cloud vendors. Production Staging Development QA Cloud On-Prem Why Multiple Kubernetes Clusters? 2
  • 3. Ryan Kaw DoK Day Europe 2022 @ KubeCon “The Many Uses of Kubernetes Cross-Cluster Migration of Persistent Data” q Major platform or infrastructure upgrades (upgrade Kubernetes version, compute and storage hardware) q Move to different location data center, region, or migrate to cloud q Migrate data between different cloud vendors, or across cloud accounts q Clone production workload to staging or QA clusters to test code updates, as part of dev workflow q Migrate workloads if your production clusters are having hardware issues q Reduce cluster overload by moving some workloads to new cluster Production Development Workload + data Cross-Cluster Data Management Use Cases 3
  • 4. Ryan Kaw DoK Day Europe 2022 @ KubeCon “The Many Uses of Kubernetes Cross-Cluster Migration of Persistent Data” Kubernetes clusters are typically isolated from each other. One cluster does not have any knowledge about another cluster. They are both isolated in terms of storage and networking. Production Staging Development QA Cloud Challenges: Kubernetes Cluster are Isolated 4
  • 5. Ryan Kaw DoK Day Europe 2022 @ KubeCon “The Many Uses of Kubernetes Cross-Cluster Migration of Persistent Data” q Moving persistent workloads between clusters is a challenge. q Persistent data resides on Persistent Volumes (PVs) within a cluster. q No native Kubernetes infrastructure to copy, clone, or migrate PVs between clusters. Production Staging Development QA Cloud PV PV PV PV PV Persistent Workloads 5
  • 6. Ryan Kaw DoK Day Europe 2022 @ KubeCon “The Many Uses of Kubernetes Cross-Cluster Migration of Persistent Data” q No network communications between source and target cluster other then publicly exposed services q PV data is not typically exposed on the network for Ingress or Egress q Need a way to transfer data without connectivity between clusters, or exposing PV to public network q Make sure not to overload network bandwidth, storage bandwidth q Don’t want to affect production environment during transfers q Applications should always reference both internal and external services using DNS names, rather than IP addresses. Networking Challenges with Moving Persistent Workloads Across Clusters Workload Cluster1 PV PV Cluster2 6
  • 7. Ryan Kaw DoK Day Europe 2022 @ KubeCon “The Many Uses of Kubernetes Cross-Cluster Migration of Persistent Data” q Entire Cluster q Re-create an entire cluster q During migration, change properties on target cluster for DevOps purposes q Don’t need a full cost production environment in QA, staging, or development. q Granular selection q You may only want to move workloads within a particular namespace or label q Move both etcd resources and PV in a logical unit so that application remains intact Migration: Entire Cluster or Granular AWS EKS cluster2 Region: us-east namespace AWS EKS Cluster1 Region: us-west PV PV Label 7
  • 8. Ryan Kaw DoK Day Europe 2022 @ KubeCon “The Many Uses of Kubernetes Cross-Cluster Migration of Persistent Data” q PVs on each cluster could be using different storage classes q In the case below, we want to clone our persistent workload from Cluster1 to Cluster2 q PV on cluster 1 is using the ebs CSI driver, however, cluster2 does not have CSI enabled and is using storageclass gp2. Storage Class Differences Storageclass: ebs-sc AWS EKS Cluster2 Region: us-east workload AWS EKS Cluster1 Region: us-west PV Storageclass: gp2 PV 8
  • 9. Ryan Kaw DoK Day Europe 2022 @ KubeCon “The Many Uses of Kubernetes Cross-Cluster Migration of Persistent Data” Velero and Restic: Tools for Migrating or Cloning Workloads Across Clusters q Requires manual setup, install on both clusters q Requires users to setup a common S3 storage endpoint that both clusters can access q Need to create target cluster manually 9
  • 10. Ryan Kaw DoK Day Europe 2022 @ KubeCon “The Many Uses of Kubernetes Cross-Cluster Migration of Persistent Data” CloudCasa.io: q SaaS service with light weight agent - does not require dedicated cluster or cluster resources, and infrastructure is hosted by SaaS service q Network and disk throttling to prevent overloading production environment q Self service web UI and RBAC - let’s users only access their workloads for cloning and migration. q Tight integration with EKS and AKS - auto discovers clusters and re-creates EKS/AKS clusters on restores. q No need for standby clusters. Tools for Migrating or Cloning Workloads Across Clusters 10
  • 11. Ryan Kaw DoK Day Europe 2022 @ KubeCon “The Many Uses of Kubernetes Cross-Cluster Migration of Persistent Data” q Migration tools overcome isolated K8s networking and storage via a common storage such as S3 object storage q Tools leverage API Server to pull etcd meta-data and use CSI snapshots to backup consistent PV data. q Both clusters should have access to S3 object storage How Migration Tools Work – General Workflow Production QA PV PV snapsho t Object storage Migration tool backup API server Create snapshot and read data from snapshot Read Etcd metadata Write to object storage PV Migration tool restore Read from object storage Create PV and write data API server Apply metadata 1 2 4 5 3 6 11
  • 12. Ryan Kaw DoK Day Europe 2022 @ KubeCon “The Many Uses of Kubernetes Cross-Cluster Migration of Persistent Data” Cross-Account Restore Walkthrough 12
  • 13. Ryan Kaw DoK Day Europe 2022 @ KubeCon “The Many Uses of Kubernetes Cross-Cluster Migration of Persistent Data” Onboard Source and Target AWS Accounts via CloudFormation Stack 13
  • 14. Ryan Kaw DoK Day Europe 2022 @ KubeCon “The Many Uses of Kubernetes Cross-Cluster Migration of Persistent Data” Both Source and Target Cluster Registered 14
  • 15. Ryan Kaw DoK Day Europe 2022 @ KubeCon “The Many Uses of Kubernetes Cross-Cluster Migration of Persistent Data” Install CloudCasa Agent on Both Source and Target Clusters via kubectl Apply 15
  • 16. Ryan Kaw DoK Day Europe 2022 @ KubeCon “The Many Uses of Kubernetes Cross-Cluster Migration of Persistent Data” Backup Workload “test-website” on Source Cluster 16
  • 17. Ryan Kaw DoK Day Europe 2022 @ KubeCon “The Many Uses of Kubernetes Cross-Cluster Migration of Persistent Data” Restore Workload ”test-website” on Target Cluster and Remap Storageclass to gp2 17
  • 18. Ryan Kaw DoK Day Europe 2022 @ KubeCon “The Many Uses of Kubernetes Cross-Cluster Migration of Persistent Data” Workload “test- website” with Resources and PVs are Migrated to Cluster2 18
  • 19. DoK Day North America 2021 @ KubeCon Ryan Kaw “The Many Uses of Kubernetes Cross-Cluster Migration of Persistent Data” Ryan Kaw rkaw@catalogicsoftware.com @cloudcasa cloudcasa.io Thank you! 19