Comments (3)
Ya without this information this is completely useless repo IMO. Here is what I had to do to get it to connect externally:
Change the service config within mongodb-service.yaml to:
apiVersion: v1
kind: Service
metadata:
name: mongodb-service
labels:
name: mongo
spec:
ports:
- port: 27017
targetPort: 27017
nodePort: 30000
type: NodePort
selector:
role: mongo
Run the cluster as instructed in README.md
Then at the prompt:
$./configure_repset_auth.sh abc123
$minikube service mongodb-service --url
http://192.168.99.101:30000
Use the above IP and port to connect to mongo with user as main_admin and password as abc123
from minikube-mongodb-demo.
Ya without this information this is completely useless repo IMO. Here is what I had to do to get it to connect externally:
Change the service config within mongodb-service.yaml to:
apiVersion: v1 kind: Service metadata: name: mongodb-service labels: name: mongo spec: ports: - port: 27017 targetPort: 27017 nodePort: 30000 type: NodePort selector: role: mongo
Run the cluster as instructed in README.md
Then at the prompt:
$./configure_repset_auth.sh abc123
$minikube service mongodb-service --url
http://192.168.99.101:30000Use the above IP and port to connect to mongo with user as main_admin and password as abc123
My approach is the same as yours, but do we connect to mongo replicaset using just one host and port?
In this case, I think we have to expose totally 3 mongo services. How do you think?
from minikube-mongodb-demo.
I have proposed a fix using port-forwarding to the service. Your milage may vary but I find it more flexible than the minikube option.
from minikube-mongodb-demo.
Related Issues (10)
- PersistentVolumeClaim is not bound: "mongodb-persistent-storage-claim-mongod-0" HOT 6
- Mongodb yaml `selector` does not match template `labels`
- Wrong size assigned for --wiredTigerCacheSizeGB
- replSetInitiate quorum check failed because not all proposed set members responded affirmatively HOT 2
- Example replication test command block causes unexpected errors
- Authentication failure HOT 10
- [Readme] Mongo API - setSlaveOk HOT 1
- service mongodb wont connect to primary mongo pod
- pod has unbound immediate PersistentVolumeClaims HOT 1
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 minikube-mongodb-demo.