{"id":33378476,"url":"https://github.com/leehmdev/gke-gitops-observability-lab","last_synced_at":"2026-05-05T01:38:46.957Z","repository":{"id":325679882,"uuid":"1102016141","full_name":"leehmdev/gke-gitops-observability-lab","owner":"leehmdev","description":"End-to-end GKE GitOps \u0026 Observability lab using Terraform, Helm, Argo CD, Prometheus, and Grafana","archived":false,"fork":false,"pushed_at":"2025-11-22T18:37:20.000Z","size":27,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-11-22T19:21:55.483Z","etag":null,"topics":["argocd","devops","gitops","gke","grafana","helm","kubernetes","prometheus","sre","terraform"],"latest_commit_sha":null,"homepage":"","language":"HCL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/leehmdev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-11-22T17:00:53.000Z","updated_at":"2025-11-22T18:37:23.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/leehmdev/gke-gitops-observability-lab","commit_stats":null,"previous_names":["leehmdev/gke-gitops-observability-lab"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/leehmdev/gke-gitops-observability-lab","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leehmdev%2Fgke-gitops-observability-lab","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leehmdev%2Fgke-gitops-observability-lab/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leehmdev%2Fgke-gitops-observability-lab/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leehmdev%2Fgke-gitops-observability-lab/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/leehmdev","download_url":"https://codeload.github.com/leehmdev/gke-gitops-observability-lab/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leehmdev%2Fgke-gitops-observability-lab/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32632290,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-04T10:08:07.713Z","status":"ssl_error","status_checked_at":"2026-05-04T10:08:02.005Z","response_time":58,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["argocd","devops","gitops","gke","grafana","helm","kubernetes","prometheus","sre","terraform"],"created_at":"2025-11-23T01:04:42.319Z","updated_at":"2026-05-05T01:38:46.924Z","avatar_url":"https://github.com/leehmdev.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GKE GitOps + Observability Lab\n\nThis repository demonstrates a practical **GitOps-based Kubernetes deployment on Google Kubernetes Engine (GKE)**, combined with full **observability using Prometheus and Grafana**.\n\nIt represents a clean, production-style setup using industry-standard tools and workflows.\n\n---\n\n## 🛠 Technologies Used\n\n- **Google Kubernetes Engine (GKE)**\n- **Terraform**\n- **Helm**\n- **Argo CD (GitOps)**\n- **Prometheus**\n- **Grafana**\n- **NGINX Sample API**\n- **GitHub (GitOps repository)**\n\n---\n\n## 🏗 Architecture Overview\n\n```text\nGitHub (main branch)\n│\n▼\nArgo CD\n│\n▼\nGKE Cluster (asia-northeast1-b)\n│\n├── sample-api (NGINX)\n└── Monitoring (Prometheus + Grafana)\n```\n\n---\n\n## 📂 Repository Structure\n\n```text\ngke-gitops-observability-lab/\n│\n├── terraform/                   # Terraform code to provision VPC + GKE\n│\n├── apps/\n│   └── sample-api/               # Helm chart for NGINX application\n│\n├── argocd/\n│   └── sample-api-app.yaml       # Argo CD Application manifest\n│\n├── docs/\n│   └── screenshots/              # Grafana / Argo / Architecture screenshots\n│\n└── README.md\n```\n\n---\n\n## 🚀 Deployment Flow\n\n### 1️⃣ Infrastructure Provisioning (Terraform)\n\n```bash\ncd terraform\nterraform init\nterraform plan\nterraform apply\n```\n\nThis creates:\n- VPC + Subnet\n- GKE Cluster in `asia-northeast1-b`\n- Required IAM / networking components\n\n---\n\n### 2️⃣ Monitoring Stack Installation (Helm)\n\n```bash\nhelm repo add prometheus-community https://prometheus-community.github.io/helm-charts\nhelm repo update\n\nhelm install prometheus prometheus-community/kube-prometheus-stack \\\n  --namespace monitoring --create-namespace\n```\n\nVerify:\n\n```bash\nkubectl get pods -n monitoring\n```\n\n---\n\n### 3️⃣ Sample Application Deployment (Helm)\n\n```bash\nkubectl create namespace apps\n\ncd apps/sample-api\nhelm install sample-api . -n apps\n```\n\nVerify:\n\n```bash\nkubectl get pods -n apps\nkubectl get svc -n apps\n```\n\nYou should see an **external IP** attached to the `sample-api` service.\n\n---\n\n## 🔄 GitOps Deployment (Argo CD)\n\n### Apply the Argo CD application\n\n```bash\nkubectl apply -n argocd -f argocd/sample-api-app.yaml\n```\n\nArgo CD will now:\n- Monitor this GitHub repository\n- Compare desired state vs actual state\n- Automatically sync Kubernetes resources\n\n---\n\n## 🌐 Argo CD Web UI Access\n\n### Start port-forwarding\n\n```bash\nkubectl port-forward svc/argocd-server -n argocd 8080:443\n```\n\nThen open in browser:\n\n```\nhttp://localhost:8080\n```\n\n### Login details\n\nDefault username:\n\n```text\nadmin\n```\n\nGet the initial password:\n\n```bash\nkubectl get secret argocd-initial-admin-secret \\\n  -n argocd \\\n  -o jsonpath=\"{.data.password}\" | base64 --decode ; echo\n```\n\nAfter login, you should see:\n\n- ✅ Application: `sample-api`\n- ✅ Status: **Synced**\n- ✅ Health: **Healthy**\n- ✅ Source: GitHub repository\n- ✅ Target: `apps` namespace in GKE\n\n---\n\n## 📊 Grafana Web UI Access (Observability)\n\n### Start port-forwarding\n\n```bash\nkubectl port-forward -n monitoring svc/prometheus-grafana 3000:80\n```\n\nOpen in browser:\n\n```text\nhttp://localhost:3000\n```\n\nUsername:\n\n```text\nadmin\n```\n\nGet the password:\n\n```bash\nkubectl get secret --namespace monitoring prometheus-grafana \\\n  -o jsonpath=\"{.data.admin-password}\" | base64 --decode ; echo\n```\n\nAvailable dashboards:\n- Kubernetes / Cluster\n- Pods / Nodes / Workloads\n- CoreDNS \u0026 Networking\n- etcd, kubelet, API server\n\n---\n\n## ✅ How to Validate GitOps is Working\n\n1) Edit this file in GitHub:\n\n```\napps/sample-api/values.yaml\n```\n\nExample change:\n\n```yaml\nreplicaCount: 3\n```\n\n2) Commit \u0026 Push to GitHub\n\n```bash\ngit add apps/sample-api/values.yaml\ngit commit -m \"Increase replicas to 3\"\ngit push\n```\n\n3) In Argo CD Web UI:\n- Click **Refresh**\n- Then **Sync**\n\n4) Verify:\n\n```bash\nkubectl get pods -n apps\n```\n\n✅ You should now see **3 pods running**\n\nThis confirms:\n- GitHub → Argo CD → GKE is fully working ✅\n\n---\n\n## ✅ Key Features\n\n- Real GitOps workflow using Argo CD\n- Infrastructure as Code with Terraform\n- Helm-based application deployment\n- Full observability (Prometheus + Grafana)\n- Reproducible \u0026 scalable architecture\n- Production-style structure\n\n---\n\nThis repository is intended as a reference, learning resource, and example of best practices for GitOps-based Kubernetes operations on GCP.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleehmdev%2Fgke-gitops-observability-lab","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleehmdev%2Fgke-gitops-observability-lab","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleehmdev%2Fgke-gitops-observability-lab/lists"}