How aibangjuxin/knowledge works
Project type and purpose
• This is not a single deployable application but a personal knowledge‐base repository combined with a handful of small, demonstrator microservices (e.g. api-service) and code snippets.
• Its primary purpose is to store and organize your technical notes, scripts, demo apps, and reference architecture pieces for GCP/K8S/API Gateway patterns, plus one Python “api-service” microservice.
File structure
• Top‐level folders are organized by topic/domain (gcp/, k8s/, linux/, java/, nginx/, safe/, pipeline/, etc.).
• A small runnable component lives under api-service/ (Dockerfile, Python main.py, K8s manifest).
• Markdown files are purely documentation; no monolithic codebase or UI front end.
• No build scripts or server code outside api-service.
Key insights from README
• Network flow template:
Client → Nginx → Kong Gateway (GW) → Kong Runtime (RT) → External API
• Core stack: GCP (GKE, BigQuery, Firestore, Secret Manager), Kubernetes, Kong, CI/CD pipelines, Airflow/Harbor.
• Responsibilities: build/optimize API platform, auto-release pipelines, API quota in Firestore, secure networking.
a. Main components
• Developer Workstation (VSCode, Neovim) + Git Repo
• CI/CD Pipeline (e.g. GitHub Actions, Cloud Build, Airflow)
• Container Registry (GAR / Harbor)
• GKE Cluster
• Ingress layer: NGINX Ingress or Google Load Balancer + Kong Gateway (control plane + data plane)
• Microservice(s): api-service pods
• Data stores: Firestore (API Quota), BigQuery (analytics), Cloud Storage (buckets)
• Security services: Secret Manager, Cloud Armor, internal DNS whitelist
• External APIs
b. Relationships & data flow
1. Developer pushes Markdown, Python code → Git
2. CI/CD picks up commit → builds Docker image → pushes to GAR → optionally scans image → deploys to GKE via kubectl/apply
3. GKE Ingress (GCLB or NGINX) routes HTTP(S) → Kong Gateway control plane routes to data plane → api-service pods
4. api-service interacts with Firestore (quota), BigQuery (logs/analytics), Cloud Storage
5. Cloud Armor protects ingress; Secret Manager supplies credentials to pods; Cloud DNS enforces white-list
c. Architectural patterns
• Microservices: single‐responsibility service for API platform
• Infrastructure as Code: deployment.yaml, Helm or kubectl manifests
• GitOps/CICD: git→build→deploy flow
• API Gateway: Kong for routing, security, rate-limiting
• Zero-trust: Secret Manager & DNS whitelist
d. Key technologies
• GKE (K8S)
• Kong Gateway (CP & DP)
• NGINX or GCLB Ingress
• Python + FastAPI/Flask (api-service/main.py)
• Docker & GAR
• Terraform or kubectl YAML (not in this repo, but implied by deployment.yaml)
• Firestore, BigQuery, Cloud Storage
• Cloud Armor, Secret Manager, Cloud DNS
Elements
• Labels: “Developer”, “CI/CD”, “Container Registry”, “GKE Cluster”, “Ingress (NGINX/GCLB)”, “Kong CP/DP”, “api-service Pod”, “Firestore”, “BigQuery”, “Cloud Storage”, “External API.”
• Grey documents for knowledge repo