โ— LIVE
OpenAI releases GPT-5 APIIndia AI startup raises $120MBitcoin ETF hits record inflowsMeta Llama 4 benchmarks leakedOpenAI releases GPT-5 APIIndia AI startup raises $120MBitcoin ETF hits record inflowsMeta Llama 4 benchmarks leaked
๐Ÿ“… Sat, 21 Mar, 2026โœˆ๏ธ Telegram
AiFeed24

AI & Tech News

๐Ÿ”
โœˆ๏ธ Follow
๐Ÿ Home๐Ÿค–AI๐Ÿ’ปTech๐Ÿš€Startupsโ‚ฟCrypto๐Ÿ”’Security๐Ÿ‡ฎ๐Ÿ‡ณIndiaโ˜๏ธCloud๐Ÿ”ฅDeals
โœˆ๏ธ News Channel๐Ÿ›’ Deals Channel
# Containerization and Container Orchestration
โ˜๏ธCloud & DevOps

# Containerization and Container Orchestration

Home/Cloud & DevOps/# Containerization and Container Orchestration

Project Review Develop a microservices-based weather application. The implementation involves creating two microservices; one for fetching weather data and another for diplaying it. The primary objectives include containerizing these microservices using Docker, deploying them to a Kubernetes cluster

โšกQuick SummaryAI generating...
B

Bruyo Emuavobor

๐Ÿ“… Mar 21, 2026ยทโฑ 7 min readยทDev.to โ†—
โœˆ๏ธ Telegram๐• TweetWhatsApp
๐Ÿ“ก

Original Source

Dev.to

https://dev.to/bruyo/-containerization-and-container-orchestration-54po
Read Full โ†—

Project Review

Develop a microservices-based weather application. The implementation involves creating two microservices; one for fetching weather data and another for diplaying it. The primary objectives include containerizing these microservices using Docker, deploying them to a Kubernetes cluster, and accessing them through Nginx.

Phase 1: Basic Frontend Application with Docker and Kubernetes

Hypothetical Use Case

We are deploying a simple static website (HTML and CSS) for a company's landing page. The goal is to containerize this application using Docker, deploy it to a Kubernetes cluster, and access it through Nginx.

Task

  1. Set up the project
  • Create a new project directory.
'mkdir my-weather-app'

app-dir

  • Inside the directory, create HTML file ('index.html') and a CSS file ('styles.css').
'touch index.html'

index-file

  • Copy and paste the code snippet below.

updated-index-file.JPG)

'touch styles.css'

css-file.JPG

  • Copy and paste the code snippet below.

updated-css-file.JPG

  1. Initialize Git.
  • Initialize a Git repository in the project directory.
'git init'

git-init.JPG

  1. Git Commit.
  • Add and commit the initial code to the Git repository.
'git add .'

add-file.JPG

'git commit -m "my first commit"'

commit-file.JPG

  1. Dockerize the application
  • Create a 'Dockerfile' specfying Nginx as the base image.
'nano Dockerfile'
  • Copy and paste the code snippet below into your Dockerfile.

  • Copy your HTML and CSS files into the Nginx HTML directory.

'# Use official Nginx image
FROM nginx:latest

