helm部署mongodb分片集

  运维

官方文档

https://hub.helm.sh/charts/bitnami/mongodb-sharded
https://hub.kubeapps.com/charts/bitnami/mongodb-sharded

chart

helm repo add bitnami https://charts.bitnami.com/bitnami
helm fetch bitnami/mongodb-sharded --version 1.5.5
tar zxvf mongodb-sharded-1.5.5.tgz

helm template prod

helm template mongodb-sharded \
--namespace mongodb \
--name mongodb-video \
--set global.storageClass=nfs-ssd \
--set image.registry=docker.io  \
--set image.repository=bitnami/mongodb-sharded  \
--set image.tag=4.2.8-debian-10-r24  \
--set image.pullPolicy=IfNotPresent  \
--set image.debug=false  \
--set mongodbRootPassword=DU2K_veum1SxT9F  \
--set shards=4  \
--set configsvr.replicas=3  \
--set configsvr.persistence.enabled=true  \
--set configsvr.persistence.storageClass=nfs-ssd  \
--set configsvr.persistence.size=1500Gi  \
--set mongos.replicas=3  \
--set shardsvr.dataNode.replicas=3  \
--set shardsvr.persistence.enabled=true  \
--set shardsvr.dataNode.priorityClassName=nfs-ssd  \
--set shardsvr.persistence.storageClass=nfs-ssd  \
--set shardsvr.persistence.size=1500Gi  \
--set shardsvr.arbiter.replicas=1  \
--set shardsvr.arbiter.priorityClassName=nfs-ssd  \
> prod-install.yaml

install

[root@master01 mgdb]# kubectl -n mongodb apply -f prod-install.yaml 
secret/mongodb-video-mongodb-sharded created
configmap/mongodb-video-mongodb-sharded-replicaset-entrypoint created
service/mongodb-video-mongodb-sharded-headless created
service/mongodb-video-mongodb-sharded created
deployment.apps/mongodb-video-mongodb-sharded-mongos created
statefulset.apps/mongodb-video-mongodb-sharded-configsvr created
statefulset.apps/mongodb-video-mongodb-sharded-shard0-arbiter created
statefulset.apps/mongodb-video-mongodb-sharded-shard1-arbiter created
statefulset.apps/mongodb-video-mongodb-sharded-shard2-arbiter created
statefulset.apps/mongodb-video-mongodb-sharded-shard3-arbiter created
statefulset.apps/mongodb-video-mongodb-sharded-shard0-data created
statefulset.apps/mongodb-video-mongodb-sharded-shard1-data created
statefulset.apps/mongodb-video-mongodb-sharded-shard2-data created
statefulset.apps/mongodb-video-mongodb-sharded-shard3-data created

LEAVE A COMMENT

Captcha Code