Prerequisites¶
You must have the following key components in place before you can install MSR using the online method: a Kubernetes platform, cert-manager, the Postgres Operator, RethinkDB Operator, and MSR Operator.
Prepare your Kubernetes environment¶
Install and configure your Kubernetes distribution.
Ensure that the default StorageClass on your cluster supports the dynamic provisioning of volumes. If necessary, refer to the Kubernetes documentation Change the default StorageClass.
If no default StorageClass is set, you can specify a StorageClass for MSR to use by providing the following additional parameters to the custom resource manifest:
spec: registry: storage: persistentVolume: storageClassName: '<my-storageclass>' postgresql: volume: storageClass: '<my-storageclass>' rethinkdb: cluster: persistentVolume: storageClass: '<my-storageclass>'
The first of these three parameters is only applicable when you install MSR with a persistentVolume back end, the default setting:
spec: registry: storage: backend: 'persistentVolume'
MSR creates PersistentVolumeClaims with either the
ReadWriteOnce
or theReadWriteMany
access modes, depending on the purpose for which they are created. Thus the StorageClass provisioner that MSR uses must be able to provision PersistentVolumes with at least theReadWriteOnce
andReadWriteMany
access modes.The
<release-name>
PVC is created by default with theReadWriteMany
access mode. If you choose to install MSR with a persistentVolume back end, you can override this default access mode by adding the following parameter to the custom resource manifest:spec: registry: storage: persistentVolume: accessModes: ['<new-access-mode>']
Install cert-manager¶
Important
The cert-manager version must be 1.7.2 or later.
Run the following helm install command:
helm repo add jetstack https://charts.jetstack.io helm repo update helm install cert-manager jetstack/cert-manager \ --version 1.7.2 \ --set installCRDs=true
Verify that cert-manager is in the
Running
state:kubectl get pods
If any of the cert-manager Pods are not in the
Running
state, run kubectl describe on each Pod:kubectl describe <cert-manager-pod-name>
Note
To troubleshoot the issues that present in the kubectl describe command output, refer to Troubleshooting in the official cert-manager documentation.
Install Postgres Operator¶
Important
The Postgres Operator version must be 1.9.0 or later. 1
Run the following helm install command, including
spilo_*
parameters:helm repo add postgres-operator \ https://opensource.zalando.com/postgres-operator/charts/postgres-operator/ helm repo update helm install postgres-operator postgres-operator/postgres-operator \ --version <version> \ --set configKubernetes.spilo_runasuser=101 \ --set configKubernetes.spilo_runasgroup=103 \ --set configKubernetes.spilo_fsgroup=103
Verify that Postgres Operator is in the
Running
state:kubectl get pods
To troubleshoot a failing Postgres Operator Pod, run the following command:
kubectl describe <postgres-operator-pod-name>
Review the Pod logs for more detailed results:
kubectl logs <postgres-operator-pod-name>
Note
By default, MSR uses the persistent volume claims detailed in Volumes.
If you have a pre-existing PersistentVolume that contains image blob data that you intend to use with a new instance of MSR, you can add the following to the MSR custom resource manifest to provide the new instance with the name of the associated PersistentVolumeClaim:
spec:
registry:
storage:
backend: 'persistentVolume'
persistentVolume:
existingClaim: '<pre-existing-msr-pvc>'
This setting indicates the <release-name> PVC referred to in volumes.
Install RethinkDB Operator¶
Run the helm install command:
helm repo add rethinkdb-operator https://registry.mirantis.com/charts/rethinkdb/rethinkdb-operator/ helm repo update helm install rethinkdb-operator rethinkdb-operator/rethinkdb-operator \ --version 1.0.0
Verify that RethinkDB Operator is in the
Running
state:kubectl get pods
The RethinkDB Operator Pod name begins with
rethinkdb-operator-controller-manager
.To troubleshoot a failing RethinkDB Operator Pod, run the following command:
kubectl describe <rethinkdb-operator-pod-name>
Review the Pod logs for more detailed results:
kubectl logs <rethinkdb-operator-pod-name>
Install MSR Operator¶
Download the msr-operator YAML file by clicking
msr-operator.yaml
.Install the MSR Operator:
kubectl apply --server-side=true -f msr-operator.yaml
Verify that the MSR Operator Pod is in the
Running
state:kubectl get pods
The MSR Operator Pod name begins with
msr-operator-controller-manager
.To troubleshoot a failing MSR Operator Pod, run the following command:
kubectl describe <msr-operator-pod-name>
Review the Pod logs for more detailed results:
kubectl logs <msr-operator-pod-name>
- 1
Postgres Operator up through 1.8.2 uses the
PodDisruptionBudget policy/v1beta1
Kubernetes API, which is no longer served as of Kubernetes 1.25. As such, various features of MSR may not function properly if Postgres Operator 1.8.2 or earlier is installed alongside MSR on Kube v1.25 or later.
See also
Helm official documentation: Helm Install