This is a sample repository which describes how to set up a GiHub Actions workflow to deploy a simple Spring Boot Application to Google Kubernetes Engine.
In this we have set up the following workflow
- Checking out the Repository
- Setting up the Environment for Building Application
- Building the Application
- Adding Google Cloud CLI to Environment
- Setting up Gcloud CLI
- Configuring Docker
- Building the Docker Image
- Publishing the Docker Image to Google Container Registry
- Setting up Kustomize
- Deploying the Image to Google Kubernetes Engine
- Create your Spring Boot Application.
- Add GKE_PROJECT and GKE_SA_KEY to your repository.
- Dockerize your Application using Dockerfile.
- Setup pipelines.yaml file in .github/workflow folder.
- Add Kustomzation.yaml file
- Add deployment.yaml and Service.yaml file
- Push the changes to github repo
This is how you can set up the GitHub Actions and trigger on each push to the repository the workflow will get triggered and if success the code will be published to GKE.
Tutorial Link: https://youtu.be/_Vy631QpfI0