command
module
Version:
v0.0.0-...-e862562
Opens a new window with list of versions in this module.
Published: Dec 21, 2021
License: MIT
Opens a new window with license information.
Imports: 12
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
k8s-leader-election
Leader election example leveraging the leaderelection pkg from the k8s client.
Usage
- Create a k3d cluster:
make cluster
- Deploy the leader-election app:
make deploy
- Get the current lease holder:
kubectl get lease leader-election -o=jsonpath='{.spec.holderIdentity}'
- Kill the current lease holder:
kubectl delete pod $(kubectl get lease leader-election -o=jsonpath='{.spec.holderIdentity}')
- After waiting the
leaseDuration
period (60s
) a new leader will be elected.
License
MIT
Documentation
¶
There is no documentation for this package.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.