HomeMogDBMogDB StackUqbar

Documentation:v2.0

Supported Versions:

mgo Client

MogDB Operator Client, mgo for short, is the easiest way to interact with the MogDB Operator. mgo provides many convenient ways to create, manage and delete MogDB clusters through a series of simple commands. MogDB Operator provides an interface to connect to the mgo client and manage authentication through RBAC and TLS.

deploy-arch

The mgo client is available for Linux, macOS, and you can select your desired mgo client from Release Note to select the mgo client you need. Note that the version of the mgo client must match the version of MogDB Operator.


General Considerations for Using mgo

If you use the Quick Start guide to install MogDB Operator, you will install MogDB Operator under the namespace named mogdb-operator-system.

For convenience, we recommend setting mogdb-operator-system to the value of the environment variable MGO_NAMESPACE. In the shell where you will execute the mgo command, run the following command.

export MGO_NAMESPACE=mogdb-operator-system

If you do not want to set this environment variable, or are in an environment where environment variables are not available, you must use the --namespace(or -n) flag for most commands, for example

mgo version -n mogdb-operator-system

Syntax

For a detailed description of the commands of the mgo client, please refer to the command line for details.

While the syntax of mgo is as simple as if you were using kubectl, one of the goals of the MogDB Operator project is to allow seamless management of MogDB clusters in Kubernetes-enabled environments, and to make the learning curve easier by following a command pattern familiar to users.

To find out what is available at the top level of the mgo command, execute the following command.

mgo

The syntax of the mgo command usually follows the following format.

pgo [command] ([TYPE] [NAME]) [flags]

Where command is a verb, e.g.

  • create
  • show
  • delete

TYPE is a resource type, e.g.

  • cluster
  • mgorole
  • mgouser

NAME is the name of the resource type, e.g.

  • cluster1
  • admin

Some global flags apply to each mgo command, and some special flags apply to specific mgo commands. To get a list of all options and flags available for a command, you can use the --help flag. For example, to see all options available for the mgo create cluster command, you can run the following command.

mgo create cluster --help
Copyright © 2011-2024 www.enmotech.com All rights reserved.