Skip to content

Instantly share code, notes, and snippets.

@jkremser
Last active June 11, 2024 15:39
Show Gist options
  • Save jkremser/ac5044a3305fb4d057bd66af22683c3a to your computer and use it in GitHub Desktop.
Save jkremser/ac5044a3305fb4d057bd66af22683c3a to your computer and use it in GitHub Desktop.
k exec -ti deployments/psql -n kedify -c psql -- pg_dump --user dashboard-service-account@kedify-initial.iam --host 127.0.0.1 -d kedify --inserts > db.dump
psql --user postgres --host 127.0.0.1 -f db.dump
#docker cp db.dump 02a749fdba3a:.
#docker exec -ti 02a749fdba3a bash
#psql --user postgres --host 127.0.0.1 -f db.dump
# clusterId, agentId and cluster name
SELECT
clusters.name,
agents.id AS agentId,
clusters.id AS clusterId
FROM clusters JOIN agents
ON clusters.id = agents.cluster_id;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment