Comments (8)
Hi, James!
I haven't seen the PersistentVolumeClaims error before. What version of Kubernetes are you using and what does your environment look like?
Regarding the second error, we have a fix for this which we'll release later today. I can ping you once it has been published.
To connect to the database, we recommend using the URI available from your MongoDB resource. You can get the URI by running kubectl describe mdb/example-mongodb
.
from mongodb-kubernetes-operator.
Hi Fabian,
Thanks for the quick reply. I'm using Windows docker desktop to run kubernetes (V1.16.5) with visual studio code cli.
PS C:\demo> kubectl describe mdb/example-mongodb
Name: example-mongodb
Namespace: default
Labels:
Annotations: kubectl.kubernetes.io/last-applied-configuration:
{"apiVersion":"mongodb.com/v1","kind":"MongoDB","metadata":{"annotations":{},"name":"example-mongodb","namespace":"default"},"spec":{"memb...
API Version: mongodb.com/v1
Kind: MongoDB
Metadata:
Creation Timestamp: 2020-07-15T09:37:34Z
Generation: 1
Resource Version: 1956
Self Link: /apis/mongodb.com/v1/namespaces/default/mongodb/example-mongodb
UID: 0824f544-509e-47a5-901f-b9348284f172
Spec:
Members: 3
Type: ReplicaSet
Version: 4.2.6
Events:
The only link I can think of is Self Link
. Doesn't seem to work.
I use the following code to connect to mongodb:
const client = new MongoClient(url);
client.connect();
Thanks and regards,
James Zheng
from mongodb-kubernetes-operator.
We've now released version 0.0.8 of the operator which should fix the issue you've been experiencing. Please pull the repository and try installing the operator again.
Regarding the URI, I think this could be related to the other issue. Could you try updating and get back to me?
from mongodb-kubernetes-operator.
Hi Fabian, @fabianlindfors
I got failed FailedScheduling error. Do you know where to add the PersistentVolumeClaims? Is this critical error?
Warning FailedScheduling 106s (x2 over 106s) default-scheduler pod has unbound immediate PersistentVolumeClaims Normal Scheduled 104s default-scheduler Successfully assigned default/example-mongodb-0 to docker-desktop Normal Pulling 103s kubelet, docker-desktop Pulling image "quay.io/mongodb/mongodb-kubernetes-operator-pre-stop-hook:1.0.1" Normal Pulled 100s kubelet, docker-desktop Successfully pulled image "quay.io/mongodb/mongodb-kubernetes-operator-pre-stop-hook:1.0.1" Normal Created 100s kubelet, docker-desktop Created container mongod-prehook Normal Started 100s kubelet, docker-desktop Started container mongod-prehook Normal Pulling 99s kubelet, docker-desktop Pulling image "quay.io/mongodb/mongodb-agent:10.15.1.6468-1" Normal Created 96s kubelet, docker-desktop Created container mongodb-agent Normal Pulled 96s kubelet, docker-desktop Successfully pulled image "quay.io/mongodb/mongodb-agent:10.15.1.6468-1" Normal Started 95s kubelet, docker-desktop Started container mongodb-agent Normal Pulling 95s kubelet, docker-desktop Pulling image "mongo:4.2.7" Normal Pulled 84s kubelet, docker-desktop Successfully pulled image "mongo:4.2.7" Normal Created 84s kubelet, docker-desktop Created container mongod Normal Started 84s kubelet, docker-desktop Started container mongod Warning Unhealthy 75s kubelet, docker-desktop Readiness probe failed:
I tried to use connecting string based on the recommendation from @StMarian https://github.com/mongodb/mongodb-kubernetes-operator/issues/108
mongodb://example-mongodb-0.example-mongodb-svc.mongodb.svc.cluster.local:27017,example-mongodb-1.example-mongodb-svc.mongodb.svc.cluster.local:27017/?replicaSet=example-mongodb
Having the following error:
(node:1) UnhandledPromiseRejectionWarning: MongoNetworkError: failed to connect to server [example-mongodb-1.example-mongodb-svc.mongodb.svc.cluster.local:27017] on first connect [Error: getaddrinfo ENOTFOUND example-mongodb-1.example-mongodb-svc.mongodb.svc.cluster.local
Thanks and regards,
James Zheng
from mongodb-kubernetes-operator.
The PersistentVolumeClaims error seems to indicate that Kubernetes couldn't create a corresponding Persistent Volume for the claim that is created by the operator. I'm not too familiar with Docker on Windows but it's possible that it can't create persistent volumes dynamically. One option is to manually set up Persistent Volumes which should then be automatically bound for the claims.
I think it's worth testing in your environment if it's possible to set up a pod with a PersistentVolumeClaim: https://kubernetes.io/docs/concepts/storage/persistent-volumes/.
Regarding the other issue with the URI, I'm guessing that the cluster is not running if the persistent volumes couldn't be created. Once that is fixed your cluster should work.
from mongodb-kubernetes-operator.
This issue is labeled as stale because it has been open for more than 30 days with no activity. Remove stale label or comment or this will be closed in a few days.
from mongodb-kubernetes-operator.
This issue is being marked stale because it has been open for 60 days with no activity. Please comment if this issue is still affecting you. If there is no change, this issue will be closed in 30 days.
from mongodb-kubernetes-operator.
This issue was closed because it became stale and did not receive further updates. If the issue is still affecting you, please re-open it, or file a fresh Issue with updated information.
from mongodb-kubernetes-operator.
Related Issues (20)
- Mongo v7 with 6.0 compatability fails to start; does not move from Pending phase HOT 7
- Replica set does not start, stuck in phase: Pending HOT 11
- Support for opt-in cleanup of PVCs HOT 6
- Waiting for agents to reach version 1 HOT 5
- Server startup warnings HOT 3
- Nonsecure prometheus HOT 2
- In the quay.io repository, there is no image of the arm architecture. HOT 8
- Create connectionString secret at another namespace
- Support for different resource request / limit for arbiters HOT 1
- can not set setParameter.authenticationMechanisms to SCRAM-SHA-1 HOT 3
- Mongodb-agent is never ready - HOT 7
- Readiness probe failed: command "/opt/scripts/readinessprobe" timed out on DB Pod when installing on Mac M1, even when using arm64 images HOT 9
- Mongodb Operator v0.8.3 crash on aarch64 k8s workers HOT 1
- Current mongo db members is 0 though >0 configured and running HOT 6
- Logging solely to stdout/stderr at the specified log level HOT 9
- It is not possible to pass unique labels and selectors on arbiter and mongo members. HOT 1
- Is it possible to pass resources limits and requests on initContainers? HOT 2
- ReplicaSet stuck in Pending phase via MongoDB Community Operator HOT 25
- How to schedule replicas and persistent volume in different availability zones HOT 6
- Steps to upgrade from 4.4 to 6.0 via 5.0? HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mongodb-kubernetes-operator.