Skip to main content
Version: release-0.9

Stop/Start a MongoDB Cluster

You can stop/start a cluster to save computing resources. When a cluster is stopped, the computing resources of this cluster are released, which means the pods of Kubernetes are released, but the storage resources are reserved. Start this cluster again if you want to restore the cluster resources from the original storage by snapshots.

Stop a cluster

You can stop a cluster by OpsRequest or changing the YAML file of the cluster.

Run the command below to stop a cluster.

kubectl apply -f - <<EOF
apiVersion: apps.kubeblocks.io/v1alpha1
kind: OpsRequest
metadata:
name: ops-stop
namespace: demo
spec:
clusterName: mycluster
type: Stop
EOF

Start a cluster

You can stop a cluster by OpsRequest or changing the YAML file of the cluster.

Run the command below to start a cluster.

kubectl apply -f - <<EOF
apiVersion: apps.kubeblocks.io/v1alpha1
kind: OpsRequest
metadata:
name:ops-start
namespace: demo
spec:
clusterName: mycluster
type: Start
EOF