Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/adarsh-k27r/microservice-k8s
Containerization of a Node Microservice using Docker engine and further deployment/Orchestration using Google Kubernetes Engine (GKE).
https://github.com/adarsh-k27r/microservice-k8s
auto-scaling containerization dockerfile gcp gke kubectl kubernetes load-balancer manifest-files microservice minikube nodejs nodeport pods replicas yaml
Last synced: 9 days ago
JSON representation
Containerization of a Node Microservice using Docker engine and further deployment/Orchestration using Google Kubernetes Engine (GKE).
- Host: GitHub
- URL: https://github.com/adarsh-k27r/microservice-k8s
- Owner: adarsh-k27r
- Created: 2023-11-21T18:26:48.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2024-07-25T16:17:45.000Z (4 months ago)
- Last Synced: 2024-07-26T14:30:24.166Z (4 months ago)
- Topics: auto-scaling, containerization, dockerfile, gcp, gke, kubectl, kubernetes, load-balancer, manifest-files, microservice, minikube, nodejs, nodeport, pods, replicas, yaml
- Language: HTML
- Homepage: https://hub.docker.com/r/adarshk27r/node-api/tags
- Size: 238 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Containerization of a Web Microservice using Docker and Kubernetes Orchestration
## Introduction
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)**.
## Table of Contents
- [Prerequisites](#prerequisites)
- [Manifests](#manifests)
- [Deployment Instructions](#deployment-instructions)
- [Accessing the Application](#accessing-the-application)
- [Health Checks](#health-checks)
- [Clean Up](#clean-up)
- [Contact](#contact)
- [Project Status](#project-status)
- [Contributing](#contributing)
- [License](#license)## Prerequisites
- Kubernetes cluster
- `kubectl` configured to interact with your cluster## Manifests
- **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 `:`- **LoadBalancer Service Manifest**
- External load balancer creation
- Cloud provider-specific (e.g., AWS, GCP, Azure)
- Access via external IP provided by the load balancer## Deployment Instructions
1. Apply the manifests:
```sh
kubectl apply -f pod.yaml
kubectl apply -f deployment.yaml
kubectl apply -f svc_np.yaml
kubectl apply -f svc_lb.yaml
```2. Verify deployments and services:
```sh
kubectl get pods
kubectl get deployments
kubectl get services
```## Accessing the Application
- **NodePort**
- Access the application using `:`
- Example: `http://:30001`- **LoadBalancer**
- Access the application using the external IP assigned by the load balancer
- Example: `http://:4000`## Health Checks
- **Liveness Probe**: `/healthz`
- **Readiness Probe**: `/readiness`
- Ensures the application is running and ready to serve traffic## Clean Up
1. Delete the resources:
```sh
kubectl delete -f pod.yaml
kubectl delete -f deployment.yaml
kubectl delete -f svc_np.yaml
kubectl delete -f svc_lb.yaml
```## Contact
**Adarsh Kumar** @ [[email protected]](mailto:[email protected])
## Project Status
Completed ✌️
### Alert
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.
## Contributing
Pull requests are welcome. For major changes, please open an issue first
to discuss what you would like to change.## License
Distributed under the [MIT](https://choosealicense.com/licenses/mit/) License. See `LICENSE` for more information.