This repository contains scripts and configuration files for setting up a Kubernetes cluster using Kind and deploying a simple Node.js application.
setup-cluster.sh: Bash script for installing Kind and creating a local Kubernetes cluster.main.tf: Terraform script for deploying the Node.js application image to the Kubernetes cluster.
Dockerfile: Dockerfile for building the Node.js application container.kube.yaml: Kubernetes Deployment manifest for deploying the Node.js application.
Before running the scripts, make sure you have the following tools installed:
- Docker
- Kind
- Terraform
- kubectl
- Run
setup-cluster.shto install Kind and create a local Kubernetes cluster (For MacOS users, you may need to adjust to your requirement). - Run
npm initto create a simple Node.js application and setup your package.json. - Run
docker buildto build the Node.js application. - Run
docker pushto push it to your docker hub repository. - Run
main.tfto deploy the Node.js application image to the Kubernetes cluster.
- Ensure that the necessary permissions are set up for pulling images from your Docker registry.
- Adjust the configuration files as needed for your specific environment.