This repository contains infrastructure and deployment configurations for the Ish Bot application, which is deployed on Kubernetes clusters across AWS and GCP.
The Ish Bot is a web-based bot application that runs in a containerized environment. It is deployed using Kubernetes manifests and managed via Terraform infrastructure code. The project supports deployment on both AWS and GCP cloud providers.
- terraform/: Contains Terraform configurations for provisioning infrastructure on AWS and GCP.
- AWS/: AWS-specific Terraform modules for networking, compute, storage, and other resources.
- GCP/: GCP-specific Terraform modules for networking, compute, storage, and other resources.
- k8s/: Kubernetes manifests for deploying the Ish Bot application.
- config.yml: Configuration map for the Ish Bot.
- deployment.yml: Deployment manifest for the Ish Bot.
- service.yml: Service definition exposing the Ish Bot via NodePort.
- scripts/: Helper scripts for setting up and managing the Kubernetes cluster.
- k8s/: Scripts for installing and configuring Kubernetes components.
- start_worker.sh: Script to start and configure a Kubernetes worker node.
- start_control_plane.sh: Script to start and configure the Kubernetes control plane.
- start_etcd.sh: Script to start and configure etcd for the Kubernetes cluster.
- install_control_plane.sh: Script to install Kubernetes control plane components.
- install_worker.sh: Script to install Kubernetes worker components.
- generate_kubelet_config.sh: Script to generate kubelet configuration.
- generate_admin_config.sh: Script to generate admin kubeconfig.
- k8s/: Scripts for installing and configuring Kubernetes components.
- others/: Additional Kubernetes manifests and configurations.
- storageclass.yml: Storage class definitions for persistent storage.
- gcp_storageclass.yml: GCP-specific storage class definition.
- pod-definition.yml: Pod definition for the Ish Bot.
- pvc.yml: Persistent volume claim for the Ish Bot.
- replicaset-definition.yml: ReplicaSet definition for the Ish Bot.
- Terraform installed
- kubectl installed
- AWS or GCP account credentials configured
- Navigate to the
terraformdirectory and choose your cloud provider (AWS or GCP). - Initialize Terraform:
terraform init
- Apply the Terraform configuration:
terraform apply
-
Use the scripts in the
scripts/k8sdirectory to set up the Kubernetes cluster:- Run
install_control_plane.shon the control plane node. - Run
install_worker.shon each worker node. - Run
start_etcd.shon the etcd node. - Run
start_control_plane.shon the control plane node. - Run
start_worker.shon each worker node.
- Run
-
Generate the necessary kubeconfig files:
- Run
generate_admin_config.shto generate the admin kubeconfig. - Run
generate_kubelet_config.shon each worker node.
- Run
-
Apply the Kubernetes manifests in the
k8sdirectory:kubectl apply -f k8s/config.yml kubectl apply -f k8s/deployment.yml kubectl apply -f k8s/service.yml
-
Apply the storage configurations:
kubectl apply -f others/storageclass.yml kubectl apply -f others/gcp_storageclass.yml kubectl apply -f others/pvc.yml
This project is licensed under the MIT License. See the LICENSE file for details.