๐ฌ Deploy a Netflix Clone on Kubernetes with Kind in Minutes


Want to deploy a Netflix-like app using Kubernetes โ right on your local machine? In this blog, you will learn how to set up and deploy a containerized Netflix clone using kind
(Kubernetes IN Docker), kubectl
, and Docker
.
A perfect beginner-friendly DevOps project! ๐ก
๐ง Prerequisites
Ensure the following tools are installed on your local machine:
๐ฅ Clone the Project
git clone https://github.com/AkshaySiv/k8s-kind-netflix
cd k8s-kind-netflix
๐ Project Structure
k8s-kind-netflix/
โโโ src/ # Netflix clone app source code
โโโ Dockerfile # Dockerfile to build app image
โโโ k8s/
โ โโโ deployment.yaml # Kubernetes Deployment
โ โโโ service.yaml # Kubernetes Service
โโโ README.md
๐ Steps to Deploy
๐น Step 1: Create a Kind Cluster
Create a file named multi-node-kind-cluster.yaml
:
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
nodes:
- role: control-plane
- role: worker
- role: worker
Then run:
kind create cluster --config multi-node-kind-cluster.yaml --name netflix
๐น Step 2: Build and Push Docker Image
Replace akshaysiv
with your own Docker Hub username if needed:
docker build --build-arg TMDB_V3_API_KEY=<your-api-key> -t akshaysiv/k8s-kind-netflix:latest .
docker push akshaysiv/k8s-kind-netflix
How to get the API Key:
Open a web browser and navigate to TMDB (The Movie Database) website.
Click on "Login" and create an account.
Once logged in, go to your profile and select "Settings."
Click on "API" from the left-side panel.
Create a new API key by clicking "Create" and accepting the terms and conditions.
Provide the required basic details and click "Submit."
You will receive your TMDB API key.
Ensure your image is pushed to dockerhub
๐ฆ Kubernetes Manifests
k8s/deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: netflix-clone
spec:
replicas: 1
selector:
matchLabels:
app: netflix-clone
template:
metadata:
labels:
app: netflix-clone
spec:
containers:
- name: netflix-clone
image: akshaysiv/k8s-kind-netflix:latest
ports:
- containerPort: 80
k8s/service.yaml
apiVersion: v1
kind: Service
metadata:
name: netflix-clone-service
spec:
selector:
app: netflix-clone
ports:
- protocol: TCP
port: 80
targetPort: 80
type: ClusterIP
๐น Step 3: Deploy to Kind
kubectl apply -f k8s/deployment.yaml
kubectl apply -f k8s/service.yaml
๐น Step 4: Access the Application
Expose the service locally using port-forward:
kubectl port-forward svc/netflix-clone-service 8080:80
Now visit your app at:
๐งน Cleanup
To delete the cluster:
kind delete cluster --name netflix
๐ก Final Thoughts
This walkthrough gives you a quick hands-on with:
Creating a multi-node Kubernetes cluster with Kind
Building and deploying Dockerized applications
Managing deployments and services in Kubernetes
Want to take this further? Add a database, logging, or CI/CD pipeline for even more learning!
Check out the GitHub repo and feel free to fork and customize: ๐ AkshaySiv/k8s-kind-netflix
๐ Connect with Me
Subscribe to my newsletter
Read articles from AKSHAY SIV directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by

AKSHAY SIV
AKSHAY SIV
๐ DevOps Engineer | Cloud Enthusiast | Automation Specialist ๐ Sharing insights on DevOps best practices, infrastructure as code, and system reliability.