This project demonstrates the complete containerization and deployment lifecycle of a web application using Docker and Kubernetes.
A custom Nginx web application was containerized using Docker, published to Docker Hub, and deployed on a Kubernetes multi-node cluster consisting of 1 Master Node and 3 Worker Nodes.
The project covers image creation, container deployment, image registry integration, Kubernetes deployment, service exposure, and application validation.
Custom HTML Application
│
▼
Dockerfile
│
▼
Docker Image
│
▼
Docker Container
│
▼
Docker Hub
│
▼
Kubernetes Deployment
│
▼
Kubernetes Service
│
▼
Browser Access
- Operating System: Ubuntu Linux
- Docker Engine
- Docker Hub
- Kubernetes Cluster
- kubeadm
- kubelet
- kubectl
- containerd
- Calico Networking
- Build a custom Docker image
- Deploy containers using Docker
- Push images to Docker Hub
- Pull images from a remote registry
- Deploy workloads on Kubernetes
- Scale applications using Deployments
- Expose applications using NodePort Services
- Validate end-to-end application accessibility
docker --versionFROM nginx:latest
COPY index.html /usr/share/nginx/html/index.html
EXPOSE 80docker build -t asha-nginx:v1 .docker imagesdocker run -d --name asha-web -p 8080:80 asha-nginx:v1docker pshttp://192.168.247.129:8080
docker logindocker tag asha-nginx:v1 asha21697/asha-nginx:v1docker push asha21697/asha-nginx:v1Image successfully published to Docker Hub and made available for Kubernetes deployments.
kubectl create deployment asha-nginx \
--image=asha21697/asha-nginx:v1 \
--replicas=3kubectl get deploymentkubectl get pods -o widekubectl expose deployment asha-nginx \
--type=NodePort \
--port=80kubectl get svcdocker --version
docker build -t asha-nginx:v1 .
docker images
docker run -d --name asha-web -p 8080:80 asha-nginx:v1
docker ps
docker login
docker tag asha-nginx:v1 asha21697/asha-nginx:v1
docker push asha21697/asha-nginx:v1
kubectl create deployment asha-nginx \
--image=asha21697/asha-nginx:v1 \
--replicas=3
kubectl get deployment
kubectl get pods -o wide
kubectl expose deployment asha-nginx \
--type=NodePort \
--port=80
kubectl get svc
docker container prune -f
docker image prune -a -f- Docker Containerization - Containerized a custom Nginx web application using Docker.
- Docker Image Management - Built and managed Docker images using Dockerfile.
- Docker Hub Integration - Published custom images to Docker Hub.
- Container Deployment - Executed and validated containers locally.
- Kubernetes Deployment - Deployed workloads on a Kubernetes multi-node cluster.
- Replica Management - Created Deployments with multiple replicas.
- Service Exposure - Exposed applications using NodePort Services.
- Application Validation - Verified end-to-end browser accessibility.
- Troubleshooting Experience - Resolved Docker authentication and deployment-related issues.
- Resource Optimization - Performed Docker image and container cleanup.
- DevOps Workflow - Demonstrated a complete Docker-to-Kubernetes deployment pipeline.
- Docker Administration
- Docker Image Management
- Dockerfile Development
- Docker Hub Integration
- Container Lifecycle Management
- Kubernetes Deployments
- Kubernetes Services
- Pod Management
- NodePort Networking
- Linux Administration
- DevOps Fundamentals
- Container Orchestration
- Application Deployment
- Infrastructure Troubleshooting
During the implementation of this project, several real-world issues were encountered and resolved:
- Encountered permission denied while accessing the Docker daemon socket.
- Resolved by executing Docker commands with appropriate privileges.
- Successfully validated Docker installation using the hello-world container.
- Initial Docker login attempts failed due to incorrect credentials.
- Verified Docker Hub account details and retried authentication.
- Successfully established Docker Hub access.
- Local Docker images were not accessible to Kubernetes worker nodes.
- Tagged images using Docker Hub repository conventions.
- Published images successfully to a centralized registry.
- Verified successful image retrieval from Docker Hub.
- Ensured image availability across all worker nodes.
- Confirmed container startup after image download.
- Observed pods in ContainerCreating state during deployment.
- Monitored pod lifecycle and image pull progress.
- Verified successful transition to Running state.
- Configured Kubernetes NodePort Service.
- Verified service creation and port assignment.
- Successfully accessed the application through the browser.
- Performed container and image cleanup using Docker prune commands.
- Reclaimed storage space and optimized system resources.
- Verified cleanup using Docker system reports.
Successfully verified:
- Docker Image Creation
- Docker Container Execution
- Docker Hub Image Publishing
- Kubernetes Deployment Creation
- Pod Scheduling Across Worker Nodes
- NodePort Service Accessibility
- Browser-Based Application Access
- Understanding Docker image creation workflow
- Working with Docker containers and port mapping
- Publishing images to Docker Hub
- Integrating Docker Hub with Kubernetes
- Managing Deployments and ReplicaSets
- Exposing applications using Services
- Understanding container orchestration concepts
- Managing application lifecycle in Kubernetes
- Troubleshooting deployment issues
- Implementing real-world DevOps workflows
- Jenkins CI/CD Pipeline
- Helm Package Management
- Prometheus Monitoring
- Grafana Dashboards
- Kubernetes Ingress Controller
- GitHub Actions Automation
- Horizontal Pod Autoscaling
- Kubernetes Persistent Volumes
ASHA
Linux | Docker | Kubernetes | DevOps Enthusiast









