Skip to content

Navigation Menu

Sign in
Sign up

Repository files navigation

Microservices K8S Infrastructure

A Kubernetes-based microservices infrastructure for the Microservices platform, managing the deployment of admin , client , authentication , and user services across development and production environments.


📁 Project Structure

microservices-k8s-infra/
├── cloudbuild.yaml # Google Cloud Build configuration
├── skaffold.yaml # Skaffold for Kubernetes CI/CD automation
├── docs/ # Documentation for deployment and processes
│ └── deployment/ # Environment-specific deployment docs
├── infra/ # Infrastructure for development & production
│ ├── development/ # Dev Docker & K8s manifests
│ │ ├── docker/ # Dockerfiles for each service
│ │ └── k8s/ # Kubernetes manifests (Deployments, Ingress)
│ └── production/ # Production Docker & K8s manifests
├── microservices-admin-app/ # Next.js Admin Dashboard
├── microservices-client-app/ # Next.js Client Application
└── microservices-backend/ # Go-based microservices (Auth, User, Admin)

🚀 Core Services

Service Description Path Language
Admin App Admin dashboard for managing spaces microservices-admin-app/ Next.js
Client App User-facing coworking space client microservices-client-app/ Next.js
Auth Service Authentication (JWT, RBAC) microservices-backend/auth-service/ Go (Gin)
User Service User management microservice microservices-backend/user-service/ Go (Gin)
Admin Service Admin-specific management microservices-backend/admin-service/ Go (Gin)

🌐 Deployment Overview Development

  • Uses local Docker images and K8s manifests in infra/development

  • Configured for fast iteration via Skaffold

Production

  • Optimized Docker images in infra/production

  • Uses Google Cloud Build and Skaffold for CI/CD


📦 Prerequisites

  • Docker (Containerization)

  • Kubernetes (Container Orchestration)

  • kubectl (Kubernetes CLI)

  • Skaffold (K8s workflow automation)


🛠️ Local Development Setup

  1. Clone Repository
git clone https://github.com/Bunty9/microservices-k8s-infra.git
cd microservices-k8s-infra
  1. Start Kubernetes Cluster
  • start docker desktop and enable kubernetes
  1. Deploy Services
skaffold dev
  1. Access the Platform
  • Admin Dashboard: http://localhost:32001

  • Client App: http://localhost:32000


📊 Environment Variables

  • create .env files in each susequent microservices folder
  • create .env.dev and .env.prod in microservices-backend

Set environment variables using Kubernetes ConfigMaps :

kubectl create configmap microservices-auth-app-env --from-env-file=microservices-auth-app/.env
kubectl create configmap microservices-user-app-env --from-env-file=microservices-user-app/.env
kubectl create configmap microservices-admin-app-env --from-env-file=microservices-admin-app/.env

📤 Production Deployment (Google Cloud)

  1. Authenticate with GCP
gcloud auth login
gcloud config set project YOUR_PROJECT_ID
  1. Trigger Build and Deploy
gcloud builds submit --config cloudbuild.yaml

📜 Useful Commands

Task Command
Start local dev environment skaffold dev
Apply Kubernetes manifests kubectl apply -f infra/development
Inspect pod logs kubectl logs -f
List Kubernetes services kubectl get svc
Get all Resources kubectl get all

📚 Documentation

  • Development Guide : docs/deployment/dev/dev.md

  • Production Guide : docs/deployment/prod/


🤝 Contributing

  1. Fork the repo

  2. Create a feature branch

  3. Submit a pull request


📧 Contact For issues or contributions, reach out via GitHub Issues .

About

Kubernetes microservices infrastructure — admin/client/auth/user services across dev & prod, with Docker, Skaffold, and Google Cloud Build CI/CD.

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages

AltStyle によって変換されたページ (->オリジナル) /