HomeMogDBMogDB StackUqbar

Documentation:v2.0

Supported Versions:

MogDB Cluster CR Sample

If you wish to create a MogDB Cluster CR via the native kubectl command, you can do so by writing a simple yaml file and submitting it to the k8s system, such as :

apiVersion: mogdb.enmotech.io/v1
kind: MogdbCluster
metadata:
  labels:
    mogdb.enmotech.io/cluster: cluster1
    name: cluster1
  name: cluster1
  namespace: mogdb-operator-system
spec:
  podSpec:
    backupVolumeSpec:
      persistentVolumeClaim:
        accessModes:
          - ReadWriteOnce
        resources:
          requests:
            storage: 128Mi
        storageClassName: local-path
    exporterImage: swr.cn-north-4.myhuaweicloud.com/mogdb-cloud/mogdb-exporter:latest
    image: swr.cn-north-4.myhuaweicloud.com/mogdb-cloud/mogdb:3.1.0
    imagePullPolicy: IfNotPresent
    initImage: swr.cn-north-4.myhuaweicloud.com/mogdb-cloud/mogdb-init:3.1.0
    logVolumeSpec:
      persistentVolumeClaim:
        accessModes:
          - ReadWriteOnce
        resources:
          requests:
            storage: 128Mi
        storageClassName: local-path
    volumeSpec:
      persistentVolumeClaim:
        accessModes:
          - ReadWriteOnce
        resources:
          requests:
            storage: 128Mi
        storageClassName: local-path
  readPort: 30012
  replicas: 2
  writePort: 30013

The above configuration, which specifies the data volume, log volume, backup volume and basic image configuration, as well as the number of replicas, will create a MogDB cluster when being submitted to the system.

Copyright © 2011-2024 www.enmotech.com All rights reserved.