#!/bin/bash set -e SUBJECT=$1 PGPASSWORD=$2 PASSWORD=$(openssl rand -hex 20) ID=$(openssl rand -hex 5) kubectl run "postgres-client-$ID" --rm -i --image "bitnami/postgresql" -n postgres --env="PGPASSWORD=$PGPASSWORD" --command -- psql --host postgres-postgresql -U postgres <