Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/googlecloudplatform/gke-poc-toolkit
π¦ Demo generator for Google Kubernetes Engine!
https://github.com/googlecloudplatform/gke-poc-toolkit
anthos gcp gke kubernetes terraform
Last synced: 2 days ago
JSON representation
π¦ Demo generator for Google Kubernetes Engine!
- Host: GitHub
- URL: https://github.com/googlecloudplatform/gke-poc-toolkit
- Owner: GoogleCloudPlatform
- License: apache-2.0
- Created: 2021-04-07T14:16:57.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-10-23T01:02:00.000Z (2 months ago)
- Last Synced: 2024-12-18T08:40:50.933Z (7 days ago)
- Topics: anthos, gcp, gke, kubernetes, terraform
- Language: Go
- Homepage:
- Size: 12.8 MB
- Stars: 91
- Watchers: 23
- Forks: 36
- Open Issues: 13
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# GKE PoC Toolkit
![release](https://img.shields.io/github/v/release/googlecloudplatform/gke-poc-toolkit) ![stars](https://img.shields.io/github/stars/GoogleCloudPlatform/gke-poc-toolkit) ![license](https://img.shields.io/github/license/GoogleCloudPlatform/gke-poc-toolkit)
![logo](assets/logo-256.png)
The GKE Proof of Concept (PoC) Toolkit is a demo generator for [Google Kubernetes Engine](https://cloud.google.com/kubernetes-engine).
![demo-gif](assets/demo.gif)
## Quickstart1. **[Create a Google Cloud Project](https://cloud.google.com/resource-manager/docs/creating-managing-projects)** and connect it to an existing Billing account.
2. **Open a bash-compatible shell** (eg. [Google Cloud Shell](https://cloud.google.com/shell)) and ensure you have the following tools installed:* [Google Cloud SDK version >= 325.0.0](https://cloud.google.com/sdk/docs/downloads-versioned-archives)
* * [Terraform >= 0.13](https://www.terraform.io/downloads.html)
* [kubectl](https://kubernetes.io/docs/tasks/tools/) ( >= v1.20)3. **Set your Project ID environment variable and operating system.**
```bash
export PROJECT_ID=
export OS="darwin" # choice of darwin or amd64
```4. **Set up local authentication to your project.**
```
gcloud config set project $PROJECT_ID
gcloud auth login
gcloud auth application-default login
```5. **Download the GKE PoC Toolkit binary.**
```shell
mkdir gke-poc-toolkit && cd "$_"
VERSION=$(curl -s https://api.github.com/repos/GoogleCloudPlatform/gke-poc-toolkit/releases/latest | grep browser_download_url | cut -d "/" -f 8 | tail -1)
curl -sLSf -o ./gkekitctl https://github.com/GoogleCloudPlatform/gke-poc-toolkit/releases/download/${VERSION}/gkekitctl-${OS} && chmod +x ./gkekitctl
```6. **Initialize the cli:**
```bash
./gkekitctl init
```7. **Run `gkekitctl apply` to run the Toolkit.** By default, this command sets up a single-cluster GKE environment. ([Configuration here](cli/pkg/cli_init/samples/default-config.yaml)). Enter your project ID when prompted.
```shell
./gkekitctl apply
```
```shell
# expected output
INFO[0000] βΈοΈ ----- GKE POC TOOLKIT ----- π
INFO[0000] Enter your Google Cloud Project ID:
```This command takes about **10 minutes** to run; when it completes, you will have a full GKE demo environment ready to explore and deploy applications to.
```bash
# Expected output on successful run
Apply complete! Resources: 61 added, 0 changed, 0 destroyed.
time="2022-02-04T21:57:59Z" level=info msg="π Finishing ACM install..."
time="2022-02-04T21:57:59Z" level=info msg="βΈοΈ Generating Kubeconfig..."
time="2022-02-04T21:57:59Z" level=info msg="Clusters Project ID is gpt-e2etest-020422-214428"
time="2022-02-04T21:58:00Z" level=info msg="Connecting to cluster: gke_gpt-e2etest-020422-214428_us-central1_gke-central,"
time="2022-02-04T21:58:00Z" level=info msg="βοΈ Kubeconfig generated: &{Kind:Config APIVersion:v1 Preferences:{Colors:false Extensions:map[]} Clusters:map[gke_gpt-e2etest-020422-214428_us-central1_gke-central:0xc000844900] AuthInfos:map[gke_gpt-e2etest-020422-214428_us-central1_gke-central:0xc0008a23c0] Contexts:map[gke_gpt-e2etest-020422-214428_us-central1_gke-central:0xc0012bad20] CurrentContext: Extensions:map[]}"
time="2022-02-04T21:58:00Z" level=info msg="βΈοΈ Verifying Kubernetes API access for all clusters..."
time="2022-02-04T21:58:00Z" level=info msg="π 5 Namespaces found in cluster=gke_gpt-e2etest-020422-214428_us-central1_gke-central"
```## Update
If you want to update your environment change the config file and re-run the apply command. This is a great way to add or remove clusters.
```bash
## Local tf state
./gkekitctl apply --config <"config file name">## If you are using remote TF state
./gkekitctl apply --config <"config file name"> --gkestate <"bucket name used for state file"> --vpcstate <"if using sharevpc, bucket name for shared vpc state file">
```## Clean up
```bash
./gkekitctl delete
```## Learn More
- [π€ FAQ](/docs/frequently-asked-questions.md)
- [βοΈ Configuration](/docs/configuration.md): how to customize your Toolkit environment
- [π¦ Building Demos with the Toolkit](/docs/building-demos.md)
- [πΊ Architecture](/docs/architecture.md)
- [π Analytics](/docs/analytics.md)