|
| 1 | +--- |
| 2 | +sidebar_position: 4 |
| 3 | +--- |
| 4 | + |
| 5 | +# Installation |
| 6 | + |
| 7 | +**IMPORTANT NOTES:** |
| 8 | + |
| 9 | +1. The plugin **must** be installed in the same namespace where the operator is |
| 10 | + installed (typically `cnpg-system`). |
| 11 | + |
| 12 | +2. Be aware that the operator's **listening namespaces** may differ from its |
| 13 | + installation namespace. Ensure you verify this distinction to avoid |
| 14 | + configuration issues. |
| 15 | + |
| 16 | +Here’s an enhanced version of your instructions for verifying the prerequisites: |
| 17 | + |
| 18 | +## Step 1 - Verify the Prerequisites |
| 19 | + |
| 20 | +If CloudNativePG is installed in the default `cnpg-system` namespace, verify its version using the following command: |
| 21 | + |
| 22 | +```sh |
| 23 | +kubectl get deployment -n cnpg-system cnpg-controller-manager -o yaml \ |
| 24 | + | grep ghcr.io/cloudnative-pg/cloudnative-pg |
| 25 | +``` |
| 26 | + |
| 27 | +Example output: |
| 28 | + |
| 29 | +```output |
| 30 | +image: ghcr.io/cloudnative-pg/cloudnative-pg:1.26.0 |
| 31 | +``` |
| 32 | + |
| 33 | +Ensure that the version displayed is **1.26** or newer. |
| 34 | + |
| 35 | +Then, use the [cmctl](https://cert-manager.io/docs/reference/cmctl/#installation) |
| 36 | +tool to confirm that `cert-manager` is correctly installed: |
| 37 | + |
| 38 | +```sh |
| 39 | +cmctl check api |
| 40 | +``` |
| 41 | + |
| 42 | +Example output: |
| 43 | + |
| 44 | +```output |
| 45 | +The cert-manager API is ready |
| 46 | +``` |
| 47 | + |
| 48 | +Both checks are necessary to proceed with the installation. |
| 49 | + |
| 50 | +## Step 2 - Install the barman-cloud Plugin |
| 51 | + |
| 52 | +Use `kubectl` to apply the manifest for the latest commit in the `main` branch: |
| 53 | + |
| 54 | +<!-- x-release-please-start-version --> |
| 55 | +```sh |
| 56 | +kubectl apply -f \ |
| 57 | + https://github.com/cloudnative-pg/plugin-barman-cloud/releases/download/v0.3.0/manifest.yaml |
| 58 | +``` |
| 59 | +<!-- x-release-please-end --> |
| 60 | + |
| 61 | +Example output: |
| 62 | + |
| 63 | +```output |
| 64 | +customresourcedefinition.apiextensions.k8s.io/objectstores.barmancloud.cnpg.io created |
| 65 | +serviceaccount/plugin-barman-cloud created |
| 66 | +role.rbac.authorization.k8s.io/leader-election-role created |
| 67 | +clusterrole.rbac.authorization.k8s.io/metrics-auth-role created |
| 68 | +clusterrole.rbac.authorization.k8s.io/metrics-reader created |
| 69 | +clusterrole.rbac.authorization.k8s.io/objectstore-editor-role created |
| 70 | +clusterrole.rbac.authorization.k8s.io/objectstore-viewer-role created |
| 71 | +clusterrole.rbac.authorization.k8s.io/plugin-barman-cloud created |
| 72 | +rolebinding.rbac.authorization.k8s.io/leader-election-rolebinding created |
| 73 | +clusterrolebinding.rbac.authorization.k8s.io/metrics-auth-rolebinding created |
| 74 | +clusterrolebinding.rbac.authorization.k8s.io/plugin-barman-cloud-binding created |
| 75 | +secret/plugin-barman-cloud-8tfddg42gf created |
| 76 | +service/barman-cloud created |
| 77 | +deployment.apps/barman-cloud configured |
| 78 | +certificate.cert-manager.io/barman-cloud-client created |
| 79 | +certificate.cert-manager.io/barman-cloud-server created |
| 80 | +issuer.cert-manager.io/selfsigned-issuer created |
| 81 | +``` |
| 82 | + |
| 83 | +After these steps, the plugin will be successfully installed. Make sure it is |
| 84 | +ready to use by checking the deployment status as follows: |
| 85 | + |
| 86 | +```sh |
| 87 | +kubectl rollout status deployment \ |
| 88 | + -n cnpg-system barman-cloud |
| 89 | +``` |
| 90 | + |
| 91 | +Example output: |
| 92 | + |
| 93 | +```output |
| 94 | +deployment "barman-cloud" successfully rolled out |
| 95 | +``` |
| 96 | + |
| 97 | +This confirms that the plugin is deployed and operational. |
0 commit comments