Powered by Zoomin Software. For more details please contactZoomin

MarkLogic® Server on Kubernetes

Extend the data volumes (MarkLogic Operator)

  • Last Updated: July 13, 2026
  • 5 minute read
    • MarkLogic Server
    • Documentation

The MarkLogic Operator supports PersistentVolumeClaim (PVC) expansion for MarkLogic groups. You can increase the storage size of your MarkLogic cluster by updating the spec.persistence.size field in your MarklogicCluster manifest and applying it to the cluster. The Operator validates the request, patches all PVCs, synchronizes the StatefulSet template, and restarts pods if required by the storage provider.

Note:

Volume resizing is supported on AWS EKS and Azure AKS.

Prerequisites

Before resizing volumes:

  • Back up your data. See Backup and restore a database.
  • Ensure your Kubernetes cluster version is supported by your MarkLogic Operator release and CSI storage driver for PVC expansion.
  • Confirm that the StorageClass used by your cluster has allowVolumeExpansion: true. See Expanding Persistent Volume Claims for supported volume types.
  • Volume resizing supports increasing the storage size only. Decreasing (shrinking) the volume is not supported and will be rejected by the Operator.
  • Ensure sufficient storage quota is available in your cloud provider account.
  • Review your cloud provider's requirements and limitations before resizing:
  • The spec.updateStrategy field must be set to OnDelete in your manifest. The Operator rejects resize requests when any other update strategy is configured.

Resize strategy

The spec.persistence.resizeStrategy field controls how PVC resize requests are submitted:

Strategy Description
parallel (default) All PVCs in the group are patched simultaneously. Faster but places more load on the storage provider.
sequential PVCs are patched one at a time. Safer for storage providers with rate limits or when you want to minimize risk. When using the sequential strategy, the Operator alternates between the ResizingPVCs and WaitingForPVCResize phases for each individual PVC before moving to the next. This cycling is expected behavior.

Example configuration with sequential strategy:

spec:
  persistence:
    enabled: true
    size: 50Gi
    storageClassName: gp3
    resizeStrategy: sequential

Resize the data volume

To increase the volume size for your MarkLogic cluster:

  1. Open your MarklogicCluster manifest file.

  2. Update the spec.persistence.size field to the new, larger size:

    spec:
      persistence:
        enabled: true
        size: 50Gi  # Updated from the previous size, for example 20Gi
        storageClassName: gp3
    
  3. Apply the updated manifest:

    kubectl apply -f <your-manifest-file>.yaml -n <namespace>
    

How volume resizing works

When you apply a size increase, the Operator executes a multi-phase workflow:

  1. Validating — The Operator checks that the StorageClass allows expansion, the new size is larger than the current size, PVCs are bound, and the request is eligible to start or be deferred if another resize is already active.
  2. ResizingPVCs — The Operator patches PVC .spec.resources.requests.storage (in parallel or sequentially based on resizeStrategy).
  3. WaitingForPVCResize — The Operator waits for the storage provider to complete the underlying volume expansion and for PVC conditions to reflect the new capacity.
  4. SynchronizingStatefulSet — Because StatefulSet volumeClaimTemplates are immutable, the Operator deletes and recreates the StatefulSet (with --cascade=orphan to preserve pods) so the template matches the new size.
  5. RestartingPods — Only occurs if the storage provider requires an offline filesystem expansion (indicated by the FileSystemResizePending PVC condition). The Operator deletes and waits for one pod at a time. This phase is skipped when the storage provider supports online expansion (such as EKS gp3).
  6. WaitingForPodsReady — The Operator waits for all pods to pass readiness probes after the restart.
  7. VerifyingResizeOutcome — The Operator confirms that all PVCs report the expected capacity.
  8. Completed — The resize operation is finished.

Note:

During the SynchronizingStatefulSet phase, the StatefulSet is temporarily deleted and recreated. Existing pods are preserved (orphaned) during this process and are not terminated.

Monitor resize progress

Check MarklogicGroup status

The Operator tracks resize progress in the status.volumeResizeStatus field of the MarklogicGroup resource:

