Skip to content

Tool for performing power maintenance on stateful Kubernetes clusters

License

Notifications You must be signed in to change notification settings

ianunruh/kube-power

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

kube-power

Tool for gracefully performing power maintenance on Kubernetes clusters that rely on Rook-based Ceph storage.

Features

  • Identifies any Deployments and StatefulSets that use Rook-based storage and scales them to zero replicas
  • Stops Ceph components in specific order to ensure data integrity
  • Applies flags to the Ceph cluster to prevent unnecessary rebalancing
  • Waits for Ceph to become healthy before resuming workflows that rely on it

Usage

Argo Workflows

If Argo Workflows is available in your Kubernetes cluster and it does not rely on Rook-based Ceph storage to operate, then kube-power can be triggered by an operator from a WorkflowTemplate.

kubectl kustomize "https://github.com/ianunruh/kube-power.git/deploy/argo?ref=v1.0.1" | \
    kubectl apply -n kube-system -f-

Jobs

git clone https://github.com/ianunruh/kube-power.git
cd kube-power

# Edit job.yaml as needed for performing different steps
kubectl apply -k deploy/job

Locally

go install github.com/ianunruh/kube-power@v1.0.1
kube-power suspend
kube-power resume

kube-power phase SuspendOperators --dry-run

About

Tool for performing power maintenance on stateful Kubernetes clusters

Resources

License

Stars

Watchers

Forks

Packages