# Remove default Nginx static files
RUN rm -rf /usr/share/nginx/html/*

# Copy your HTML and CSS files into Nginx directory
COPY index.html /usr/share/nginx/html/
COPY styles.css /usr/share/nginx/html/

# Expose port 80
EXPOSE 80

# Start Nginx (already default, but explicit is fine)
CMD ["nginx", "-g", "daemon off;"]'

dockerfile.JPG

  • Build the Docker Image.
'docker build -t my-weather-app .'

docker-build.JPG

  • Run the container.
'docker run -p 8080:80 my-weather-app'

run-container.JPG

  • Test in browser.
'http://localhost:8080'

test.JPG

  1. Push to Docker Hub
  • Log in to Docker Hub.

docker-hub.JPG

  • Push the Docker image to Docker Hub.

  • Create a repository named "my-weather-app".

create-repo.JPG

repo.JPG

  • Log in to Docker Hub from the terminal.
'docker login'

  • Tag your image correctly.
'docker images'

docker-image.JPG

'docker tag my-weather-app bruyo/my-weather-app:latest'

tag-image.JPG

  • Push the Image.
'docker push bruyo/my-weather-app:latest'

push.JPG

  1. Set up a Kind Kubernetes Cluster
  • Install Kind (Kubernetes in Docker)
'choco install kind'

kind.JPG

  • Verify installation.
'kind version'

version-kind.JPG

  • Ensure that Docker is running, the docker desktop must be running as well.
'docker ps'

docker-run.JPG

  • Create a Kind cluster.

  • Clean old broken cluster

'kind delete cluster'
'docker system prune -f'
'kind create cluster --image kindest/node:v1.29.2'

kind-cluster.JPG

  • Verify Cluster.
'kubectl get nodes'

verify-cluster.JPG

  • Deploy the Application.
'kubectl create deployment nginx --image=nginx'

dp-nginx.JPG

'kubectl get pods'

get-pod.JPG

  • Expose Service.
'kubectl expose deployment nginx --type=NodePort --port=80'

expose-svc.JPG

  • Get Access URL.
'kubectl get svc'

get-service.JPG

'kubectl port-forward service/nginx 8080:80

'

port.JPG

  • Open browser and open application with the link below:
'http://localhost:8080'

test-1.JPG

  1. Deploy to Kubernetes using YAML file
  • Create a Kubernetes Deployment YAML file specifying the image and desired replicas.
'nano nginx-deployment.yaml'
  • Copy and paste the code snippet below into the yaml file.
apiVersion: apps/v1
kind: Deployment
metadata:
  name: my-nginx-deployment
spec:
  replicas: 2
  selector:
    matchLabels:
      app: my-weather
  template:
    metadata:
      labels:
        app: my-weather
    spec:
      containers:
      - name: nginx-container
        image: nginx:latest   # Or your Docker Hub image (e.g. bruyo/my-nginx-app:latest)
        ports:
        - containerPort: 80

  • Apply the deployment to the cluster.
'kubectl apply -f nginx-deployment.yaml'

dp-created.JPG

  • Verify Deployment.
'kubectl get deployments'

apply-clp.JPG

  1. Create a Service (ClusterIP)
  • Create a Kubernetes service YAML file specifying the type as ClusterIP.
'nano nginx-service.yaml'
  • Copy and paste the code snippet below into the yaml file.
apiVersion: v1
kind: Service
metadata:
  name: my-nginx-service
spec:
  type: ClusterIP
  selector:
    app: my-weather   # MUST match Deployment labels
  ports:
    - protocol: TCP
      port: 80
      targetPort: 80

svc-yaml.JPG)

  • Apply the service to the cluster.
'kubectl apply -f nginx-service.yaml'

svc-file.JPG

  • Verify Service.
'kubectl get svc'

verify-svc.JPG

  1. Access the Application
  • Port-forward to the service to access the application locally.

'kubectl port-forward service/my-nginx-service 8080:80'

port-forward.JPG

  • Open your browser and visit the specified port to view the application.
'http://localhost:8080'

test-1.JPG

Tags:#cloud#dev.to

Found this useful? Share it!

โœˆ๏ธ Telegram๐• TweetWhatsApp

Read the Full Story

Continue reading on Dev.to

Visit Dev.to โ†—

Related Stories

โ˜๏ธ
โ˜๏ธCloud & DevOps

Majority Element

about 2 hours ago

โ˜๏ธ
โ˜๏ธCloud & DevOps

Building a SQL Tokenizer and Formatter From Scratch โ€” Supporting 6 Dialects

about 2 hours ago

โ˜๏ธ
โ˜๏ธCloud & DevOps

Markdown Knowledge Graph for Humans and Agents

about 2 hours ago

Moving Beyond Disk: How Redis Supercharges Your App Performance
โ˜๏ธCloud & DevOps

Moving Beyond Disk: How Redis Supercharges Your App Performance

about 2 hours ago

๐Ÿ“ก Source Details

Dev.to

๐Ÿ“… Mar 21, 2026

๐Ÿ• about 3 hours ago

โฑ 7 min read

๐Ÿ—‚ Cloud & DevOps

Read Original โ†—

Web Hosting

๐ŸŒ Hostinger โ€” 80% Off Hosting

Start your website for โ‚น69/mo. Free domain + SSL included.

Claim Deal โ†’

๐Ÿ“ฌ AiFeed24 Daily

Top 5 AI & tech stories every morning. Join 40,000+ readers.

โœฆ 40,218 subscribers ยท No spam, ever

Cloud Hosting

โ˜๏ธ Vultr โ€” $100 Free Credit

Deploy cloud servers in 25+ locations. From $2.50/mo. No contract.

Claim $100 Credit โ†’
AiFeed24

India's AI-powered tech news hub. Daily coverage of AI, startups, crypto and emerging technology.

โœˆ๏ธ๐Ÿ›’

Topics

Artificial IntelligenceStartups & VCCryptocurrencyCybersecurityCloud & DevOpsIndia Tech

Company

About AiFeed24Write For UsContact

Daily Digest

Top 5 AI stories every morning. 40,000+ readers.

No spam, ever.

ยฉ 2026 AiFeed24 Media.Affiliate Disclosure โ€” We earn commission on qualifying purchases at no extra cost to you.
PrivacyTermsCookies