Skip to content

Add a cncluster psql #2217

@martinflorian-da

Description

@martinflorian-da

It is becoming more frequent that we need to open psql shells to databases on clusters.

The steps are roughly:

  • inspect the app/Canton deployment that uses the databases, copy IP and database name from there; example kubectl describe pod -n sv-8 -l app=global-domain-6-sequencer | grep -i psql
  • inspect the k8s secret that said deployment uses for the postgres password; example kubectl get secret -n sv-8 sequencer-6-pg-secrets -o jsonpath={.data.postgresPassword} | base64 -d
  • open a cncluster debug_shell and psql from there
  • (optional) do SET search_path <target_schema> for a nicer UX

We could automate this process via adding a nice cncluster command.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions