Closed shuoshadow closed 1 week ago
Is this a new cluster or a backup-restore cluster? Please provide the console output of the MongoDB container in pod test-mongodb-mongodb-0.
你好,我想请教一下,你是如何实现修改镜像地址docker.io/apecloud/mongo:5.0.14为apecloud-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/mongo:5.0.14 的?
this can be made by upgrade mongodb-addon with ` helm repo add kubeblocks-addons https://jihulab.com/api/v4/projects/150246/packages/helm/stable
helm upgrade -i kb-addon-mongodb kubeblocks-addons/mongodb -n kb-system --set image.repository=apecloud/mongo,image.registry=apecloud-registry.cn-zhangjiakou.cr.aliyuncs.com `
Is this a new cluster or a backup-restore cluster? Please provide the console output of the MongoDB container in pod test-mongodb-mongodb-0.
HI, That's a new cluster, there is no log in pod test-mongodb-mongodb-0.
The MongoDB add-on may be outdated. You can upgrade it by using the following command: helm upgrade -i kb-addon-mongodb kubeblocks-addons/mongodb -n kb-system , and then try again.
@shuoshadow
Or you can use kbcli addon search mongodb
to fetch the list of available versionss.
And upgrade you MongoDB Addon use kbcli addon upgrade mongodb --version <version-for-kb09>
(versions with prefix 0.9)
@shanshanying
@shuoshadow
Or you can use
kbcli addon search mongodb
to fetch the list of available versionss. And upgrade you MongoDB Addon usekbcli addon upgrade mongodb --version <version-for-kb09>
(versions with prefix 0.9)
I executed the command, but it had no effect and still failed to start.
Please provide the YAML for the cluster and pod, as well as the console output from the MongoDB container in the pod.
Please provide the YAML for the cluster and pod, as well as the console output from the MongoDB container in the pod.
apiVersion: apps.kubeblocks.io/v1alpha1
kind: Cluster
metadata:
name: test-mongodb
namespace: kb-cloud
spec:
clusterDefinitionRef: mongodb
clusterVersionRef: mongodb-5.0
terminationPolicy: Delete
affinity:
podAntiAffinity: Preferred
topologyKeys:
- kubernetes.io/hostname
tolerations:
- key: "node-type"
operator: "Equal"
value: "mid"
effect: "NoSchedule"
componentSpecs:
- name: mongodb
componentDefRef: mongodb
enabledLogs:
- running
disableExporter: false
serviceAccountName: kb-mongo-cluster
replicas: 3
resources:
limits:
cpu: '4'
memory: 4Gi
requests:
cpu: '1'
memory: 2Gi
volumeClaimTemplates:
- name: data
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 200Gi
storageClassName: openebs-hostpath
Is this a new cluster or a backup-restore cluster? Please provide the console output of the MongoDB container in pod test-mongodb-mongodb-0.
HI, That's a new cluster, there is no log in pod test-mongodb-mongodb-0.
@xuriwuyun no any log output
the file log /data/mongodb/logs/mongodb.log in pod test-mongodb-mongodb-0.
i see, the cluster yaml is outdated, you can use this new template instead:
` apiVersion: apps.kubeblocks.io/v1alpha1 kind: Cluster metadata: name: mongo-cluster namespace: default spec: componentSpecs:
i see, the cluster yaml is outdated, you can use this new template instead:
` apiVersion: apps.kubeblocks.io/v1alpha1 kind: Cluster metadata: name: mongo-cluster namespace: default spec: componentSpecs:
componentDef: mongodb name: mongodb replicas: 3 resources: limits: cpu: "0.5" memory: 0.5Gi requests: cpu: "0.5" memory: 0.5Gi serviceVersion: 6.0.16 volumeClaimTemplates:
name: data spec: accessModes:
ReadWriteOnce resources: requests: storage: 20Gi terminationPolicy: Delete `
Message: cluster API validate error, clusterDef: , topology: , comps: 1, legacy comps: 1, simplified API: false
no pod were created
@xuriwuyun
Warning Warning 8m30s (x12 over 8m40s) cluster-controller no matched component definition found: mongodb
Warning PreCheckFailed 3m12s (x17 over 8m40s) cluster-controller no matched component definition found: mongodb