#mongodb- sharded 7. X 版本CHART NAME : mongodb- sharded
CHART VERSION : 7.0 .5
APP VERSION : 7.0 .2
helm repo add bitnami https: / / charts. bitnami. com/ bitnami
helm pull bitnami/ bitnami/ mongodb- sharded -- untar
默认副本数较多。我修改为3+3
搜索关键字replicaCount 修改
最后安装
helm install mongodb- sharded mongodb- sharded - f . / mongodb- sharded/ values. yaml
再分享一个web客户端
apiVersion : apps/ v1
kind : Deployment
metadata : name : mongo- express
spec : replicas : 1 selector : matchLabels : app : mongo- expresstemplate : metadata : labels : app : mongo- expressspec : containers : - name: mongo- expressimage : mongo- express: latestports : - containerPort: 8081 env : - name: ME_CONFIG_MONGODB_URL value : mongodb: / / root: 123000 @mongodb- sharded. openim- dev. svc: 27017 / admin? ssl= false - name: ME_CONFIG_MONGODB_AUTH_USERNAME value : "admin" - name: ME_CONFIG_MONGODB_AUTH_PASSWORD value : "123qwe" -- -
apiVersion : v1
kind : Service
metadata : name : mongo- express
spec : type : NodePortselector : app : mongo- expressports : - port: 80 targetPort : 8081