Skip to content

FastAPI + Docker + Google Kubernetes Engine (GKE) + GitHub Actions — fully automated deployment pipeline

Notifications You must be signed in to change notification settings

nahidulhasan/fastapi-project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Overview

This project demonstrates how to build, containerize, and deploy a FastAPI microservice on Google Kubernetes Engine (GKE) using GitHub Actions CI/CD. It includes:

FastAPI application

Docker image pushed to Google Artifact Registry

Kubernetes Deployment + LoadBalancer Service

Automated CI/CD pipeline using GitHub Actions

Publicly accessible endpoint through GKE LoadBalancer

🔧 Prerequisites

Before deploying, ensure you have:

Google Cloud account (Free Tier or paid)

GKE cluster created

Artifact Registry repository created

Service Account with required permissions:

Artifact Registry Writer

Kubernetes Engine Developer

Service Account User

Service account key stored in GitHub Secrets:

GCP_SA_KEY

🤖 GitHub Actions CI/CD

The pipeline does:

Authenticate to Google Cloud

Build & push Docker image to Artifact Registry

Apply Kubernetes manifests

Redeploy automatically on every git push to main

📜 License

MIT License

About

FastAPI + Docker + Google Kubernetes Engine (GKE) + GitHub Actions — fully automated deployment pipeline

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published