https://github.com/zwwhdls/kubeservicemanager
A Multiple-Kubernetes-Cluster manager
https://github.com/zwwhdls/kubeservicemanager
crd kubernetes kubernetes-cluster management multiple-cluster
Last synced: 26 days ago
JSON representation
A Multiple-Kubernetes-Cluster manager
- Host: GitHub
- URL: https://github.com/zwwhdls/kubeservicemanager
- Owner: zwwhdls
- Created: 2019-07-31T03:31:47.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2023-02-16T10:33:22.000Z (over 3 years ago)
- Last Synced: 2025-01-23T20:36:24.248Z (over 1 year ago)
- Topics: crd, kubernetes, kubernetes-cluster, management, multiple-cluster
- Language: Python
- Homepage:
- Size: 17.8 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# KubeServiceManager
KubeServiceManager is a Multiple-Kubernetes-Cluster manager, work together with [KubeService](https://github.com/Coderhypo/KubeService).

# What is KubeServiceManager?
When deploying app in Multiple Kubernetes Cluster, what you need to do is just to select target cluster in you app, and then apply it in whichever cluster. KubeServiceManager do the rest for you.
KubeServiceManager will deploy app and microservice in all clusters, but only the deployment in the corresponding cluster.
# How does KubeServiceManager work?
When an app is deployed in one cluster, the cluster sends a webhook to KubeServiceManager. Then KubeServiceManager will call api to create or update app in other clusters. KubeService itself decides which deployment in microservice is belonged to itself and deploy it.

# App demo
```yaml
apiVersion: app.o0w0o.cn/v1
kind: App
metadata:
name: voting-sample
spec:
microServices:
- name: voting-web
spec:
clusterName: desktop
loadBalance:
service:
name: voting-web
spec:
ports:
- protocol: TCP
port: 80
targetPort: 80
ingress:
name: voting-web
spec:
rules:
- host: voting.o0w0o.cn
http:
paths:
- path: /
backend:
serviceName: voting-web
servicePort: 80
versions:
- name: v1
template:
replicas: 2
selector:
matchLabels:
app: voting-web
template:
metadata:
labels:
app: voting-web
spec:
containers:
- image: daocloud.io/w0v0w/voting-demo-voting:v1
name: voting-web
- name: v2
canary:
weight: 30
template:
replicas: 1
selector:
matchLabels:
app: voting-web-for-kid
template:
metadata:
labels:
app: voting-web-for-kid
spec:
containers:
- image: daocloud.io/w0v0w/voting-demo-voting:v2
name: voting-web-for-kid
currentVersionName: v1
- name: voting-result
spec:
clusterName: minikube
loadBalance:
service:
name: voting-result
spec:
ports:
- protocol: TCP
port: 80
targetPort: 80
ingress:
name: voting-result
spec:
rules:
- host: result.voting.o0w0o.cn
http:
paths:
- path: /
backend:
serviceName: voting-result
servicePort: 80
versions:
- name: v1
template:
replicas: 1
selector:
matchLabels:
app: voting-result
template:
metadata:
labels:
app: voting-result
spec:
containers:
- image: daocloud.io/w0v0w/voting-demo-result:v1
name: voting-result
currentVersionName: v1
```