#!/usr/bin/env bash if [ $# -ne 1 ] then echo "Usage: $0 .sql" exit 1 fi file=$1 if [ ! -e $file ] then echo "file $file does not exist" exit 1 fi cat $file | kubectl exec -i svc/prod-umami-db-rw -c postgres -- psql app