# Expose and verify

expose the database

```
$ oc expose deploy creditdb --port=5432 --target-port=5432 --type=LoadBalancer --name my-pg-svc
```

to find the external ip address of the database

```
oc get svc
```

copy the external ip address of the my-pg-svc service and connect to it. password is `postgres`

```
docker run -it --rm postgres psql -h <ip> -U postgres
```

verify database tables

```
\c example
\dt *.
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://ibm-developer.gitbook.io/digital-developer-conference-hybrid-cloud/operator-workshop/lab2/lab2_expose.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
