Install Piraeus Operator v2¶
After removing the Piraeus Operator v1 deployment, you can install Piraeus Operator v2.
You can either use the kubectl
method to deploy Piraeus Operator, or alternatively deploy the Operator using Helm.
This is the last step when migrating Piraeus Operator from version 1 (v1) to version 2 (v2). Click here to get back to the overview.
Prerequisites¶
Deploy Piraeus Operator v2 Using kubectl
¶
You can use kubectl
and the built-in kustomize
feature to deploy Piraeus Operator v2.
First, create a file named kustomization.yaml
, referencing the latest Piraeus Operator release, and the
namespace you which to deploy the Piraeus Operator in. The latest releases are available on the release page.
In the example below, the version is v2.3.0
, and the namespace is piraeus-datastore
.
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- https://github.com/piraeusdatastore/piraeus-operator//config/default?ref=v2.3.0 # Change the version here
namespace: piraeus-datastore # Change the namespace here
Then, deploy the Operator using kubectl
and wait for the deployment to complete:
$ kubectl apply -k . --server-side
$ kubectl rollout status -n piraeus-datastore -w deploy/piraeus-operator-controller-manager
Deploy Piraeus Operator v2 Using Helm¶
To deploy Piraeus Operator v2 using Helm, clone the latest v2 release of Piraeus. The latest releases are available on the release page.
To also install the necessary Custom Resource Definitions for Piraeus, set installCRDs
to true
.
$ git clone -b v2.3.0 https://github.com/piraeusdatastore/piraeus-operator.git
$ cd piraeus-operator
$ helm install piraeus-operator charts/piraeus --set installCRDs=true
Deploy the Piraeus Datastore Cluster¶
Once the Operator is deployed, deploy the Cluster using the generated resources from step 2.
First, create the secret used for the LINSTOR passphrase collected at the end of step 2.
$ cat <<-EOF | kubectl apply -f - --server-side
apiVersion: v1
kind: Secret
metadata:
name: piraeus-op-passphrase
namespace: piraeus-datastore # Change the namespace here
data:
MASTER_PASSPHRASE: ZVRxanl1cVBscXV1ZTk1cmEwVTk5b0ptd0F4OGFmWlVPUVA0NWNnUw==
EOF
Then, apply the resource generated by the script from step 2:
$ kubectl apply -f v2-resources.yaml --server-side
linstorcluster.piraeus.io/linstorcluster created
linstorsatelliteconfiguration.piraeus.io/host-networking created
linstorsatelliteconfiguration.piraeus.io/piraeus-op-ns created
Now the cluster will come up, using the existing data to restore the cluster state.
Verifying Cluster State¶
You can check the Cluster state by using the linstor
command line client:
$ kubectl exec deploy/linstor-controller -- linstor node list
$ kubectl exec deploy/linstor-controller -- linstor storage-pool list
$ kubectl exec deploy/linstor-controller -- linstor resource list-volumes
$ kubectl exec deploy/linstor-controller -- linstor error-reports list
You can also provision new volumes, to verify that the cluster is operational.