Kubernetes project that will provide an environment with an accessible Web-based MongoDB admin interface and an instance of the Mongo database.
┌──────────────────┐
│ Mongo Express │
│ External Service │
└────────┬─────────┘
│
│
┌────▼────┐
│ Mongo │ ┌────────────────┐ ┌───────┐
│ Express ├─────────►│MongoDb Internal├──────►│MongoDb│
│ Pod │ │ Service │ │ Pod │
└─▲─────▲─┘ └────────────────┘ └─▲───▲─┘
│ │ │ │
│ │ │ │
│ │ │ │
│ │ ┌───────┐ │ │
│ └─────────────────────────────┤Secrets├─┘ │
│ └───────┘ │
│ │
│ ┌─────────┐ │
└──────────────────────────────────┤ConfigMap├────┘
└─────────┘
- Docker
- Kubectl
- Minikube
Run the below commands
kubectl apply -f mongo-secret.yaml
kubectl apply -f mongo.yaml
kubectl apply -f mongo-configmap.yaml
kubectl apply -f mongo-express.yaml
// Check if the resources were created successfully
kubectl get all
// Apply an ip for the external service
minikube service mongo-express-service
// Access the desired service ip from the browser
minikube service --all
echo -n 'value' | base64
minikube start
kubectl get nodes
minikube status
kubectl version
kubectl get all
kubectl get all | grep mongodb
kubectl get nodes
kubectl get pod
kubectl get pod -o wide
kubectl get services
kubectl create deployment mongo-deployment --image=mongo
kubectl get deployment
kubectl get replicaset
kubectl edit deployment mongo-deployment
kubectl logs {pod-name}
kubectl exec -it {pod-name} -- bin/bash
kubectl create deployment mongo-deployment --image=mongo
kubectl logs mongo-deployment-{pod-name}
kubectl describe pod mongo-deployment-{pod-name}
kubectl delete deployment mongo-depl
vim mongo-deployment.yaml
kubectl apply -f mongo-deployment.yaml
kubectl get pod
kubectl get deployment
kubectl delete -f mongo-deployment.yaml
kubectl top
The top command returns the current CPU and memory usage for a cluster’s pods or nodes, or for a particular pod or node if specified.
minikube service mongo-express-service
minikube service --all