podmigration-operator

command module
v0.0.0-...-2c421a0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 8, 2022 License: MIT Imports: 9 Imported by: 0

README

podmigration-operator

The document to init K8s cluster, which enables Podmigration, can be found at:

How to run:

(Run this command at directory podmigration-operator/)

  • To run Podmigration operator, which includes CRD and a custom controller:
$ sudo snap install kustomize
$ sudo apt-get install gcc
$ make manifests
$ make install
$ make run
  • To run api-server, which enables kubectl migrate command and GUI: (at podmigration-operator/ directory)
$ go run ./api-server/cmd/main.go
$ cd podmigration-operator/gui
$ npm install
$ npm run serve
Demo video:
  1. Migrate video streaming pod from node to node in single cluster:
  1. Migrate video streaming pod from cluster to cluster:

Test live-migrate pod:

  • Run/check video-stream application:
$ cd podmigration-operator/config/samples/migration-example
$ kubectl apply -f 2.yaml
$ kubectl get pods
There are three options to live-migrate a running Pod as following:
  1. Live-migrate video-stream application via api-server:
$ curl --request POST 'localhost:5000/Podmigrations' --header 'Content-Type: application/json' --data-raw '{"name":"test1", "replicas":1, "action":"live-migration", "sourcePod":"video", "destHost":"worker1"}'
$ curl --request GET 'localhost:5000/Podmigrations'
  1. Live-migrate video-stream application via kubectl apply:
$ kubectl apply -f test2.yaml
  1. Live-migrate video-stream application via kubectl migrate command:
$ kubectl migrate video worker1
  • To delete:
$ kubectl delete podmigration test2
$ kubectl delete -f test2.yaml

Note

This operator is controller of Kuberntes Pod migration for Kubernetes. It needs several changes to work such as: kubelet, container-runtime-cri (containerd-cri). The modified vesions of Kuberntes and containerd-cri beside this operator can be found in the following repos:

References

Workflow

alt text

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
api
v1
Package v1 contains API Schema definitions for the podmig v1 API group +kubebuilder:object:generate=true +groupName=podmig.dcn.ssu.ac.kr
Package v1 contains API Schema definitions for the podmig v1 API group +kubebuilder:object:generate=true +groupName=podmig.dcn.ssu.ac.kr
cmd

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL