Last active
October 6, 2023 09:06
-
-
Save revolunet/b609e1ce57d5958752ee4c44657ea7a6 to your computer and use it in GitHub Desktop.
k9s + cnpg config. https://github.com/derailed/k9s
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /Users/xxx/Library/Application Support/k9s/hotkey.yml | |
hotKey: | |
# Hitting Shift-0 navigates to your CNPG clusters | |
shift-Q: | |
shortCut: Shift-Q | |
description: Viewing CNPG clusters | |
command: postgresql.cnpg.io/v1/clusters |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# $XDG_CONFIG_HOME/k9s/plugin.yml : /Users/xxx/Library/Application Support/k9s/plugin.yml | |
plugin: | |
dive: # Use [dive](https://github.com/wagoodman/dive) to inspect docker image layers | |
shortCut: Shift-D | |
confirm: false | |
description: "Dive image" | |
scopes: | |
- containers | |
command: dive | |
background: false | |
args: | |
- $COL-IMAGE | |
cnpg-status: # Add CNPG status to clusters | |
shortCut: Shift-S | |
description: cnpg status | |
scopes: | |
- clusters | |
command: bash | |
background: false | |
args: | |
- -c | |
- "kubectl cnpg --context $CONTEXT -n $NAMESPACE status $NAME | less" | |
cnpg-backup: # Add CNPG backup to clusters | |
shortCut: Shift-B | |
description: cnpg backup | |
scopes: | |
- clusters | |
command: bash | |
background: false | |
args: | |
- -c | |
- "kubectl cnpg --context $CONTEXT -n $NAMESPACE backup $NAME | less" | |
cnpg-sup: # Add link to CNPG dashboard | |
shortCut: Shift-L | |
description: Grafana CNPG | |
scopes: | |
- clusters | |
command: open | |
background: false | |
args: | |
- "https://xxx/d/z7FCA4Nn1/cloudnativepg?orgId=1&refresh=30s&var-DS_PROMETHEUS=default&var-namespace=$NAMESPACE&var-cluster=$NAME&var-instances=All" | |
# Grafana Pods shortcuts | |
grafana-loki: | |
shortCut: Shift-K | |
description: Grafana loki | |
scopes: | |
- po | |
command: open | |
background: false | |
args: | |
- "https://xxx/explore?orgId=1&left=%7B%22datasource%22:%22pQ6DLUo7k%22,%22queries%22:%5B%7B%22refId%22:%22A%22,%22expr%22:%22%7Bnamespace%3D%5C%22$NAMESPACE%5C%22,%20pod%3D%5C%22$NAME%5C%22%7D%22,%22queryType%22:%22range%22,%22datasource%22:%7B%22type%22:%22loki%22,%22uid%22:%22pQ6DLUo7k%22%7D%7D%5D,%22range%22:%7B%22from%22:%22now-15m%22,%22to%22:%22now%22%7D%7D" | |
grafana-sup: | |
shortCut: Shift-L | |
description: Grafana supervision | |
scopes: | |
- po | |
- ns | |
command: open | |
background: false | |
args: | |
- "https://xxx/d/dRAC0MRIz/kubernetes-compute-resources-namespace-pods?orgId=1&refresh=10s&var-datasource=default&var-cluster=$CONTEXT&var-namespace=$NAMESPACE" | |
# pretty logs | |
pinologs: | |
shortCut: Ctrl-L | |
description: "logs (pretty)" | |
scopes: | |
- po | |
command: bash | |
args: | |
- "-i" | |
- "-c" | |
- "kubectl logs -f $NAME -n $NAMESPACE --context $CONTEXT | npx pino-pretty" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment