...
Code Block | ||
---|---|---|
| ||
ubuntu@ip-172-31-27-4:~$ sudo helm install --name pgstg stable/postgresql
NAME: pgstg
LAST DEPLOYED: Sat Apr 27 21:51:58 2019
NAMESPACE: default
STATUS: DEPLOYED
RESOURCES:
==> v1/Secret
NAME TYPE DATA AGE
pgstg-postgresql Opaque 1 0s
==> v1/Service
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
pgstg-postgresql-headless ClusterIP None <none> 5432/TCP 0s
pgstg-postgresql ClusterIP 10.43.163.107 <none> 5432/TCP 0s
==> v1beta2/StatefulSet
NAME DESIRED CURRENT AGE
pgstg-postgresql 1 1 0s
==> v1/Pod(related)
NAME READY STATUS RESTARTS AGE
pgstg-postgresql-0 0/1 Pending 0 0s
NOTES:
** Please be patient while the chart is being deployed **
PostgreSQL can be accessed via port 5432 on the following DNS name from within your cluster:
pgstg-postgresql.default.svc.cluster.local - Read/Write connection
To get the password for "postgres" run:
export POSTGRES_PASSWORD=$(kubectl get secret --namespace default pgstg-postgresql -o jsonpath="{.data.postgresql-password}" | base64 --decode)
To connect to your database run the following command:
kubectl run pgstg-postgresql-client --rm --tty -i --restart='Never' --namespace default --image docker.io/bitnami/postgresql:10.7.0 --env="PGPASSWORD=$POSTGRES_PASSWORD" --command -- psql --host pgstg-postgresql -U postgres
To connect to your database from outside the cluster execute the following commands:
kubectl port-forward --namespace default svc/pgstg-postgresql 5432:5432 &
PGPASSWORD="$POSTGRES_PASSWORD" psql --host 127.0.0.1 -U postgres
describe pod shows
Warning FailedScheduling 21s (x6 over 3m42s) default-scheduler pod has unbound immediate PersistentVolumeClaims
Workaround:
Modify underlying yaml files to use a persistent volume with ReadWriteMany access |
Backup
Restore
Gerrit
Config Jobs
...
Code Block | ||
---|---|---|
| ||
verified git clone ssh://admin@gerrit2.ons.zone:29418/test.git remote: Counting objects: 2, done git clone admin@gerrit2.ons.zone:29418/test.git admin@gerrit2.ons.zone: Permission denied (publickey). verified on gerrit3 to 2 host ubuntu@ip-172-31-31-191:~$ git clone ssh://admin@gerrit2.ons.zone:29418/replicate.git Cloning into 'replicate'... verified admin user ubuntu@ip-172-31-31-191:~$ ssh -p 29418 admin@gerrit2.ons.zone Warning: Permanently added '[gerrit2.ons.zone]:29418,[3.17.20.86]:29418' (RSA) to the list of known hosts. Hi Administrator, you have successfully connected over SSH. |
...