The GKE Proof of Concept (PoC) Toolkit is a demo generator for Google Kubernetes Engine.
- Create a Google Cloud Project and connect it to an existing Billing account.
- Open a bash-compatible shell (eg. Google Cloud Shell) and ensure you have the following tools installed:
- Set your Project ID environment variable and operating system.
export PROJECT_ID=<your-project-id>
export OS="darwin" # choice of darwin or amd64
- Set up local authentication to your project.
gcloud config set project $PROJECT_ID
gcloud auth login
gcloud auth application-default login
- Download the GKE PoC Toolkit binary.
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
- Initialize the cli:
./gkekitctl init
- Run
gkekitctl apply
to run the Toolkit. By default, this command sets up a single-cluster GKE environment. (Configuration here). Enter your project ID when prompted.
./gkekitctl apply
# 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.
# 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"
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.
## 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">
./gkekitctl delete
- 🤔 FAQ
- ✏️ Configuration: how to customize your Toolkit environment
- 📦 Building Demos with the Toolkit
- 🗺 Architecture
- 📊 Analytics