{"id":16481879,"url":"https://github.com/angularsen/k8s-ducks-gcp","last_synced_at":"2026-03-03T20:03:28.455Z","repository":{"id":66294961,"uuid":"178415219","full_name":"angularsen/k8s-ducks-gcp","owner":"angularsen","description":"Kubernetes managed by Terraform on Google Cloud Platform","archived":false,"fork":false,"pushed_at":"2019-03-31T19:32:51.000Z","size":12,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-11T10:37:31.668Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/angularsen.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}},"created_at":"2019-03-29T13:57:32.000Z","updated_at":"2019-03-31T19:32:52.000Z","dependencies_parsed_at":"2023-02-25T23:00:10.851Z","dependency_job_id":null,"html_url":"https://github.com/angularsen/k8s-ducks-gcp","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/angularsen%2Fk8s-ducks-gcp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/angularsen%2Fk8s-ducks-gcp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/angularsen%2Fk8s-ducks-gcp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/angularsen%2Fk8s-ducks-gcp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/angularsen","download_url":"https://codeload.github.com/angularsen/k8s-ducks-gcp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241198943,"owners_count":19926554,"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","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":[],"created_at":"2024-10-11T13:08:56.405Z","updated_at":"2026-03-03T20:03:28.428Z","avatar_url":"https://github.com/angularsen.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Managing Kubernetes on GCP with Terraform\nThis is a small test project to play with how to get started with Kubernetes on Google Cloud Platform using Terraform to configure and deploy the Kubernetes cluster.\n\nThis was setup on Windows 10 using WSL (Windows Subsystem for Linux) with the Ubuntu distro.\nFor shits and giggles I decided to also use the fancy [Fish shell](https://fishshell.com/), so some commands had to be altered to work with this shell, such using `()` instead of `$()`.\n\n## Install Fish shell (totally unrelated, but totally cool)\n```sh\nsudo apt-add-repository ppa:fish-shell/release-3\nsudo apt-get update\nsudo apt-get install fish\nfish\n```\n\n### Make fish the default shell\nMake sure `/usr/bin/fish` is added to file `/etc/shells`.\n```sh\nchsh -s to /usr/bin/fish\n```\n\n## Setup Google Cloud project\n- [GCP - Create project](https://console.cloud.google.com/projectcreate)\n- [GCP - APIs \u0026 Services](https://console.developers.google.com/apis) - enable `Compute Engine API` and `Kubernetes Engine API`\n\n## Install Google Cloud SDK\nSrc: [https://cloud.google.com/sdk/docs/quickstart-debian-ubuntu](https://cloud.google.com/sdk/docs/quickstart-debian-ubuntu)\n```sh\n# Create environment variable for correct distribution\nexport CLOUD_SDK_REPO=\"cloud-sdk-\"(lsb_release -c -s)\n\n# Add the Cloud SDK distribution URI as a package source\n# NOTE: This failed with \"setpgid: Operation not permitted and still be successful\" for me (might be WSL or the Fish shell?),\n# so you can alternatively edit `/etc/apt/sources.list.d/google-cloud-sdk.list`\n# and add the line being echoed, for me that line was `deb http://packages.cloud.google.com/apt cloud-sdk-xenial main`\necho \"deb http://packages.cloud.google.com/apt $CLOUD_SDK_REPO main\" | sudo tee -a /etc/apt/sources.list.d/google-cloud-sdk.list\n\n# Import the Google Cloud Platform public key\ncurl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -\n\n# Update the package list and install the Cloud SDK\nsudo apt-get update \u0026\u0026 sudo apt-get install google-cloud-sdk\n```\n\n### Initialize\nIf you set up Compute Engine API ealier, you will also be asked to select default region as part of this step.\n\n```sh\ngcloud init\n```\n\n## Terraform\n### Install terraform on Windows WSL or Linux\nSrc: [https://askubuntu.com/a/983352/294618](https://console.cloud.google.com/projectcreate)\n```\nsudo apt-get install unzip\nwget https://releases.hashicorp.com/terraform/0.11.13/terraform_0.11.13_linux_amd64.zip\nunzip terraform_0.11.13_linux_amd64.zip\nsudo mv terraform /usr/local/bin/\nterraform --version\n```\n\n### Example: Kubernetes Cluster on GCE Example with NAT Gateway\nSrc: [Kubernetes Cluster on GCE Example with NAT Gateway](https://github.com/GoogleCloudPlatform/terraform-google-k8s-gce/tree/master/examples/k8s-gce-nat-kubenet)\nInit gcloud\n```sh\ngcloud auth application-default login\nexport GOOGLE_PROJECT=(gcloud config get-value project)\n```\n\nClone example repo\n```sh\nmkdir /mnt/c/dev/_k8s\ncd /mnt/c/dev/_k8s\ngit clone https://github.com/GoogleCloudPlatform/terraform-google-k8s-gce.git\ncd terraform-google-k8s-gce/examples/k8s-gce-kubenet\n```\n\nList all kubernetes versions\nShould use a version supported by [GCE Kubernetes Release Notes](https://cloud.google.com/kubernetes-engine/docs/release-notes).\n\n```sh\nsudo vim /etc/apt/sources.list.d/kubernetes.list\ndeb http://apt.kubernetes.io/ kubernetes-xenial main\nsudo apt-get update\n\napt-cache madison kubelet\n```\n\nRun terraform\n```sh\nterraform init\nterraform plan\nterraform apply\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fangularsen%2Fk8s-ducks-gcp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fangularsen%2Fk8s-ducks-gcp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fangularsen%2Fk8s-ducks-gcp/lists"}