Kubernetes ¶
Using deployer-admin service account ¶
- Download the
letsplan-deployer.yamlattachment from theletsplan-deployer @ jarvus-live-clustersecret in BitWarden into your~/.kubedirectory -
Activate the downloaded
KUBECONFIGin your current terminal session:export KUBECONFIG=~/.kube/letsplan-deployer.yaml -
Get the name of the currently running pods and store them in shell variables:
APP_POD=$(kubectl get pod -l component=app -o jsonpath='{.items[0].metadata.name}') DB_POD=$(kubectl get pod -l component=database -o jsonpath='{.items[0].metadata.name}')
Open interactive app shell ¶
kubectl exec -it $APP_POD -- bash
Open interactive database shell ¶
kubectl exec -it $DB_POD -- psql -U admin laravel
Run an artisan command ¶
kubectl exec -it $APP_POD -- php artisan migrate
Run an SQL query ¶
echo 'SELECT * FROM users' | kubectl exec -i $DB_POD -- psql -U admin laravel
Forward PostgreSQL port ¶
kubectl port-forward pods/$DB_POD 5432:5432
Database logins
Default database credentials can be found in helm-chart/values.yaml