Day 84: Project 5- Orchestrating Netflix: Deploying a Clone Web App with Kubernetes
Project Description:
The project involves deploying a Netflix clone web application on a Kubernetes cluster. Kubernetes is chosen as the container orchestration platform due to its capabilities in simplifying deployment and management of containerized applications. The deployment process will include creating Docker images of the web application and its dependencies, then deploying them onto the Kubernetes cluster using Kubernetes manifests. Kubernetes offers benefits such as high availability, scalability, and automatic failover of the application. Additionally, Kubernetes tools like Kubernetes Dashboard and kubectl will be used for monitoring and managing the deployed application. The ultimate goal is to demonstrate Kubernetes' power and advantages in deploying and managing containerized applications at scale.
Pre-requisites:
EC2 Instance Setup: Provision an EC2 instance with a t2.medium configuration via the AWS Management Console. This instance will serve as the environment for deploying the Netflix clone application.
Docker Installation: Install Docker on the EC2 instance to facilitate containerization. Docker is a widely-used platform for developing, shipping, and running applications within containers.
Kubernetes Installation: Install Kubernetes along with the kubectl utility on the EC2 instance. Kubernetes provides container orchestration capabilities, enabling efficient management of containerized applications across clusters of hosts.
For Reference My previous Blog
https://veddevopsblog.hashnode.dev/launching-your-first-kubernetes-cluster-with-nginx-running
Project Steps:
Retrieve Code from GitHub: Obtain the source code of the Netflix clone application from a GitHub repository and clone it onto the EC2 instance.
Docker Image Creation: Ensure a Dockerfile is available, containing instructions for building a Docker image of the Netflix clone application and its dependencies. Create a Docker image based on this file and instantiate a container from it.
Push Docker Image to DockerHub: Upload the Docker image to DockerHub, a cloud-based repository for Docker images. This step enables easy sharing and distribution of the image.
Create Deployment YAML File: Craft a deployment YAML file to define how Kubernetes should manage the deployment of the Netflix clone application. This file specifies details such as the Docker image to use, the number of replicas, and resource requirements.
Deploy and Validate Application: Apply the deployment YAML file to the Kubernetes cluster using kubectl. Verify the successful deployment and functioning of the application within the EC2 instance.
Establish Service Configuration: Create a service.yaml file to configure how external clients can access the Netflix clone application. This file defines a Kubernetes service to expose the application via node ports.
Verify Service Functionality: Apply the service.yaml file to the Kubernetes cluster and confirm that the service is correctly configured and accessible from external clients.
Test Accessibility with cURL: Utilize cURL to test the accessibility of the Netflix clone application via the provided URL. This step ensures that the application can be accessed without any issues.
Validate Public Accessibility: Validate the accessibility of the Netflix clone application via a public URL, ensuring it can be accessed from anywhere on the internet.
Utilize API Keys for Data Synchronization: During container creation, configure API keys to enable real-time data synchronization between the Netflix clone application and the actual Netflix platform. This ensures that the application displays up-to-date content information.This is achieved by configuring API key while creating the container. You can follow the readme.md file in the GitHub repository.
Conclusion:
In conclusion, the article guides readers through the deployment process of a Netflix clone web application using Kubernetes. By following the outlined steps, users can effectively deploy and manage containerized applications at scale, leveraging Kubernetes' powerful features for orchestration and management. The article emphasizes the benefits of Kubernetes in simplifying deployment, ensuring scalability, and enabling seamless management of containerized applications.
Subscribe to my newsletter
Read articles from Vedant Thavkar directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
Vedant Thavkar
Vedant Thavkar
"DevOps enthusiast and aspiring engineer. Currently honing skills in streamlining development workflows and automating infrastructure. Learning AWS, Docker, Kubernetes, Python, and Ansible. Eager to contribute and grow within the DevOps community."