Containerized Node microservice
using Docker
and then deployed it on Google Kubernetes Engine
using the provided manifest files. This setup includes configurations for Pods, Deployments, and Services (NodePort and LoadBalancer).
- Prerequisites
- Manifests
- Deployment Instructions
- Accessing the Application
- Health Checks
- Clean Up
- Contact
- Project Status
- Contributing
- License
- Kubernetes cluster
kubectl
configured to interact with your cluster
- Pod Manifest
- Single instance of the application
- Container specification with image and ports
- Liveness and readiness probes for health checks
- Deployment Manifest
- Replica sets for high availability and scalability
- Rolling updates strategy
- Resource requests and limits
- Liveness and readiness probes
- NodePort Service Manifest
- Exposes service on a static port across all nodes
- Access via
<NodeIP>:<NodePort>
- LoadBalancer Service Manifest
- External load balancer creation
- Cloud provider-specific (e.g., AWS, GCP, Azure)
- Access via external IP provided by the load balancer
-
Apply the manifests:
kubectl apply -f pod.yaml kubectl apply -f deployment.yaml kubectl apply -f svc_np.yaml kubectl apply -f svc_lb.yaml
-
Verify deployments and services:
kubectl get pods kubectl get deployments kubectl get services
- NodePort
- Access the application using
<NodeIP>:<NodePort>
- Example:
http://<NodeIP>:30001
- Access the application using
- LoadBalancer
- Access the application using the external IP assigned by the load balancer
- Example:
http://<External-IP>:4000
- Liveness Probe:
/healthz
- Readiness Probe:
/readiness
- Ensures the application is running and ready to serve traffic
- Delete the resources:
kubectl delete -f pod.yaml
kubectl delete -f deployment.yaml
kubectl delete -f svc_np.yaml
kubectl delete -f svc_lb.yaml
Adarsh Kumar @ 21cs3060@rgipt.ac.in
Completed ✌️
Due to high incurring charges for Google Kubernetes Engine service at Google Cloud, The Web page has been taken down. However, I have provided the link to Docker image of the API.
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Distributed under the MIT License. See LICENSE
for more information.