Kubernetes, Docker, MongoDB, Mongo Express
1- Setup local K8s cluster with Minikube.
2-Deploy MongoDB and MongoExpress with configuration and credentials extracted into ConfigMap and Secret.
1-generate base 64 encrypted username and password
echo -n "username" | base64
echo -n "password" | base64
2-create mongo secret by yaml file
kubectl apply -f mongo_secret.yaml
kubectl get secret
1-create mongodb deployment
kubectl apply -f mongo.yaml
2-check status
kubectl get all
kubectl describe pod [pod_name]
kubectl apply -f mongo.yaml
kubectl apply -f mongoExpress_configmap.yaml
Step 5: Add mongo-express service logic into mongoexpress.yaml file and create mongo-express external service
kubectl apply -f mongoExpress_configmap.yaml
kubectl get service
minikube service mongo-express-service