The structure desired: Mongo express (as a external service) accessing a mongodb (as a internal service) and using a secret service to storage the username and password.

The final product gonna be like: A web-ui (mongo-express) sending commands to a mongodb (mongodb-service)

Installing the Secret Service
-- Installing the secret servicekubectl apply -f https://bit.ly/3fWLHLj-- Getting the secret servicekubectl get secret-- Installing the mongdb servicekubectl apply -f https://bit.ly/2QeWbL2Checking the services
-- kubectl get all--kubectl get all | grep mongodb
Installing and configuring mongodb-espress WEB-UI
--Creating the config map that gonna store the info about de databasekubectl apply -f https://bit.ly/3mJ1FKj-- Installing the mongo-express web uikubectl apply -f https://bit.ly/3a2NEC5If all the services are running we can check the public IP to mongo-express
-- Getting the public ip serviceminikube service mongo-express-serviceIf everything is ok you gonna see the page:

That’s it! your mongodb works using Kubernetes! The structure is like:

Reference: https://www.youtube.com/watch?v=X48VuDVv0do
Post a Comment