Welcome to the repository for the Harpoon web application, designed to run on Google Kubernetes Engine (GKE). This project demonstrates how to deploy a web application on a Kubernetes cluster using GKE. It is based on NASA API, which is queried by a Flask backend with the necessary API Key obtained from NASA Website. Key is injected into backend using .env file for dev environment and docker compose and kubelet secret for GKE cluster. Using an input form, Mars Rover name and date can be selected. Either "Earth Date" or "Solar Mars Date" can be selected.
Harpoon is a simple web application that showcases the integration of a frontend with backend services, all orchestrated within a Kubernetes environment. The application is intended to serve as a learning tool for those interested in cloud-native technologies, particularly Kubernetes and GKE. Docker images are created with Dockerfiles then pushed to Dockerhub for GKE deployment.
- frontend: Frontend code, using framework React.
- backend: Backend services, using Python Flask.
- Terraform_GCP: Terraform files.
- Dockerfiles: Dockerfiles for containerizing the application.
- README.md: This file.
Before you begin, ensure you have the following installed:
- Google Cloud SDK
- Terraform
- Docker
- A Google Cloud Platform (GCP) account with billing enabled. Create a service account with necessary permissions, create an access key as json file and configure Terraform with this.
Images were built from Docker files and pushed to DockerHub.
docker build -t kemechial/nasa-api-frontend:v3 -f Dockerfiles/Dockerfile.frontend .
docker build -t kemechial/nasa-api-backend:v2 -f Dockerfiles/Dockerfile.backend .
docker push kemechial/nasa-api-frontend:v3
docker push kemechial/nasa-api-backend:v2
git clone https://github.com/kaanevranportfolio/GKE-cluster-web-app_Harpoon.git
cd GKE-cluster-web-app_Harpoon
System can be put into use by Terraform, with provisioning and remote execution, everything will be set up automatically.
cd Terraform_GCP
terraform apply
Finally the resulting cluster can be reviewed from console.




