Skip to content

Instantly share code, notes, and snippets.

@benlangfeld
Created January 31, 2022 16:08
Show Gist options
  • Save benlangfeld/90b752c085bbaba784e288061ec52c52 to your computer and use it in GitHub Desktop.
Save benlangfeld/90b752c085bbaba784e288061ec52c52 to your computer and use it in GitHub Desktop.
To get the ability to quickly pause and unpause PXC clusters running on Kubernetes using the k9s terminal GUI, place the following file at the configuration directory reported by `k9s info`.
plugin:
pxc_pause:
shortCut: p
confirm: true
description: Pause cluster
scopes:
- perconaxtradbclusters
command: kubectl
background: false
args:
- --context
- $CONTEXT
- --namespace
- $NAMESPACE
- patch
- $RESOURCE_NAME
- $NAME
- --type
- merge
- --patch
- '{"spec": {"pause": false}}'
pxc_resume:
shortCut: r
confirm: true
description: Resume cluster
scopes:
- perconaxtradbclusters
command: kubectl
background: false
args:
- --context
- $CONTEXT
- --namespace
- $NAMESPACE
- patch
- $RESOURCE_NAME
- $NAME
- --type
- merge
- --patch
- '{"spec": {"pause": false}}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment