@@ -3,11 +3,15 @@ title: pgo show user
33---
44## pgo show user
55
6- Show pguser Secret details for a PostgresCluster.
6+ Show details for a PostgresCluster user .
77
88### Synopsis
99
10- Show pguser Secret details for a PostgresCluster.
10+ Show details for a PostgresCluster user. Only shows
11+ details for the default user for a PostgresCluster
12+ or for users defined on the PostgresCluster spec.
13+ Use the "--show-connection-info" flag to get the
14+ connection info, including password.
1115
1216#### RBAC Requirements
1317 Resources Verbs
@@ -17,35 +21,46 @@ Show pguser Secret details for a PostgresCluster.
1721### Usage
1822
1923```
20- pgo show user CLUSTER_NAME [flags]
24+ pgo show user USER_NAME --cluster CLUSTER_NAME [flags]
2125```
2226
2327### Examples
2428
2529```
26- # Show non-sensitive contents of 'pguser' Secret
27- pgo show user hippo
30+ # Show non-sensitive contents of users for "hippo" cluster
31+ pgo show user --cluster hippo
2832
29- # Show contents of 'pguser' Secret, including sensitive fields
30- pgo show user hippo --show-sensitive-fields
33+ # Show non-sensitive contents of user "rhino" for "hippo" cluster
34+ pgo show user rhino --cluster hippo
35+
36+ # Show connection info for user "rhino" for "hippo" cluster,
37+ # including sensitive password info
38+ pgo show user rhino --cluster hippo --show-connection-info
3139
3240```
3341### Example output
3442```
35- pgo show user hippo
36- SECRET: hippo-pguser-hippo
37- DBNAME: hippo
38- HOST: hippo-primary.postgres-operator.svc
39- PORT: 5432
40- USER: hippo
41-
43+ # Showing all the users of the "hippo" cluster
44+ CLUSTER USERNAME
45+ hippo hippo
46+ hippo rhino
47+
48+ # Showing the connection info for user "hippo" of cluster "hippo"
49+ WARNING: This command will show sensitive password information.
50+ Are you sure you want to continue? (yes/no): yes
51+
52+ Connection information for hippo for hippo cluster
53+ Connection info string:
54+ dbname=hippo host=hippo-primary.postgres-operator.svc port=5432 user=hippo password=<password>
55+ Connection URL:
56+ postgres://<password>@hippo-primary.postgres-operator.svc:5432/hippo
4257```
4358
4459### Options
4560
4661```
47- -h, --help help for user
48- -f, --show-sensitive-fields show sensitive user fields
62+ -h, --help help for user
63+ --show-connection-info show sensitive user fields
4964```
5065
5166### Options inherited from parent commands
0 commit comments