Kubernetes Deploy

Overview
This project deploys a containerized application on Kubernetes, providing a scalable and reliable runtime environment. It defines how the application runs, exposes it internally and externally, and handles traffic using standard Kubernetes resources.
The focus is on consistent deployment, service exposure, and scaling, using declarative configuration.
Stack
Kubernetes
Docker
kubectl (CLI tool)
Minikube / Cloud cluster
Architecture
Deployment → Pods → Service → External AccessDeployment Configuration
apiVersion: apps/v1
kind: Deployment
metadata:
name: app-deployment
spec:
replicas: 2
selector:
matchLabels:
app: app
template:
metadata:
labels:
app: app
spec:
containers:
- name: app
image: app:latest
ports:
- containerPort: 3000Service Configuration
apiVersion: v1
kind: Service
metadata:
name: app-service
spec:
type: NodePort
selector:
app: app
ports:
- port: 80
targetPort: 3000
nodePort: 30007Commands
kubectl apply -f deployment.yaml
kubectl apply -f service.yaml
kubectl get pods
kubectl get servicesScaling
kubectl scale deployment app-deployment --replicas=4Result
Application runs in multiple pods
Traffic is distributed across instances
Service exposes the application externally
Scaling handled with a single command
Key Points
Declarative deployment using YAML
Automatic pod management
Built-in scaling and load balancing
Consistent runtime environment
Final Note
This project demonstrates how applications can be deployed and managed at scale using Kubernetes.
It ensures that applications are resilient, scalable, and easy to manage in production environments.

