Deploying a Reddit Clone Web Application on Kubernetes:

Deploying a Reddit Clone Web Application on Kubernetes:

Before you begin, make sure you have the following prerequisites:

  1. Minikube: Install Minikube by following the official documentation.

  2. kubectl: Install kubectl, the Kubernetes command-line tool, following the official installation guide.

  3. Docker: Ensure you have Docker installed on your local machine. You can download it from the Docker website.

  4. Git: Install Git for cloning the project repository. You can download it from the Git website.

Step 1: Setting up Minikube

Follow these steps to set up Minikube:

# Start Minikube cluster
minikube start

# Check the cluster status
minikube status

Ensure that the Minikube cluster is running successfully.

Step 2: Cloning the GitHub Repository

Clone the project's GitHub repository to your local machine:

git clone https://github.com/Rohit123890/reddit-clone-k8s-ingress.git

# Navigate to the project directory
cd reddit-clone-k8s-ingress

Step 3: Deploying the Reddit Clone Application

Apply the Kubernetes YAML files to deploy the Reddit clone application:

# Apply the Kubernetes YAML files
kubectl apply -f .

This will create the necessary pods, services, and other resources required for the application.

Step 4: Setting up Ingress

To access the application via a web browser, we'll set up Ingress. Make sure you have an Ingress controller installed in your Minikube cluster.

Apply the Ingress YAML file:

# Apply the Ingress YAML
kubectl apply -f ingress.yaml

Step 5: Accessing the Application

To access the application, you'll need to determine the IP and port where it's hosted. Use the following commands to get this information:

# Get the Minikube IP
minikube ip

# Get the NodePort of the Ingress controller
kubectl get services -n ingress-nginx

Now, open a web browser and navigate to http://<Minikube-IP>:<Ingress-NodePort>. You should see the Reddit clone web application up and running.

Conclusion

Congratulations! You've successfully deployed a Reddit clone web application on a Kubernetes Minikube cluster. This project provides a practical hands-on experience with Kubernetes, Ingress, and containerized applications. You can explore further by customizing the application or trying more advanced Kubernetes features. Enjoy your journey into the world of container orchestration and DevOps!