kubectl get marklogicgroup <group-name> -n <namespace> -o jsonpath='{.status.volumeResizeStatus}'

Key status fields:

Field Description
phase Current phase of the resize operation (see workflow above)
message Human-readable description of the current state
reason Machine-readable reason code (see error conditions below)
observedGeneration Resource generation observed when the active resize started
currentSize The size of PVCs before the resize
targetSize The requested new size
deferredTargetSize New requested size detected while another resize is active
deferredObservedGeneration Resource generation where deferredTargetSize was observed
resizeStrategy The strategy being used (parallel or sequential)
totalPvcs Total number of PVCs being resized
pvcsCheckpointed Number of PVCs that have reached the required checkpoint
activePVC Name of the PVC currently being resized (sequential mode)
pvcStatuses Per-PVC checkpoint and progress details
failedPVCs Per-PVC failure details when partial or full failure occurs
warnings Reserved for future non-fatal resize warnings; may be empty in the current implementation
retryCount Number of retry attempts for the current operation
nextRetryTime Next scheduled retry time for retryable stalled operations

Check Kubernetes events

kubectl get events -n <namespace> --sort-by='.lastTimestamp' --field-selector involvedObject.kind=MarklogicGroup

Check Operator logs

kubectl logs -l app.kubernetes.io/name=marklogic-operator -n <operator-namespace>

Validation and error handling

The Operator enforces the following rules and surfaces failures through status.volumeResizeStatus.reason:

Condition Reason Behavior
New size is smaller than current size ShrinkNotSupported Request rejected
StorageClass does not allow volume expansion StorageClassNotExpandable Request rejected
PVCs are not in Bound state PVCNotBound Operation stalled; Operator retries automatically until all PVCs reach Bound state
New larger size is submitted during an active resize N/A New target is recorded in deferredTargetSize and reconciled after the active operation reaches a terminal state
Invalid size format or value InvalidResizeRequest Request rejected
Some PVCs resize but others fail PartialResizeFailure Operation enters Stalled phase
StatefulSet delete/recreate fails StatefulSetSyncFailed Operation enters Stalled or Failed depending on recoverability
Pod fails to recover after restart PodRecoveryFailed Operation enters Stalled or Failed depending on recoverability
StatefulSet template update interrupted TemplateUpdateInterrupted Operator retries on next reconciliation
Verification or post-restart readiness checks fail MarkLogicHealthCheckFailed Operation enters Stalled or Failed depending on recoverability
Maximum retries exceeded MaxRetriesExceeded Operation enters Failed phase; manual intervention required
spec.updateStrategy is not OnDelete InvalidResizeRequest Request rejected; set spec.updateStrategy: OnDelete and reapply

Recovering from failures

If a resize operation enters the Stalled or Failed phase:

  1. Check the status.volumeResizeStatus.reason and status.volumeResizeStatus.message for details:

    kubectl get marklogicgroup <group-name> -n <namespace> -o yaml
    
  2. Resolve the underlying issue (for example, fix quota or restore storage provider health).

  3. Resume the workflow:

    1. For Stalled operations, after resolving the root cause, wait for automatic retry or trigger reconciliation with a no-op metadata change.
  4. For Failed operations, apply a meaningful spec change (for example, a new larger target size) so a new resize operation can start.

    kubectl apply -f <your-manifest-file>.yaml -n <namespace>
    

The Operator tracks crash-recovery markers internally and resumes from where it left off when possible.

Pause and resume a resize

You can pause an active or pending resize operation by adding the marklogic.progress.com/resize-paused annotation to the MarklogicGroup resource. When paused, the Operator stops progressing the resize and sets the reason to Paused. The operation resumes automatically when the annotation is removed.

Pause a resize operation

kubectl annotate marklogicgroup <group-name> -n <namespace> marklogic.progress.com/resize-paused=true

Resume a resize operation

Resume by removing the annotation:

kubectl annotate marklogicgroup <group-name> -n <namespace> marklogic.progress.com/resize-paused-
TitleResults for “How to create a CRG?”Also Available inAlert