### Install Piraeus HA Controller with Helm Source: https://github.com/piraeusdatastore/helm-charts/blob/main/charts/piraeus-ha-controller/README.md Add the Piraeus Helm repository and install the HA controller. Ensure you have Helm v3 installed. ```bash helm repo add piraeus-charts https://piraeus.io/helm-charts/ helm install --create-namespace --namespace piraeus-ha-controller piraeus-ha-controller piraeus-charts/piraeus-ha-controller ``` -------------------------------- ### Install Snapshot Controller Helm Chart Source: https://github.com/piraeusdatastore/helm-charts/blob/main/charts/snapshot-controller/README.md Add the Piraeus Helm repository and install the snapshot-controller chart. This is the primary method for deploying the controller. ```bash helm repo add piraeus-charts https://piraeus.io/helm-charts/ helm install snapshot-controller piraeus-charts/snapshot-controller ``` -------------------------------- ### Install Piraeus HA Controller (Standalone) Source: https://context7.com/piraeusdatastore/helm-charts/llms.txt Use this command to install the Piraeus HA controller as a standalone component without the Piraeus Operator. Ensure the namespace is created. ```bash helm install piraeus-ha-controller piraeus-charts/piraeus-ha-controller \ --namespace piraeus-ha-controller \ --create-namespace ``` -------------------------------- ### Install Linstor Scheduler Helm Chart Source: https://github.com/piraeusdatastore/helm-charts/blob/main/charts/linstor-scheduler/README.md Installs the Linstor scheduler using Helm. Configure `linstorEndpoint` and `linstorClientSecret` if not installed alongside Piraeus Operator. ```bash helm repo add piraeus-charts https://piraeus.io/helm-charts/ helm install linstor-scheduler piraeus-charts/linstor-scheduler --set linstorEndpoint=https://piraeus-op-cs.piraeus.svc:3371 --set linstorClientSecret=piraeus-client-secret ``` -------------------------------- ### Install and upgrade snapshot-controller Source: https://context7.com/piraeusdatastore/helm-charts/llms.txt Install the snapshot-controller using Helm, specifying a values file. For upgrades from chart v4 to v5, annotate and label CRDs before running helm upgrade. ```bash # Install snapshot-controller helm install snapshot-controller piraeus-charts/snapshot-controller \ --namespace snapshot-controller \ --create-namespace \ -f values.yaml # Upgrade from chart v4 to v5 (requires CRD annotation) kubectl annotate crds volumesnapshotclasses.snapshot.storage.k8s.io \ meta.helm.sh/release-name=snapshot-controller \ meta.helm.sh/release-namespace=snapshot-controller kubectl label crds volumesnapshotclasses.snapshot.storage.k8s.io \ app.kubernetes.io/managed-by=Helm # Then upgrade helm upgrade snapshot-controller piraeus-charts/snapshot-controller \ --namespace snapshot-controller \ -f values.yaml ``` -------------------------------- ### Install LINSTOR Scheduler Source: https://context7.com/piraeusdatastore/helm-charts/llms.txt Install the LINSTOR scheduler using Helm. This command sets the LINSTOR endpoint and client secret, which are required for the scheduler to connect to LINSTOR. ```bash helm install linstor-scheduler piraeus-charts/linstor-scheduler \ --namespace piraeus-datastore \ --set linstor.endpoint=https://linstor-controller.piraeus-datastore.svc:3371 \ --set linstor.clientSecret=linstor-client-tls ``` -------------------------------- ### Install and Manage LinstorCluster Helm Chart Source: https://context7.com/piraeusdatastore/helm-charts/llms.txt Commands to install, upgrade, and view configuration options for the linstor-cluster Helm chart. Ensure the target namespace exists or is created. ```bash helm install linstor-cluster piraeus-charts/linstor-cluster \ --namespace piraeus-datastore \ --create-namespace \ -f values.yaml ``` ```bash helm show values piraeus-charts/linstor-cluster ``` ```bash helm upgrade linstor-cluster piraeus-charts/linstor-cluster \ --namespace piraeus-datastore \ -f values.yaml ``` -------------------------------- ### Install linstor-affinity-controller Source: https://context7.com/piraeusdatastore/helm-charts/llms.txt Install the linstor-affinity-controller using Helm. Deploy in the same namespace as Piraeus Operator for auto-detection, or in a different namespace with explicit LINSTOR endpoint and client secret configuration. ```bash # Install in the same namespace as Piraeus Operator (auto-detects LINSTOR endpoint) helm install linstor-affinity-controller piraeus-charts/linstor-affinity-controller \ --namespace piraeus-datastore # Install in a different namespace with explicit LINSTOR configuration helm install linstor-affinity-controller piraeus-charts/linstor-affinity-controller \ --namespace linstor-controllers \ --create-namespace \ --set linstor.endpoint=https://linstor-controller.piraeus-datastore.svc:3371 \ --set linstor.clientSecret=linstor-client-tls # View configuration options helm show values piraeus-charts/linstor-affinity-controller ``` -------------------------------- ### Install LINSTOR Affinity Controller with Helm Source: https://github.com/piraeusdatastore/helm-charts/blob/main/charts/linstor-affinity-controller/README.md Use this command to add the Piraeus Helm repository and install the LINSTOR Affinity Controller. Ensure LINSTOR configuration is set if deploying to a different namespace. ```bash helm repo add piraeus-charts https://piraeus.io/helm-charts/ helm install linstor-affinity-controller piraeus-charts/linstor-affinity-controller ``` -------------------------------- ### Install Linstor Cluster Helm Chart Source: https://github.com/piraeusdatastore/helm-charts/blob/main/charts/linstor-cluster/README.md Installs the Linstor cluster using the Helm chart. Ensure the Piraeus Operator is installed beforehand. This command deploys the core Linstor components. ```bash helm install linstor-cluster piraeus-charts/linstor-cluster ``` -------------------------------- ### Complete Piraeus Deployment Example Source: https://context7.com/piraeusdatastore/helm-charts/llms.txt This script deploys a full Piraeus storage solution, including the Piraeus Operator, snapshot controller, LINSTOR cluster, and affinity controller. It also includes verification steps. ```bash # Create namespace kubectl create namespace piraeus-datastore # Install Piraeus Operator first (required for linstor-cluster) helm install piraeus-operator oci://quay.io/piraeusdatastore/piraeus-operator \ --namespace piraeus-datastore # Install snapshot-controller (if not already present in cluster) helm install snapshot-controller piraeus-charts/snapshot-controller \ --namespace piraeus-datastore \ --set installCRDs=true \ --set controller.replicaCount=2 \ --set webhook.enabled=true # Install linstor-cluster with storage configuration helm install linstor-cluster piraeus-charts/linstor-cluster \ --namespace piraeus-datastore \ --set createApiTLS=helm \ --set createInternalTLS=helm \ --set monitoring.enabled=true # Install affinity controller for PV affinity sync helm install linstor-affinity-controller piraeus-charts/linstor-affinity-controller \ --namespace piraeus-datastore \ --set monitoring.enabled=true # Verify all components are running kubectl get pods -n piraeus-datastore kubectl get linstorcluster kubectl get linstorsatellite ``` -------------------------------- ### Get Pods in Wide Format Source: https://github.com/piraeusdatastore/helm-charts/blob/main/charts/piraeus-ha-controller/README.md Use this command to view the status and node assignment of your pods. Observe the initial state of the pod before any node failures. ```bash $ kubectl get pod -o wide NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES my-stateful-app-with-piraeus 1/1 Running 0 5m 172.31.0.1 node01.ha.cluster ``` -------------------------------- ### Configure LinstorCluster Helm Chart Source: https://context7.com/piraeusdatastore/helm-charts/llms.txt Example values.yaml for the linstor-cluster chart. Configure node selectors, tolerations, API TLS, storage pools, and storage classes for LINSTOR deployment. ```yaml linstorCluster: # Deploy LINSTOR only on nodes with specific labels nodeSelector: node-role.kubernetes.io/storage: "" # Configure tolerations for control plane nodes tolerations: - key: node-role.kubernetes.io/control-plane operator: Exists effect: NoSchedule # Use a private registry for images repository: registry.example.com/linbit-sds # Configure API TLS using cert-manager apiTLS: certManager: name: linstor-api-issuer kind: Issuer apiSecretName: linstor-api-tls clientSecretName: linstor-client-tls csiControllerSecretName: linstor-csi-controller-tls csiNodeSecretName: linstor-csi-node-tls # Enable high availability controller highAvailabilityController: enabled: true # Create API TLS certificates using cert-manager createApiTLS: "cert-manager" # Create internal TLS certificates for controller-satellite communication createInternalTLS: "helm" # Configure satellite storage pools linstorSatelliteConfigurations: - name: nvme-storage nodeSelector: storage.example.com/nvme: "true" storagePools: - name: lvm-thin lvmThinPool: volumeGroup: vg_nvme thinPool: thin_pool source: hostDevices: - /dev/nvme0n1 # Create storage classes for workloads storageClasses: - name: piraeus-replicated annotations: storageclass.kubernetes.io/is-default-class: "true" reclaimPolicy: Delete allowVolumeExpansion: true volumeBindingMode: WaitForFirstConsumer provisioner: linstor.csi.linbit.com parameters: linstor.csi.linbit.com/autoPlace: "2" linstor.csi.linbit.com/storagePool: lvm-thin linstor.csi.linbit.com/allowRemoteVolumeAccess: "true" # Enable Prometheus monitoring monitoring: enabled: true dashboard: enabled: true ``` -------------------------------- ### Add Piraeus Helm Repository Source: https://github.com/piraeusdatastore/helm-charts/blob/main/charts/linstor-cluster/README.md Adds the Piraeus Helm chart repository to your local Helm configuration. This command is necessary before installing any Piraeus charts. ```bash helm repo add piraeus-charts https://piraeus.io/helm-charts/ ``` -------------------------------- ### Observe Final Pod Status Source: https://github.com/piraeusdatastore/helm-charts/blob/main/charts/piraeus-ha-controller/README.md After the volume attachment issue is resolved (either automatically or manually), the pod will eventually start and reach the running state on a new node. ```bash $ kubectl get pod -o wide NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES my-stateful-app-with-piraeus-0 1/1 Running 0 5m 172.31.0.1 node02.ha.cluster ``` -------------------------------- ### Configure snapshot-controller values.yaml Source: https://context7.com/piraeusdatastore/helm-charts/llms.txt Configure the snapshot-controller Helm chart by modifying the values.yaml file. This includes enabling CRD installation, controller and webhook replicas, TLS settings with cert-manager, and defining VolumeSnapshotClasses for LINSTOR. ```yaml installCRDs: true controller: enabled: true replicaCount: 2 args: leaderElection: true leaderElectionNamespace: "$(NAMESPACE)" httpEndpoint: ":8080" featureGates: CSIVolumeGroupSnapshot=true resources: requests: cpu: 50m memory: 64Mi limits: memory: 256Mi pdb: minAvailable: 1 webhook: enabled: true replicaCount: 2 tls: # Disable Helm auto-generation, use cert-manager instead autogenerate: false certManagerIssuerRef: name: selfsigned kind: Issuer resources: requests: cpu: 50m memory: 64Mi limits: memory: 256Mi # Create VolumeSnapshotClasses for LINSTOR volumeSnapshotClasses: - name: linstor-snapshot annotations: snapshot.storage.kubernetes.io/is-default-class: "true" labels: velero.io/csi-volumesnapshot-class: "true" driver: linstor.csi.linbit.com deletionPolicy: Delete volumeGroupSnapshotClasses: - name: linstor-group-snapshot driver: linstor.csi.linbit.com deletionPolicy: Delete ``` -------------------------------- ### Check Pod Status After Force Deletion Source: https://github.com/piraeusdatastore/helm-charts/blob/main/charts/piraeus-ha-controller/README.md After force deleting a pod, observe its status. A new pod may attempt to start but could be blocked due to persistent volume attachment conflicts. ```bash $ kubectl get pod -o wide NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES my-stateful-app-with-piraeus-0 0/1 ContainerCreating 0 5s 172.31.0.1 node02.ha.cluster ``` -------------------------------- ### Configure HA Controller in LinstorCluster Spec Source: https://github.com/piraeusdatastore/helm-charts/blob/main/charts/piraeus-ha-controller/README.md Example of how to configure the Piraeus High Availability Controller by editing the LinstorCluster CRD. This snippet shows setting the log level and fail-over timeout. ```yaml apiVersion: piraeus.io/v1 kind: LinstorCluster metadata: name: linstorcluster spec: highAvailabilityController: podTemplate: spec: containers: - name: ha-controller args: - /agent - --v=4 - --fail-over-timeout=30s ``` -------------------------------- ### Show Linstor Cluster Helm Chart Values Source: https://github.com/piraeusdatastore/helm-charts/blob/main/charts/linstor-cluster/README.md Displays all available configuration options for the Linstor cluster Helm chart. Use this command to understand and customize your Linstor deployment. ```bash helm show values piraeus-charts/linstor-cluster ``` -------------------------------- ### Check Running Pod Source: https://github.com/piraeusdatastore/helm-charts/blob/main/charts/piraeus-ha-controller/README.md Use this command to view the status and node assignment of your running pods. ```bash $ kubectl get pod -o wide NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES my-stateful-app-with-piraeus 1/1 Running 0 10s 172.31.0.1 node01.ha.cluster ``` -------------------------------- ### Configure piraeus-ha-controller values.yaml Source: https://context7.com/piraeusdatastore/helm-charts/llms.txt Configure the piraeus-ha-controller Helm chart by modifying values.yaml. This includes image repository and pull policy, controller runtime options such as log verbosity, DRBD status interval, failover timeout, and reconciliation rates, resource limits, and tolerations. ```yaml # values.yaml for piraeus-ha-controller # Note: When using Piraeus Operator, this is deployed automatically image: repository: quay.io/piraeusdatastore/piraeus-ha-controller pullPolicy: IfNotPresent # Controller runtime options options: # Set log verbosity (0-5) v: 2 # Time between DRBD status updates drbdStatusInterval: "5s" # Timeout before starting failover process failOverTimeout: "5s" # Default grace period for deleting k8s objects gracePeriodSeconds: 10 # Maximum interval between reconciliation attempts reconcileInterval: "5s" # How often to resync internal cache resyncInterval: "5m" # Resource limits for the daemonset resources: requests: cpu: 50m memory: 64Mi limits: memory: 256Mi # Tolerations to run on all nodes including control plane tolerations: - operator: Exists ``` -------------------------------- ### Describe Pod for Events Source: https://github.com/piraeusdatastore/helm-charts/blob/main/charts/piraeus-ha-controller/README.md Use `kubectl describe pod` to inspect detailed information about a pod, including events. This is crucial for diagnosing issues like volume attachment failures. ```bash $ kubectl describe pod my-stateful-app-with-piraeus-0 ... Events: Type Reason Age From Message ---- ------ ---- ---- ------- Normal Scheduled default-scheduler Successfully assigned default/my-stateful-app-with-piraeus-0 to node02.ha.cluster Warning FailedAttachVolume 28s attachdetach-controller Multi-Attach error for volume "pvc-9d991a74-0713-448f-ac0c-0b20b842763e" Volume is already exclusively at ttached to one node and can't be attached to another ``` -------------------------------- ### Configure Webhook TLS with Cert-Manager Source: https://github.com/piraeusdatastore/helm-charts/blob/main/charts/snapshot-controller/README.md Configure the snapshot-controller Helm chart to use cert-manager for TLS certificate generation for the webhook. Ensure the certManagerIssuerRef points to a valid Issuer. ```yaml webhook: tls: # disable tls generation with helm autogenerate: false # configure certManager issuer certManagerIssuerRef: name: selfsigned kind: Issuer ``` -------------------------------- ### Deploy Linstor Scheduler Helm Chart Source: https://github.com/piraeusdatastore/helm-charts/blob/main/charts/linstor-scheduler/templates/NOTES.txt This snippet shows the output after a successful Helm deployment of the Linstor scheduler. It provides the LINSTOR URL and instructions for running Helm tests. ```shell Scheduler {{ include "linstor-scheduler.fullname" . }} deployed! Used LINSTOR URL: {{ include "linstor-scheduler.linstorEndpoint" .}} Please run `helm test {{ .Release.Name }}` to ensure it's properly working. ``` -------------------------------- ### Configure linstor-affinity-controller values.yaml Source: https://context7.com/piraeusdatastore/helm-charts/llms.txt Configure the linstor-affinity-controller Helm chart by modifying values.yaml. This includes replica count, LINSTOR connection settings, controller options like log verbosity and reconciliation rates, image details, resource requests/limits, and optional autoscaling and monitoring. ```yaml # values.yaml for linstor-affinity-controller replicaCount: 2 # LINSTOR connection settings (auto-detected when using Piraeus Operator) linstor: endpoint: "https://linstor-controller.piraeus-datastore.svc:3371" clientSecret: "linstor-client-tls" # Controller options options: v: 2 # Log verbosity leaderElection: true reconcileRate: "15s" # How often to check and update cluster state resyncRate: "15m" # Cache resync interval image: repository: quay.io/piraeusdatastore/linstor-affinity-controller pullPolicy: IfNotPresent resources: requests: cpu: 50m memory: 100Mi limits: memory: 256Mi # Enable high availability podDisruptionBudget: enabled: true minAvailable: 1 autoscaling: enabled: true minReplicas: 2 maxReplicas: 5 targetCPUUtilizationPercentage: 80 # Enable Prometheus monitoring monitoring: enabled: true ``` -------------------------------- ### Recommended StorageClass for HA Controller Source: https://context7.com/piraeusdatastore/helm-charts/llms.txt This StorageClass configuration is recommended for use with the HA controller. It includes parameters for LINSTOR volume placement, DRBD quorum, and IO suspension. ```yaml apiVersion: storage.k8s.io/v1 kind: StorageClass metadata: name: piraeus-ha provisioner: linstor.csi.linbit.com parameters: linstor.csi.linbit.com/autoPlace: "3" linstor.csi.linbit.com/storagePool: lvm-thin # Enable DRBD quorum for automatic IO suspension property.linstor.csi.linbit.com/DrbdOptions/auto-quorum: suspend-io property.linstor.csi.linbit.com/DrbdOptions/Resource/on-no-data-accessible: suspend-io property.linstor.csi.linbit.com/DrbdOptions/Resource/on-suspended-primary-outdated: force-secondary property.linstor.csi.linbit.com/DrbdOptions/Net/rr-conflict: retry-connect volumeBindingMode: WaitForFirstConsumer allowVolumeExpansion: true ``` -------------------------------- ### Observe Pod Termination Source: https://github.com/piraeusdatastore/helm-charts/blob/main/charts/piraeus-ha-controller/README.md After a node becomes unreachable and the grace period expires, pods on that node will enter the 'Terminating' state. This command helps monitor that transition. ```bash $ kubectl get pod -o wide NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES my-stateful-app-with-piraeus-0 1/1 Terminating 0 15m 172.31.0.1 node01.ha.cluster ``` -------------------------------- ### Configure Pods for LINSTOR Scheduler Source: https://context7.com/piraeusdatastore/helm-charts/llms.txt Configure a pod to use the LINSTOR scheduler by setting the `schedulerName` field in the pod's spec. This ensures that the pod is scheduled with LINSTOR volume placement awareness. ```yaml apiVersion: v1 kind: Pod metadata: name: my-stateful-pod spec: schedulerName: linstor-scheduler containers: - name: app image: nginx:latest volumeMounts: - name: data mountPath: /data volumes: - name: data persistentVolumeClaim: claimName: my-pvc ``` -------------------------------- ### Storage Class Parameters for Piraeus HA Controller Source: https://github.com/piraeusdatastore/helm-charts/blob/main/charts/piraeus-ha-controller/templates/NOTES.txt Use these parameters for your storage class to configure Piraeus High Availability Controller. They specify DRBD options for quorum and data accessibility. ```yaml parameters: property.linstor.csi.linbit.com/DrbdOptions/auto-quorum: suspend-io property.linstor.csi.linbit.com/DrbdOptions/Resource/on-no-data-accessible: suspend-io property.linstor.csi.linbit.com/DrbdOptions/Resource/on-suspended-primary-outdated: force-secondary property.linstor.csi.linbit.com/DrbdOptions/Net/rr-conflict: retry-connect ``` -------------------------------- ### Configure HA Controller with LinstorCluster Source: https://context7.com/piraeusdatastore/helm-charts/llms.txt Apply this YAML configuration to set up the HA controller using the LinstorCluster Custom Resource. This method integrates the HA controller with the Piraeus Operator. ```yaml apiVersion: piraeus.io/v1 kind: LinstorCluster metadata: name: linstorcluster spec: highAvailabilityController: podTemplate: spec: containers: - name: ha-controller args: - /agent - --v=4 - --fail-over-timeout=30s - --reconcile-interval=10s ``` -------------------------------- ### Update and Upgrade Snapshot Controller Helm Chart Source: https://github.com/piraeusdatastore/helm-charts/blob/main/charts/snapshot-controller/README.md Update your Helm repository cache and then perform a Helm upgrade to apply new configurations or versions of the snapshot-controller chart. ```bash helm repo update helm upgrade snapshot-controller piraeus-charts/snapshot-controller ``` -------------------------------- ### Piraeus HA Controller Configuration Flags Source: https://github.com/piraeusdatastore/helm-charts/blob/main/charts/piraeus-ha-controller/README.md Command-line flags available for configuring the Piraeus High Availability Controller. These control intervals, timeouts, and logging verbosity. ```bash --drbd-status-interval duration Time between DRBD status updates (default 5s) --fail-over-timeout duration Timeout before starting fail-over process (default 5s) --grace-period-seconds int Default grace period for deleting k8s objects, in seconds (default 10) --node-name string The name of node this is running on. Defaults to the NODE_NAME environment variable. --operations-timeout duration Default timeout for operations (default 1m0s) --reconcile-interval duration Maximum interval between reconciliation attempts (default 5s) --request-timeout string The length of time to wait before giving up on a single server request. Non-zero values should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don't timeout requests. (default "0") --resync-interval duration How often the internal object cache should be resynchronized (default 5m0s) --v int32 Set log level (default 0) --disable-node-taints boolean When set to true; node taints will not be applied (default false) ``` -------------------------------- ### LINSTOR Scheduler Chart values.yaml (Deprecated) Source: https://context7.com/piraeusdatastore/helm-charts/llms.txt Configuration values for the deprecated LINSTOR scheduler Helm chart. This chart is no longer recommended; use `volumeBindingMode: WaitForFirstConsumer` on StorageClasses instead. ```yaml # values.yaml for linstor-scheduler (deprecated) replicaCount: 2 # LINSTOR connection (auto-detected with Piraeus Operator) linstor: endpoint: "https://linstor-controller.piraeus-datastore.svc:3371" clientSecret: "linstor-client-tls" extender: image: repository: quay.io/piraeusdatastore/linstor-scheduler-extender pullPolicy: IfNotPresent resources: requests: cpu: 50m memory: 64Mi scheduler: image: repository: registry.k8s.io/kube-scheduler pullPolicy: IfNotPresent resources: requests: cpu: 100m memory: 128Mi podDisruptionBudget: enabled: true ``` -------------------------------- ### Monitor Cluster Events Source: https://github.com/piraeusdatastore/helm-charts/blob/main/charts/piraeus-ha-controller/README.md Observe cluster events to understand the sequence of actions during a node failure and pod rescheduling. Look for warnings related to node status and volume quorum. ```bash $ kubectl get events --sort-by=.metadata.creationTimestamp -w ... 1s Warning NodeStorageQuorumLost node/node01.ha.cluster Tainted node because some volumes have lost quorum 1s Warning VolumeWithoutQuorum pod/suspend-example-57c5c67658-t94wz Pod was evicted because attached volume lost quorum 1s Warning VolumeWithoutQuorum volumeattachment/csi-fda9f57ce4csd... Volume attachment was force-detached because node lost quorum ... ``` -------------------------------- ### Check Node Status Source: https://github.com/piraeusdatastore/helm-charts/blob/main/charts/piraeus-ha-controller/README.md This command displays the current status of all nodes in the cluster. It's useful for identifying nodes that are not ready or have become unreachable. ```bash $ kubectl get nodes NAME STATUS ROLES AGE VERSION master01.ha.cluster Ready master 12d v1.19.4 master02.ha.cluster Ready master 12d v1.19.4 master03.ha.cluster Ready master 12d v1.19.4 node01.ha.cluster Ready compute 12d v1.19.4 node02.ha.cluster Ready compute 12d v1.19.4 node03.ha.cluster NotReady compute 12d v1.19.4 ``` -------------------------------- ### Check for Snapshot CRDs Source: https://github.com/piraeusdatastore/helm-charts/blob/main/charts/snapshot-controller/README.md Use these commands to verify if the necessary Custom Resource Definitions (CRDs) for snapshotting are present in your cluster. Their absence indicates that a snapshot controller might not be deployed. ```bash kubectl get crd volumesnapshotclasses.snapshot.storage.k8s.io kubectl get crd volumesnapshots.snapshot.storage.k8s.io kubectl get crd volumesnapshotcontents.snapshot.storage.k8s.io ``` -------------------------------- ### Specify Linstor Scheduler in Pod Definition Source: https://github.com/piraeusdatastore/helm-charts/blob/main/charts/linstor-scheduler/templates/NOTES.txt This YAML snippet demonstrates how to configure a pod to use the Linstor scheduler. Ensure the `schedulerName` matches the deployed scheduler's full name. ```yaml spec: schedulerName: {{ include "linstor-scheduler.fullname" . }} ``` -------------------------------- ### Annotate and Label CRDs for Helm Upgrade Source: https://github.com/piraeusdatastore/helm-charts/blob/main/charts/snapshot-controller/README.md When upgrading from Chart v4 to v5+, if CRDs are not managed correctly by Helm, you may encounter an error. Apply these annotations and labels to the CRDs to resolve ownership issues and allow the upgrade to proceed. ```bash kubectl annotate crds volumegroupsnapshotclasses.groupsnapshot.storage.k8s.io meta.helm.sh/release-name=snapshot-controller meta.helm.sh/release-namespace=snapshot-controller kubectl label crds volumegroupsnapshotclasses.groupsnapshot.storage.k8s.io app.kubernetes.io/managed-by=Helm kubectl annotate crds volumegroupsnapshotcontents.groupsnapshot.storage.k8s.io meta.helm.sh/release-name=snapshot-controller meta.helm.sh/release-namespace=snapshot-controller kubectl label crds volumegroupsnapshotcontents.groupsnapshot.storage.k8s.io app.kubernetes.io/managed-by=Helm kubectl annotate crds volumegroupsnapshots.groupsnapshot.storage.k8s.io meta.helm.sh/release-name=snapshot-controller meta.helm.sh/release-namespace=snapshot-controller kubectl label crds volumegroupsnapshots.groupsnapshot.storage.k8s.io app.kubernetes.io/managed-by=Helm kubectl annotate crds volumesnapshotclasses.snapshot.storage.k8s.io meta.helm.sh/release-name=snapshot-controller meta.helm.sh/release-namespace=snapshot-controller kubectl label crds volumesnapshotclasses.snapshot.storage.k8s.io app.kubernetes.io/managed-by=Helm kubectl annotate crds volumesnapshotcontents.snapshot.storage.k8s.io meta.helm.sh/release-name=snapshot-controller meta.helm.sh/release-namespace=snapshot-controller kubectl label crds volumesnapshotcontents.snapshot.storage.k8s.io app.kubernetes.io/managed-by=Helm kubectl annotate crds volumesnapshots.snapshot.storage.k8s.io meta.helm.sh/release-name=snapshot-controller meta.helm.sh/release-namespace=snapshot-controller kubectl label crds volumesnapshots.snapshot.storage.k8s.io app.kubernetes.io/managed-by=Helm ``` -------------------------------- ### Check Rescheduled Pod Source: https://github.com/piraeusdatastore/helm-charts/blob/main/charts/piraeus-ha-controller/README.md After a node becomes unavailable, check the pod status to see if it has been rescheduled to a different node. ```bash $ kubectl get pod -o wide NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES my-stateful-app-with-piraeus-0 0/1 ContainerCreating 0 3s 172.31.0.1 node02.ha.cluster ``` -------------------------------- ### Annotation to Exclude Pods from Fail-over Source: https://github.com/piraeusdatastore/helm-charts/blob/main/charts/piraeus-ha-controller/templates/NOTES.txt Apply this annotation to pods that should be excluded from automatic fail-over by the Piraeus High Availability Controller. ```yaml annotations: drbd.linbit.com/ignore-fail-over="" ``` -------------------------------- ### Create Self-Signed Issuer for Cert-Manager Source: https://github.com/piraeusdatastore/helm-charts/blob/main/charts/snapshot-controller/README.md Define a cert-manager Issuer resource for self-signed certificates. This is a prerequisite for configuring the webhook to use cert-manager. ```yaml apiVersion: cert-manager.io/v1 kind: Issuer metadata: name: selfsigned spec: selfSigned: {} ``` -------------------------------- ### Exempt Pod from HA Controller Management Source: https://context7.com/piraeusdatastore/helm-charts/llms.txt Annotate a pod to exempt it from HA controller management. This is useful for pods that should not be automatically failed over. ```bash kubectl annotate pod my-stateful-pod drbd.linbit.com/ignore-fail-over="" ``` -------------------------------- ### Annotate Pod to Ignore HA Controller Management Source: https://github.com/piraeusdatastore/helm-charts/blob/main/charts/piraeus-ha-controller/README.md Use kubectl to add an annotation to a Pod, marking it as exempt from management by the HA Controller. This is useful for specific Pods that should not undergo automatic fail-over. ```bash kubectl annotate pod drbd.linbit.com/ignore-fail-over="" ``` -------------------------------- ### Force Delete Pod Source: https://github.com/piraeusdatastore/helm-charts/blob/main/charts/piraeus-ha-controller/README.md This command forcefully deletes a pod. Use with caution, as it bypasses normal termination procedures and can lead to data inconsistencies or resource attachment issues. ```bash $ kubectl delete pod my-stateful-app-with-piraeus-0 --force warning: Immediate deletion does not wait for confirmation that the running resource has been terminated. The resource may continue to run on the cluster indefinitely. pod "my-stateful-app-with-piraeus-0" force deleted ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.