# Move/add to $XDG_CONFIG_HOME/k9s/plugins.yaml # Requires the cnp kubectl plugin. See https://cloudnative-pg.io/documentation/current/kubectl-plugin/ # # Cluster actions: # b Request a new physical backup # h View hibernate status # Shift-H Hibernate cluster (this retains the data, but deletes everything else - including the cluster) # l View cluster logs # p Connect to the cluster via psql # r Reload the cluster # Shift-R Restart the cluster # s View cluster status # Shift-S View cluster status in verbose mode # # Namespace actions: # Shift-H Wake up Hibernated cluster in this namespace (assumes cluster name equals namespace name) plugins: postgresql-operator-backup: shortCut: b description: Backup scopes: - cluster command: bash confirm: true background: false args: - -c - "kubectl cnp backup $NAME -n $NAMESPACE --context \"$CONTEXT\" |& less -R" postgresql-operator-hibernate-status: shortCut: h description: Hibernate status scopes: - cluster command: bash background: false args: - -c - "kubectl cnp hibernate status $NAME -n $NAMESPACE --context \"$CONTEXT\" |& less -R" postgresql-operator-hibernate: shortCut: Shift-H description: Hibernate confirm: true scopes: - cluster command: bash background: false args: - -c - "kubectl cnp hibernate on $NAME -n $NAMESPACE --context \"$CONTEXT\" |& less -R" postgresql-operator-hibernate-off: shortCut: Shift-H description: Wake up hibernated cluster in this namespace confirm: true scopes: - namespace command: bash background: false args: - -c - "kubectl cnp hibernate off $NAME -n $NAME --context \"$CONTEXT\" |& less -R" postgresql-operator-logs: shortCut: l description: Logs scopes: - cluster command: bash background: false args: - -c - "kubectl cnp logs cluster $NAME -f -n $NAMESPACE --context $CONTEXT" postgresql-operator-psql: shortCut: p description: PSQL shell scopes: - cluster command: bash background: false args: - -c - "kubectl cnp psql $NAME -n $NAMESPACE --context $CONTEXT" postgresql-operator-reload: shortCut: r description: Reload confirm: true scopes: - cluster command: bash background: false args: - -c - "kubectl cnp reload $NAME -n $NAMESPACE --context \"$CONTEXT\" |& less -R" postgresql-operator-restart: shortCut: Shift-R description: Restart confirm: true scopes: - cluster command: bash background: false args: - -c - "kubectl cnp restart $NAME -n $NAMESPACE --context \"$CONTEXT\" |& less -R" postgresql-operator-status: shortCut: s description: Status scopes: - cluster command: bash background: false args: - -c - "kubectl cnp status $NAME -n $NAMESPACE --context \"$CONTEXT\" |& less -R" postgresql-operator-status-verbose: shortCut: Shift-S description: Status (verbose) scopes: - cluster command: bash background: false args: - -c - "kubectl cnp status $NAME -n $NAMESPACE --context \"$CONTEXT\" --verbose |& less -R"