{"id":21599292,"url":"https://github.com/t04glovern/gke-dm-bootstrap","last_synced_at":"2025-10-09T22:13:49.373Z","repository":{"id":102175314,"uuid":"182754698","full_name":"t04glovern/gke-dm-bootstrap","owner":"t04glovern","description":"Google Cloud Platform Deployment Manager bootstrap for GKE. Infrastructure as code for the difficult task of deploying and managing Kubernetes \u0026 Google Cloud resources","archived":false,"fork":false,"pushed_at":"2020-03-27T12:51:07.000Z","size":90,"stargazers_count":4,"open_issues_count":0,"forks_count":4,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-10-06T01:25:56.857Z","etag":null,"topics":["deployment-manager","gcp","google-cloud-platform","iac","k8s-cluster","kubernetes","kubernetes-deployment"],"latest_commit_sha":null,"homepage":"https://devopstar.com/2019/04/22/bootstrap-gke-with-deployment-manager-on-gcp/","language":"Python","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/t04glovern.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}},"created_at":"2019-04-22T10:39:43.000Z","updated_at":"2025-01-10T12:41:18.000Z","dependencies_parsed_at":null,"dependency_job_id":"7c4ac44b-ce9e-4f2a-b701-349935961c78","html_url":"https://github.com/t04glovern/gke-dm-bootstrap","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/t04glovern/gke-dm-bootstrap","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/t04glovern%2Fgke-dm-bootstrap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/t04glovern%2Fgke-dm-bootstrap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/t04glovern%2Fgke-dm-bootstrap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/t04glovern%2Fgke-dm-bootstrap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/t04glovern","download_url":"https://codeload.github.com/t04glovern/gke-dm-bootstrap/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/t04glovern%2Fgke-dm-bootstrap/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279002129,"owners_count":26083307,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-09T02:00:07.460Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["deployment-manager","gcp","google-cloud-platform","iac","k8s-cluster","kubernetes","kubernetes-deployment"],"created_at":"2024-11-24T18:14:54.116Z","updated_at":"2025-10-09T22:13:49.366Z","avatar_url":"https://github.com/t04glovern.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GKE Bootstrap - Deployment Manager\n\nGoogle Cloud Platform Deployment Manager bootstrap for GKE\n\n---\n\n## Architecture\n\n---\n\n![Architecture Diagram](img/architecture.png)\n\n---\n\n## Setup\n\n---\n\n### Deploy Script Usage\n\n```bash\n./deploy.sh \u003cproject_id\u003e \u003cresource\u003e \u003caction\u003e\n```\n\nResources must be deployed and removed in the following order\n\n| create             | delete              |\n|--------------------|---------------------|\n| IAM                | Bastion             |\n| Network            | GKE                 |\n| Cloud Router (NAT) | Cloud Router (NAT)  |\n| GKE                | Network             |\n| Bastion            | IAM                 |\n\n#### IAM\n\nDeployment manager needs IAM permissions for particular tasks. We can temporarily add these permissions using the following\n\n```bash\n# Create\n./deploy.sh \u003cproject_id\u003e iam create\n\n# Delete\n./deploy.sh \u003cproject_id\u003e iam delete\n```\n\n#### Network\n\n```bash\n# Create\n./deploy.sh \u003cproject_id\u003e network create\n\n# Delete\n./deploy.sh \u003cproject_id\u003e network delete\n```\n\n#### Cloud Router (NAT)\n\n```bash\n# Create\n./deploy.sh \u003cproject_id\u003e cloud-router create\n\n# Delete\n./deploy.sh \u003cproject_id\u003e cloud-router delete\n```\n\n#### GKE\n\n```bash\n# Create\n./deploy.sh \u003cproject_id\u003e gke create\n\n# Delete\n./deploy.sh \u003cproject_id\u003e gke delete\n```\n\n#### Bastion\n\n```bash\n# Create\n./deploy.sh \u003cproject_id\u003e bastion create\n\n# Delete\n./deploy.sh \u003cproject_id\u003e bastion delete\n```\n\n---\n\n## Manage\n\n---\n\n### Connect\n\nConnect to the bastion host and manage the kubernetes cluster from there using the steps below\n\n#### SSH Bastion\n\n```bash\ngcloud compute ssh \u003cproject_id\u003e-bastion \\\n    --project \u003cproject_id\u003e \\\n    --zone australia-southeast1-a\n```\n\nThen pull the repo down locally to the bastion server\n\n```bash\ngit clone https://github.com/t04glovern/gke-dm-bootstrap.git\n```\n\n#### Kubernetes Connect\n\n```bash\ngcloud container clusters get-credentials \u003cproject_id\u003e-gke \\\n    --project \u003cproject_id\u003e \\\n    --region australia-southeast1\n```\n\n#### Role-based Access Control (RBAC) [Skip]\n\n\u003e **NOTE**: This step is only required for Helm 2.0 or lower. By default you should have Helm 3.0+ installed on the bastion, so it is likely safe to skip this step\n\nWe'll deploy an RBAC configuration that is used by helm. Perform the following actions from the Bastion server\n\n```bash\ncd gke-dm-bootstrap/k8s\n\n# Create tiller service account \u0026 cluster role binding\nkubectl create -f rbac-config.yaml\n\n# init helm with the service account\nhelm init --service-account tiller --history-max 200\n```\n\n## Helm\n\n### Install Packages\n\n#### Nginx External\n\nDeploy the external version of nginx run running the following\n\n```bash\n# From within the k8s folder\ncd gke-dm-bootstrap/k8s\n\n# Install the helm templates as 'nginx'\nhelm install nginx ./nginx/\n\n# Get the external IP\nkubectl get services\n# NAME            TYPE           CLUSTER-IP        EXTERNAL-IP     PORT(S)        AGE\n# kubernetes      ClusterIP      192.168.192.1     \u003cnone\u003e          443/TCP        115m\n# nginx-service   LoadBalancer   192.168.192.132   35.244.100.27   80:30251/TCP   9m\n\ncurl http://35.244.100.27\n# \u003ch1\u003eDevOpStar Nginx Kubernetes\u003c/h1\u003e\n\n# \u003cp\u003eCongratulations!\u003c/p\u003e\n```\n\n#### Nginx Internal\n\nEdit the `k8s/nginx/templates/service.yaml` file and uncomment the following lines\n\n```yaml\n  annotations:\n    cloud.google.com/load-balancer-type: Internal\n\n...\n\n  loadBalancerIP: {{ .Values.staticIp }}\n```\n\nYou can update the **staticIp** value in the `k8s/nginx/values.yaml` file\n\n```bash\n# Upgrade the helm templates called 'nginx'\nhelm upgrade nginx ./nginx/\n\ncurl http://192.168.189.50\n# \u003ch1\u003eDevOpStar Nginx Kubernetes\u003c/h1\u003e\n\n# \u003cp\u003eCongratulations!\u003c/p\u003e\n```\n\n### Delete Packages\n\n```bash\nhelm delete nginx\n```\n\n## Attribution\n\n- RBAC Configuration Example - [https://github.com/helm/helm/blob/master/docs/rbac.md](https://github.com/helm/helm/blob/master/docs/rbac.md)\n- Deployment Manager samples - [https://github.com/GoogleCloudPlatform/deploymentmanager-samples](https://github.com/GoogleCloudPlatform/deploymentmanager-samples)\n  - [cloud_router](https://github.com/GoogleCloudPlatform/deploymentmanager-samples/tree/master/community/cloud-foundation/templates/cloud_router)\n  - [firewall](https://github.com/GoogleCloudPlatform/deploymentmanager-samples/tree/master/community/cloud-foundation/templates/firewall)\n  - [gke](https://github.com/GoogleCloudPlatform/deploymentmanager-samples/tree/master/community/cloud-foundation/templates/gke) - with modifications from [Praveen Chamarthi](https://github.com/GoogleCloudPlatform/deploymentmanager-samples/pull/326)\n  - [iam_member](https://github.com/GoogleCloudPlatform/deploymentmanager-samples/tree/master/community/cloud-foundation/templates/iam_member)\n  - [network](https://github.com/GoogleCloudPlatform/deploymentmanager-samples/tree/master/community/cloud-foundation/templates/network)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ft04glovern%2Fgke-dm-bootstrap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ft04glovern%2Fgke-dm-bootstrap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ft04glovern%2Fgke-dm-bootstrap/lists"}