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
Copy file name to clipboardExpand all lines: advocacy_docs/kubernetes/cloud_native_postgresql/interactive_demo.mdx
+82-17
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
---
2
-
title: "Installation, Configuration and Demployment Demo"
2
+
title: "Installation, Configuration and Deployment Demo"
3
3
description: "Walk through the process of installing, configuring and deploying the Cloud Native PostgreSQL Operator via a browser-hosted Minikube console"
4
4
navTitle: Install, Configure, Deploy
5
5
product: 'Cloud Native PostgreSQL Operator'
@@ -21,6 +21,7 @@ Want to see what it takes to get the Cloud Native PostgreSQL Operator up and run
21
21
1. Installing the Cloud Native PostgreSQL Operator
22
22
2. Deploying a three-node PostgreSQL cluster
23
23
3. Installing and using the kubectl-cnp plugin
24
+
4. Testing failover to verify the resilience of the cluster
24
25
25
26
It will take roughly 5-10 minutes to work through.
26
27
@@ -64,7 +65,7 @@ You will see one node called `minikube`. If the status isn't yet "Ready", wait f
64
65
Now that the Minikube cluster is running, you can proceed with Cloud Native PostgreSQL installation as described in the ["Installation"](installation.md) section:
cluster-example-1 0/50000606955855494195015697 ✓ ✗ ✗ ✗ OK
269
+
cluster-example-2 0/5000060 0/50000606955855494195015697 ✗ ✓ ✗ ✗ OK
270
+
cluster-example-3 0/5000060 0/50000606955855494195015697 ✗ ✓ ✗ ✗ OK
264
271
```
265
272
266
273
!!! Note "There's more"
267
274
See [the Cloud Native PostgreSQL Plugin page](cnp-plugin/) for more commands and options.
268
275
276
+
## Testing failover
277
+
278
+
As our status checks show, we're running two replicas - if something happens to the primary instance of PostgreSQL, the cluster will fail over to one of them. Let's demonstrate this by killing the primary pod:
279
+
280
+
```shell
281
+
kubectl delete pod --wait=false cluster-example-1
282
+
__OUTPUT__
283
+
pod "cluster-example-1" deleted
284
+
```
285
+
286
+
This simulates a hard shutdown of the server - a scenario where something has gone wrong.
cluster-example-1 - - - - - - - - unable to upgrade connection: container not found ("postgres") -
304
+
cluster-example-2 0/7000230 6955855494195015697 ✓ ✗ ✗ ✗ OK
305
+
cluster-example-3 0/70000A0 0/70000A0 6955855494195015697 ✗ ✓ ✗ ✗ OK
306
+
```
307
+
308
+
...the failover process has begun, with the second pod promoted to primary. Once the failed pod has restarted, it will become a replica of the new primary:
cluster-example-1 0/7004268 0/7004268 6955855494195015697 ✗ ✓ ✗ ✗ OK
325
+
cluster-example-2 0/7004268 6955855494195015697 ✓ ✗ ✗ ✗ OK
326
+
cluster-example-3 0/7004268 0/7004268 6955855494195015697 ✗ ✓ ✗ ✗ OK
327
+
```
328
+
269
329
270
330
### Further reading
271
331
272
332
This is all it takes to get a PostgreSQL cluster up and running, but of course there's a lot more possible - and certainly much more that is prudent before you should ever deploy in a production environment!
273
333
274
-
- For information on using the Cloud Native PostgreSQL Operator to deploy on public cloud platforms, see the [Cloud Setup](cloud_setup/) section.
334
+
- Deploying on public cloud platforms: see the [Cloud Setup](cloud_setup/) section.
335
+
336
+
- Design goals and possibilities offered by the Cloud Native PostgreSQL Operator: check out the [Architecture](architecture/) and [Use cases](use_cases/) sections.
337
+
338
+
- Configuring a secure and reliable system: read through the [Security](security/), [Failure Modes](failure_modes/) and [Backup and Recovery](backup_recovery/) sections.
-For the design goals and possibilities offered by the Cloud Native PostgreSQL Operator, check out the [Architecture](architecture/) and [Use cases](use_cases/) sections.
342
+
-Development: [Leonardo Cecchi writes about setting up a local environment using Cloud Native PostgreSQL for application development](https://www.enterprisedb.com/blog/cloud-native-postgresql-application-developers)
277
343
278
-
- And for details on what it takes to configure a secure and reliable system, read through the [Security](security/), [Failure Modes](failure_modes/) and [Backup and Recovery](backup_recovery/) sections.
0 commit comments