• Stars
    star
    895
  • Rank 49,367 (Top 1.0 %)
  • Language
    Go
  • License
    Apache License 2.0
  • Created over 5 years ago
  • Updated 11 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

CLI tool to easily migrate Kubernetes persistent volumes

pv-migrate

build codecov Go Report Card Latest GitHub release GitHub license GitHub stars GitHub forks GitHub issues GitHub all releases Docker Pulls SSHD Docker Pulls Rsync Docker Pulls

pv-migrate is a CLI tool/kubectl plugin to easily migrate the contents of one Kubernetes PersistentVolumeClaim to another.

Demo

pv-migrate demo GIF

Introduction

On Kubernetes, if you need to rename a resource (like a Deployment) or to move it to a different namespace, you can simply create a copy of its manifest with the new namespace and/or name and apply it.

However, it is not as simple with PersistentVolumeClaim resources: They are not only metadata, but they also store data in the underlying storage backend.

In these cases, moving the data stored in the PVC can become a problem, making migrations more difficult.

Use Cases

➡️ You have a database that has a PersistentVolumeClaim db-data of size 50Gi.
Your DB grew over time, and you need more space for it.
You cannot resize the PVC because it doesn't support volume expansion.
Simply create a new, bigger PVC db-data-v2 and use pv-migrate to copy data from db-data to db-data-v2.

➡️ You need to move PersistentVolumeClaim my-pvc from namespace ns-a to namespace ns-b.
Simply create the PVC with the same name and manifest in ns-b and use pv-migrate to copy its content.

➡️ You are moving from one cloud provider to another, and you need to move the data from one Kubernetes cluster to the other.
Just use pv-migrate to copy the data securely over the internet.

Highlights

  • Supports in-namespace, in-cluster as well as cross-cluster migrations
  • Uses rsync over SSH with a freshly generated Ed25519 or RSA keys each time to securely migrate the files
  • Allows full customization of the manifests (e.g. specifying your own docker images for rsync and sshd, configuring affinity etc.)
  • Supports multiple migration strategies to do the migration efficiently and fallback to other strategies when needed
  • Customizable strategy order
  • Supports arm32v7 (Raspberry Pi etc.) and arm64 architectures as well as amd64
  • Supports completion for popular shells: bash, zsh, fish, powershell

Installation

See INSTALL.md for various installation methods and shell completion configuration.

Usage

See USAGE.md for the CLI reference and examples.

Stargazers over time

Stargazers over time

Contributing

See CONTRIBUTING for details.

More Repositories

1

nvidia_gpu_exporter

Nvidia GPU exporter for prometheus using nvidia-smi binary
Go
370
star
2

helm-charts

Helm Chart Repository
Smarty
33
star
3

ansible-role-nebula

Ansible role to install Nebula Mesh overlay
Jinja
14
star
4

gcp-calibre-web

Deploy Calibre-Web on Google Cloud with minimal effort
HCL
6
star
5

swiss-army-knife

A docker image with convenient set of utilities
Dockerfile
5
star
6

argocd-helm-secret-values-example

Example repo to demonstrate a way to manage secret Helm values
3
star
7

kotlin-cli

Native Kotlin CLI
Kotlin
3
star
8

user-friendly-shell

Makes the Linux shell you found yourself in more user friendly
Shell
3
star
9

website-watcher

Watch websites, get notifications
Go
2
star
10

jasypt-ui

A minimal UI for Jasypt written in Scala using ScalaFX
Scala
2
star
11

scoop_nvidia_gpu_exporter

Scoop bucket of the nvidia_gpu_exporter
1
star
12

talos-vagrant-libvirt

Running Talos Linux on Vagrant with libvirt
Shell
1
star
13

utkuozdemir.github.io

My personal website/blog
TeX
1
star
14

cowsay_fortune

Cowsay & Fortune script to run at bash login
Shell
1
star
15

torjava

Java
1
star
16

jenkins-with-docker

Docker package installed on the official Jenkins docker image
1
star
17

flingsolver

Java
1
star
18

homebrew-pv-migrate

Homebrew tap for pv-migrate
Ruby
1
star
19

imagecompare

Simple Image Comparison Tool
Java
1
star
20

awx-test

1
star
21

LossySourceCheckerTool

C#
1
star
22

sifre

CLI tool for password related operations
Go
1
star
23

spring-boot-kofu-example

An example project for Spring-(Ko)Fu
Kotlin
1
star
24

ajax-protobuf

Protocol Buffers client-server communication using Java and Javascript
JavaScript
1
star