- Access then tempest_production databases on PostgreSQL
root@opsman:~# su - postgres
postgres@opsman:~$ psql tempest_production
tempest_production=# \d
List of relations
Schema | Name | Type | Owner
--------+-----------------------------------------+----------+-------------
public | application_unlock_infos | table | tempest-web
public | application_unlock_infos_id_seq | sequence | tempest-web
public | ar_internal_metadata | table | tempest-web
public | certificates | table | tempest-web
public | certificates_id_seq | sequence | tempest-web
public | delayed_jobs | table | tempest-web
public | delayed_jobs_id_seq | sequence | tempest-web
public | disk_types | table | tempest-web
public | disk_types_id_seq | sequence | tempest-web
public | encryption_keys | table | tempest-web
public | encryption_keys_id_seq | sequence | tempest-web
public | installation_changes | table | tempest-web
public | installation_changes_id_seq | sequence | tempest-web
public | installation_logs | table | tempest-web
:
:
2. SSH into PKS UAA/API Server and Access MySQL DB
- Login to the PKS VM using the 'bosh ssh' command
$ bosh -e pks vms
:
Deployment 'pivotal-container-service-c64a8a8eeb4b61aa3ec6'
Instance Process State ...
pivotal-container-service/d747d87a-dd69-4f17-a49e-22a1d6bb0b13 running ...
:
$ bosh -e pks -d pivotal-container-service-c64a8a8eeb4b61aa3ec6 ssh pivotal-container-service/d747d87a-dd69-4f17-a49e-22a1d6bb0b13
Using environment '10.193.121.11' as user 'director' (bosh.*.read, openid, bosh.*.admin, bosh.read, bosh.admin)
Using deployment 'pivotal-container-service-c64a8a8eeb4b61aa3ec6'
:
:
pivotal-container-service/d747d87a-dd69-4f17-a49e-22a1d6bb0b13:~$
- Access MySQL DB
Get the MySQL root password from PKS tile -> Credentials -> Mysql Admin password
pivotal-container-service/d747d87a-dd69-4f17-a49e-22a1d6bb0b13:~$ mysql -h 127.0.0.1 -u root -p
Enter password: <mysql_admin_password>
MariaDB [(none)]> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
| pks |
| uaa |
+--------------------+
3. SSH into Kubernetes Master and Access etcd database- SSH into a Kubernetes master
$ bosh -e pks -d service-instance_8847255e-40e3-41ad-b141-e45ab0af62a9 ssh master/cabf6333-4f46-4ce6-939f-099f2c6b0d7c
Using environment '10.193.121.11' as user 'director' (bosh.*.read, openid, bosh.*.admin, bosh.read, bosh.admin)
Using deployment 'service-instance_8847255e-40e3-41ad-b141-e45ab0af62a9'
:
:
master/cabf6333-4f46-4ce6-939f-099f2c6b0d7c:~$ sudo -i
master/cabf6333-4f46-4ce6-939f-099f2c6b0d7c:~#
- Access etcd key-value datastore
#
# etcd has two API versions of v2 & v3 and their command usages are different.
#
- Access Flannel Configuration using API v2
** etcdctl/API v2 command usage - https://github.com/coreos/etcd/blob/master/etcdctl/READMEv2.md
# alias etcdctlv2='ETCDCTL_API=2 /var/vcap/packages/etcdctl/etcdctl --cert-file /var/vcap/jobs/etcd/config/certs/client.crt --key-file /var/vcap/jobs/etcd/config/certs/client.key --ca-file /var/vcap/jobs/etcd/config/certs/server-ca.crt --endpoints=https://master-0.etcd.cfcr.internal:4001';
# etcdctlv2 ls -r /
/coreos.com
/coreos.com/network
/coreos.com/network/config
/coreos.com/network/subnets
/coreos.com/network/subnets/10.200.4.0-24
/coreos.com/network/subnets/10.200.63.0-24
/coreos.com/network/subnets/10.200.56.0-24
/coreos.com/network/subnets/10.200.5.0-24
# etcdctlv2 get /coreos.com/network/config
{"Network":"10.200.0.0/16","Backend":{"Type":"vxlan"}}