Skip to content

weibaohui/k8sLeaderElection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

编译

make

安装

kubectl apply -f deployment.yaml

开启三个副本, 只有一个副本执行leader的逻辑。

1

开启一个terminal 执行 go run main.go --kubeconfig=$HOME/.kube/config

2

开启一个terminal 执行 go run main.go --kubeconfig=$HOME/.kube/config

3

开启一个terminal 执行 go run main.go --kubeconfig=$HOME/.kube/config

About

k8s机制下的多副本程序选举

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published