GithubHelp home page GithubHelp logo

kube move logo

Go Report Card Build Status CII Best Practices

Overview

Workloads running on Kubernetes do not make assumptions about the underlying infrastructure. However, it is still non-trivial to move them across different clusters. It is also non trivial to move them to another namespace within the same cluster scope such as to a different zone. KubeMove provides a set of tools and API to coordinate the orchestration and workflow of moving an application in production across cluster or namespace boundaries.

Architecture/Design proposal

The initial KEP (KubeMove Enhancement Proposal) is at KEP-1

Join the discussion through the issue here

Using Kubemove

  • Install kubemove using helm - helm install kubemove.io/kubemove
  • Annotate the application to be moved with kubemove.io/kubemove.enable="true"
  • Use MoveEngine API with the required configuration to start the data movement or sync
  • Wait for the movement or datasync to complete and switch the application on the target cluster using MoveSwitch API

CLI

Example move commands:

kubectl km move init <app> <kubemove-template.yaml>

kubectl km status <movepair-cr>

kubectl km move switch <movepair>

Use cases

  • Hybrid and multi-cloud deployments - Move applications on-prem to cloud or vice-versa or from cloud-cloud
  • Onramp to Kubernetes - KubeMove can help migrate the data from legacy volumes onto Kubernetes
  • Kubernetes and/or application upgrades - Applications may need to be moved back and forth while following blue green strategy

Developer Guide

Kubemove uses Makefile based build process. This section will give you an overview on how to build and deploy Kubemove resources.

Setup Environment

Setup your development environment by the following steps.

  • Use your own docker account for the docker images:
export REGISTRY=<your docker username>
  • For AWS ECR
export REGISTRY=<accountid>.dkr.ecr.<Region>.amazonaws.com
  • Changes in build/push

    Replace this sudo docker login "${REGISTRY}" -u "${DNAME}" -p "${DPASS}"; with aws ecr get-login-password --region <Region> | docker login --username AWS --password-stdin "${REGISTRY}"

  • Build a developer image with all dependencies:

make dev-image

Code Generation

If you update any API or any gRPC protos, then generate respective codes by the following steps.

  • Generate gRPC codes:
make gen-grpc
  • Generate CRDs and respective codes.
make gen-crds
  • Update respective controllers
make gen-k8s

Alternatively, you can run the following command that will run all the previous code generation commands.

make gen

Build the Binaries and Docker Images

If you update any codes, then re-build the project and the respective docker images.

  • Run gofmt
make format
  • Run linter
make lint
  • Build binaries
make build
  • Build docker images
make images
  • Push docker images
make deploy-images

Deploy Kubemove

At first, create two different clusters. Make sure KUBECONFIG environment variable is pointing to the right cluster config file.

  • Specify the source cluster, and the destination cluster
export SRC_CONTEXT=<source cluster context>
export DST_CONTEXT=<destination cluster context>
  • Register the Kubemove CRDs
make register_crds
  • Create the RBAC resources
make create_rbac_resources
  • Deploy MovePair controller
make deploy_mp_ctrl
  • Deploy MoveEngine controller
make deploy_me_ctrl
  • Deploy DataSync controller
make deploy_ds_ctrl

You can also install all the Kubemove resources by using the following command:

make deploy_kubemove

If you are using two local kind cluster, you can create a MovePair using the following command:

make create_local_mp

Removing Kubemove

You can uninstall/remove all Kubemove resources created in the deploy section just by replacing deploy,create, or register word of the respective command with remove. For example:

make remove_mp_ctrl

Alternatively, you can use the following command to remove all the Kubemove resources created in the clusters using the following command,

make purge_kubemove

License

KubeMove is developed under Apache 2.0 license.

Contributing

We welcome participation from the community in defining more use cases, developing API spec and implementation. Please write new issues as you like.

If you would like to know the ongoing work and its status, you can join us at status meeting that happens every Monday / Wednesday / Friday at 2.30 PM IST.

Minutes of meeting are captured in this doc

kubemove's Projects

kubemove icon kubemove

Facilitate workloads movement across namespaces and providers

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.