Learn k8s using this Reddit clone
This project demonstrates how to deploy a Reddit clone app on Kubernetes with Ingress and expose it to the world using Minikube as the cluster. Below is an overview of the architecture of this Reddit Clone App running on Kubernetes with Ingress.
Before you begin, you should have the following tools installed on your local machine:
You can install Prerequisites by doing these steps. click here & complete all steps one by one.
Follow these steps to install and run the Reddit clone app on your local machine:
git clone https://github.com/LondheShubham153/reddit-clone-k8s-ingress.git
cd reddit-clone-k8s-ingress
docker build -t reddit-clone-app .
kubectl apply -f deployment.yaml
kubectl apply -f service.yaml
minikube addons enable ingress
kubectl expose deployment reddit-deployment --type=NodePort --port=5000
kubectl apply -f ingress.yaml
curl http://domain.com/test
Key Components :
Pre Requisites :
Installation Steps
helm repo add stable https://charts.helm.sh/stable
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
helm search repo prometheus-community
kubectl create namespace prometheus
helm install stable prometheus-community/kube-prometheus-stack -n prometheus
kubectl get pods -n prometheus
kubectl get svc -n prometheus
Edit Prometheus Service (Edit type : LoadBalancer)
kubectl edit svc stable-kube-prometheus-sta-prometheus -n prometheus
Edit Grafana Service (Edit type : LoadBalancer)
kubectl edit svc stable-grafana -n prometheus
Verify if service is changed to LoadBalancer and also to get the Load Balancer URL.
kubectl get svc -n prometheus
Access Grafana Dashboard
UserName: admin
Password: prom-operator
For creating a dashboard to monitor the cluster:
Click '+' button on left panel and select Import.
Enter 12740 dashboard id under Grafana.com Dashboard.
Click Load.
Select Prometheus as the endpoint under prometheus data sources drop down.
Click Import.
If you'd like to contribute to this project, please open an issue or submit a pull request.