2

Trying to make the app in kubernetes with walkthrough of Docker and Kubernetes - Full Course for Beginners https://www.youtube.com/watch?v=Wf2eSG3owoA&t=14992s&ab_channel=freeCodeCamp.org

After the comands:

wendel@wendel-VirtualBox:~/Docker-Kub-MongoDB$ kubectl apply -f mongo-configmap.yaml
configmap/mongodb-configmap created

    wendel@wendel-VirtualBox:~/Docker-Kub-MongoDB$ kubectl apply -f mongo-express.yaml
    deployment.apps/mongo-express created
    
    wendel@wendel-VirtualBox:~/Docker-Kub-MongoDB$ kubectl logs mongo-express-78fcf796b8-t9lqj
    Welcome to mongo-express
    ------------------------
    (...)
    (node:7) [MONGODB DRIVER] Warning: Current Server Discovery and Monitoring engine is deprecated, 
and will be removed in a future version. 
To use the new Server Discover and Monitoring engine, pass option { useUnifiedTopology: true } 
to the MongoClient constructor.

Mongo Express server listening at http://0.0.0.0:8081
Server is open to allow connections from anyone (0.0.0.0)
basicAuth credentials are "admin:pass", it is recommended you change this in your config.js!

enter image description here list of yamls:

https://gitlab.com/nanuchi/youtube-tutorial-series/-/blob/master/demo-kubernetes-components/mongo-configmap.yaml

https://gitlab.com/nanuchi/youtube-tutorial-series/-/blob/master/demo-kubernetes-components/mongo-express.yaml

https://gitlab.com/nanuchi/youtube-tutorial-series/-/blob/master/demo-kubernetes-components/mongo-secret.yaml

https://gitlab.com/nanuchi/youtube-tutorial-series/-/blob/master/demo-kubernetes-components/mongo.yaml

What I missed to apear this warning message?

  • 1
    I you want to explore more on this kind of issue regarding your set up. This was already had an Stackoverflow discussion. https://stackoverflow.com/questions/57895175/server-discovery-and-monitoring-engine-is-deprecated – Bryan L Nov 30 '21 at 07:53

1 Answers1

1

This warning message is not related to k8s. This is related to change in js driver for mongodb server discovery. In your code where you instantiate mongodb client you should specify the flag suggested in the warning message:

const driver = MongoClient(<connection string>, { useUnifiedTopology: true })

The warning should go away then.

gohm'c
  • 13,492
  • 1
  • 9
  • 16