v2.0
- About MogDB Stack
- Quick Start
- Installation
- Tutorial
- Architecture
- References
- Client
- mgo
- mgo create
- mgo create mgorole
- mgo create mgouser
- mgo create cluster
- mgo show
- mgo show k8s
- mgo show mgorole
- mgo show mgouser
- mgo show cluster
- mgo show restore
- mgo delete
- mgo delete mgorole
- mgo delete mgouser
- mgo delete cluster
- mgo delete backup
- mgo delete k8s
- mgo scale
- mgo scaledown
- mgo switch
- mgo update
- mgo update mgorole
- mgo update mgouser
- mgo update cluster
- mgo version
- mgo addk8s
- mgo localk8s
- mgo backup
- mgo backup detail
- mgo restore
- mgo minio
- mgo minio object
- mgo minio object ls
- mgo minio object stat
- mgo minio object getf
- Server
- Client
- FAQ
- Release Note
Create MogDB Cluster
Overview
Create a MogDB cluster consisting of a master node and several slave nodes in the background, for example:
mgo create cluster mycluster
mgo create cluster [flags]
Options
--access-modes int Set the access method for the data volume. 1: ReadWriteOnce, 2: ReadOnlyMany, 3: ReadWriteMany. Default value is ReadWriteOnce
--auto-backup Whether to enable automatic backup
--backup-level string Backup level, "incr" or "full". (default "incr")
--backup-s3-bucket string When "S3" storage type is enabled for backup, the S3 storage buckets applied to the cluster
--backup-s3-endpoint string When "S3" storage type is enabled for backup, the S3 storage nodes applied to the cluster
--backup-s3-key string When "S3" storage type is enabled for backup, the S3 node access key applied to the cluster
--backup-s3-key-secret string When "S3" storage type is enabled for backup, the S3 node access key secret applied to the cluster
--backup-schedule string Backup policy in crontab format, default is empty
--backup-schedule-history-limit int32 Maximum limit for the number of automatic backup reservations, default is 0
--backup-storage-size string Backup storage size, default is 128Mi
--backup-storage-type string Automatic backup storage types. There are "posix" and "s3". (Default "posix")
--backup-type string Types of backups. There are "basebackup" and "dumpall". (default "basebackup")
--cpu string Set the number of CPU cores to request, e.g. "100m" or "0.1"
--cpu-limit string Set the number of cores to be limited for the CPU, e.g. "100m" or "0.1"
--data-storage-size string Set the database data volume size. The default value is 128Mi
--exporter-image string The image that will be used for the MogDB exporter sidecar container. If specified, this will replace the default value
--ha-image string The image that will be used for the MogDB ha sidecar container. If specified, this will replace the default value
-h, --help help for cluster
--image string The image that will be used for the MogDB server container. If specified, this will replace the default value
--init-image string The image that will be used to initialize the container for MogDB. If specified, this will replace the default value
--log-storage-size string Set the log data volume size. Default value is 128Mi
--memory string Set the amount of memory to request, e.g. 1GiB
--memory-limit string Set the amount of memory to be limited, e.g. 1GiB
--read-port int Set the read port of the service
--replicas int Set the number of slave nodes to create the cluster, the default value is 2
--restore-backup-type string Perform a restore to bootstrap the cluster's backup type. There are "basebackup" and "dumpall". (The default "basebackup") is only valid if the "restore-from" value is specified.
--restore-from string Name of the cluster to recover from when bootstrapping a new cluster
--restore-object string The name of the restored backup object. Only valid if the "restore-from" value is specified.
--restore-type string The types of recovery are "object" and "time". Only valid if the "restore-from" value is specified.
--storage-class string Set the name of the required StorageClass to be declared. The default value is local-path
--write-port int Set the service write port
Options Inherited From The Parent Command
--apiserver-url string The URL of the mogDB Operator apiserver that will handle requests from the mgo client. please note that the URL should not end in "/"
--debug Enable debug output for debugging
--disable-tls Disable TLS authentication for MogDB Operator
--exclude-os-trust Exclude CA certificates from the OS default trust store
--k8s-node string Specify k8s node, default is local k8s node
--mgo-ca-cert string Connection to MogDB Operator apiserver CA certificate file path.
--mgo-client-cert string Path to the client certificate file used to authenticate to the MogDB Operator apiserver
--mgo-client-key string Path to the client key file used to authenticate to the MogDB Operator apiserver
-n, --namespace string Namespace for mgo requests
Helpful Links
- mgo create - Create MogDB Operator Resources