Project Description
The project involves deploying a Netflix clone web application on a Kubernetes cluster, a popular container orchestration platform that simplifies the deployment and management of containerized applications. The project will require creating Docker images of the web application and its dependencies and deploying them onto the Kubernetes cluster using Kubernetes manifests. The Kubernetes cluster will provide benefits such as high availability, scalability, and automatic failover of the application. Additionally, the project will utilize Kubernetes tools such as Kubernetes Dashboard and Kubectl to monitor and manage the deployed application. Overall, the project aims to demonstrate the power and benefits of Kubernetes for deploying and managing containerized applications at scale.
🔶 Task: Netflix Clone Deployment on Kubernetes
Get a Netflix clone from GitHub, read this and follow the Reddit clone steps to similarly deploy a Netflix Clone
🔶 Pre-requisites:
Before diving into the deployment, make sure you have the following:
- A working Kubernetes cluster set up with Kubeadm. For setting up Kubernetes on AWS EC2, follow this guide.
Clone the Netflix Clone app from GitHub.
Clone the Netflix Clone Repository: Navigate to the directory where you want to clone the Netflix Clone repository from GitHub. Use the following command to clone the repository:git clone https://github.com/Chandreshpatle28/netflix-clone-react-typescript.git
Build Docker Image: Once you have cloned the repository, navigate to the project directory and locate the Docker file. Ensure that the Dockerfile specifies the necessary dependencies and configurations for your Netflix Clone web application. Build the Docker image using the following command:
docker build -t chandreshpatle28/netflix-clone .
Docker run:
docker run -d chandreshpatle28/netflix-clone
Login to your docker hub and push the image using the below command
docker push chandreshpatle28/netflix-clone:latest
Verify and check whether the image is pushed or not.
Now let's dive into the Kubernetes Deployment part.
apiVersion: apps/v1 kind: Deployment metadata: name: netflix-app labels: app: netflix-app spec: replicas: 2 selector: matchLabels: app: netflix-app template: metadata: labels: app: netflix-app spec: containers: - name: netflix-app image: chandreshpatle28/netflix-clone ports: - containerPort: 80
kubectl apply -f deployment.yml
Now service part:
apiVersion: v1 kind: Service metadata: name: netflix-app labels: app: netflix-app spec: type: NodePort ports: - port: 80 targetPort: 80 nodePort: 30007 selector: app: netflix-app
kubectl apply -f service.yml
Verify the Deployment:
kubectl get deployment kubectl get pods kubectl get service netflix-app
Access the Netflix Clone App:
Check with the Public URL and we can now see the Netflix APP running on the server.
Make sure you added Custom TCP Rule 30007 on the worker node in the security group.
With the inbound rule added, the Netflix Clone app should now be accessible via <worker_node_external_ip>:30007 in your web browser.
In conclusion, this project showcases the power of Kubernetes in scaling and managing containerized applications, demonstrated through the deployment of a Netflix clone web application. Here are the key takeaways from this endeavor:
Kubernetes for Scalability: Kubernetes serves as the core technology for orchestrating containerized applications. In this project, we leveraged its capabilities to handle the deployment and scaling of the Netflix clone web application. The use of Kubernetes offers high availability, scalability, and the ability to automatically manage failovers, essential for ensuring a seamless user experience in streaming services.
Streamlined Deployment: The process of deploying the Netflix clone on Kubernetes involved creating Docker images of the web application and its dependencies, along with defining configurations in Kubernetes manifests. This streamlined approach simplifies deployment and promotes consistency across the application, which is essential when managing a scalable streaming service.
The successful deployment of the Netflix clone web application on Kubernetes not only demonstrates the benefits of container orchestration but also underscores the pivotal role Kubernetes plays in the world of scalable and reliable streaming services. By following the steps outlined in this project, you can harness the power of Kubernetes to deploy and manage containerized applications at scale, making it an indispensable tool for modern software development and service delivery.
Happy Learning :)
Stay in the loop with my latest insights and articles on cloud ☁️ and DevOps ♾️ by following me on Hashnode, LinkedIn (https://www.linkedin.com/in/chandreshpatle28/), and GitHub (https://github.com/Chandreshpatle28).
Thank you for reading! Your support means the world to me. Let's keep learning, growing, and making a positive impact in the tech world together.
#Git #Linux Devops #Devopscommunity #90daysofdevopschallenge #python #docker #Jenkins #Kubernetes #Terraform #AWS #Grafana