You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the example above, we provision 3 clusters that have a number appended
21
+
into their resulting cluster name, apply a user defined label to each
22
+
cluster, and also apply user defined policies to each cluster after
23
+
they are created.
24
+
14
25
You can then view that database as:
15
26
....
16
27
pgo show cluster mydatabase
@@ -78,6 +89,15 @@ This will create a new database called *restoredb* based on the
78
89
backup found in *mycluster-backups/2017-03-27-13-56-49* and the
79
90
secrets of the *mycluster* cluster.
80
91
92
+
Selectors can be used to perform backups as well, for example:
93
+
....
94
+
pgo backup --selector=project=xray
95
+
....
96
+
97
+
In this example, any cluster that matches the selector will cause
98
+
a backup job to be created.
99
+
100
+
81
101
== Cluster Removal
82
102
83
103
You can remove a cluster by running:
@@ -89,6 +109,15 @@ Note, that this command will not remove the PVC associated with
89
109
this cluster. If you want to remove the cluster's old data files,
90
110
you will need to remove it manually.
91
111
112
+
Selectors also apply to the delete command as follows:
113
+
....
114
+
pgo delete cluster --selector=project=xray
115
+
....
116
+
117
+
This command will cause any cluster matching the selector
118
+
to be removed.
119
+
120
+
92
121
== Cluster Replication
93
122
94
123
When you create a Cluster, you will see in the output a variety of Kubernetes objects were created including:
@@ -358,6 +387,40 @@ pgo user --expired=7
358
387
359
388
== User Management - Update Expired Passwords
360
389
390
+
To assign users to a cluster:
391
+
....
392
+
pgo user --add-user=user1 --valid-days=30 --managed --db=userdb --selector=name=xraydb1
393
+
....
394
+
395
+
In this example, a user named *user1* is created with a *valid until* password date set to expire in 30 days. That user will be granted access to the *userdb* database. This user account also will have an associated *secret* created to hold the password that was generated for this user. Any clusters that match the selector value will have this user created on it.
396
+
397
+
To change a user password:
398
+
....
399
+
pgo user --change-password=user1 --valid-days=10 --selector=name=xray1
400
+
....
401
+
402
+
In this example, a user named *user1* has its password changed to a generated
403
+
value and the *valid until* expiration date set to 10 days from now, this
404
+
command will take effect across all clusters that match the selector.
405
+
406
+
To drop a user:
407
+
....
408
+
pgo user --delete-user=user3 --selector=project=xray
409
+
....
410
+
411
+
To see which passwords are set to expire in a given number of days:
412
+
....
413
+
pgo user --expired=10 --selector=project=xray
414
+
....
415
+
416
+
To check password age:
417
+
....
418
+
pgo user --expired=10 --selector=project=xray
419
+
....
420
+
421
+
In this example, any clusters that match the selector are queried to see
422
+
if any users are set to expire in 10 days.
423
+
361
424
To update expired passwords in a cluster:
362
425
....
363
426
pgo user --update-passwords --selector=name=mycluster
@@ -368,6 +431,16 @@ The same command across all clusters:
368
431
pgo user --update-passwords
369
432
....
370
433
434
+
== Label Management
435
+
436
+
You can apply a user defined label to a cluster as follows:
0 commit comments