This is a repo for my k8s training purposes and contains some couple of stuff that i made in order to discover and learn Kubernetes.
I use a local k8s cluster with minikube.
-
Presentation
The
demo-mongofolder contains a simple example ofmongo-dbandmongo-expressdeployment setup for a basick8s cluster. It contains two sub-folders that respectively namedmongo-dbandmongo-expressand each of those also contains necessaryyamlconfiguration files that allow you to properly run an instance of amongo-expressapplication that communicate with amongodatabase. In order to have a better organization, i also created a namespace which its configuration is indemo-mongo-ns.yamlfile and with that, all components of this simple setup gonna be available there. -
Setup
-
First, create the namespace with the following command after being placed in the
demo-mongofolder :kubctl apply -f demo-mongo-ns.yaml -
Execute the following command in order to have the
mongo-dbinstance setup :kubectl apply -f mongo-db/secret.yamlkubectl apply -f mongo-db/service.yamlkubectl apply -f mongo-db/deployment.yaml
-
Execute the following command in order to have the
mongo-expressinstance setup :kubectl apply -f mongo-express/secret.yamlkubectl apply -f mongo-express/configmap.yamlkubectl apply -f mongo-express/service.yamlkubectl apply -f mongo-express/deployment.yaml
-
Execute the following command in order to launch
mongo-expressapp in your default browser (i useminikubehere) :minikube service mongo-express-svc -n demo-mongo
-
The credentials for accessing
mongo-expressweb app aremongo-express-usernameas username andmongo-express-passwordfor the password.
-
Feel free to make a PR or report an issue 😃
Oh, one more thing, please do not forget to put a description when you make your PR 🙂