A script to bootstrap the Google Kubernetes Engine (GKE) using terraform and Knative.
  • Shell 69.6%
  • HCL 30.4%
Find a file
Riley Seaburg 5e3fd9c096 update readme
2022-10-25 19:43:45 -04:00
.gitignore Working SCript and Comment Dashboard as option 2022-10-25 09:08:22 -04:00
.terraform.lock.hcl Add cluster and deploy dashboard. 2022-10-25 03:31:18 -04:00
bootstrap-gke.sh Working SCript and Comment Dashboard as option 2022-10-25 09:08:22 -04:00
gke.tf update version number for ARM64 compatibility (#13) 2022-10-17 14:13:46 -04:00
kubectl-proxy.pid Working SCript and Comment Dashboard as option 2022-10-25 09:08:22 -04:00
kubernetes-dashboard-admin.rbac.yaml Create kubernetes-dashboard-admin.rbac.yaml 2020-04-16 17:33:24 -07:00
LICENSE.md update license 2022-10-25 03:45:42 -04:00
outputs.tf Update configuration to 0.14 convention 2021-01-11 23:36:24 -08:00
README.md update readme 2022-10-25 19:43:45 -04:00
terraform.tfvars Add cluster and deploy dashboard. 2022-10-25 03:31:18 -04:00
versions.tf update version number for ARM64 compatibility (#13) 2022-10-17 14:13:46 -04:00
vpc.tf Update configuration to 0.14 convention 2021-01-11 23:36:24 -08:00

BootStrap GKE Cluster

This is a simple script to bootstrap a GKE cluster with a few basic components.

Prerequisites

Install gcloud

curl https://sdk.cloud.google.com | bash

Access GKE Cluster

exec -l $SHELL 

Initialize gcloud

gcloud init

Install kubectl

gcloud components install kubectl

Install helm

curl https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 | bash

Install knative client

Linux AMD64

Clone the release

curl -L https://github.com/knative/client/releases/download/knative-v1.1.0/kn-linux-amd64

Rename to "kn" and move to /usr/local/bin

sudo mv kn-linux-amd64 /usr/local/bin/kn

Make the file executable

sudo chmod +x /usr/local/bin/kn 

Add 'kn' to your PATH

echo 'export PATH=$PATH:/usr/local/bin/kn' >> ~/.bashrc 

Test KN Installation

echo "Test kn installation" 
kn version

Install terraform

Clone the release

wget https://releases.hashicorp.com/terraform/0.14.5/terraform_0.14.5_linux_amd64.zip

Unzip the package

unzip terraform_0.14.5_linux_amd64.zip

Move terraform to /usr/local/bin

sudo mv terraform /usr/local/bin/

Add terraform to your PATH

echo 'export PATH=$PATH:/usr/local/bin/terraform' >> ~/.bashrc 

Test terraform installation

echo "Test terraform installation"
terraform version

Install Flux CLI

Linux AMD64

Clone the release

brew install fluxcd/tap/flux

Add flux to your PATH

echo 'export PATH=$PATH:/usr/local/bin/flux' >> ~/.bashrc 

Export Github Credentials

export GITHUB_TOKEN=<your github token>
export GITHUB_USER=<your github username>

Usage

  1. Clone this repo
  2. Make bootstrap.sh executable
    chmod +x bootstrap.sh
    
  3. Run bootstrap.sh
    ./bootstrap.sh
    
  4. Follow the prompts

What does it do?

  1. Creates a GKE cluster
  2. Installs Knative Serving
  3. Installs Knative Eventing
  4. Installs Flux (Not yet implemented)

What does it not do?

  1. This project does not create a git repo for you. You will need to create a git repo and add the flux manifests to it.
  2. This project does not create a docker registry for you. You will need to create a docker registry and add the container urls to the flux manifests.

Resources

Contributing

  1. Fork this repo
  2. Create a branch for your feature
  3. Commit your changes
  4. Push to your branch
  5. Create a pull request

License

APGL-3.0 © RDS Ventures LLC

This license is based on the GNU Affero General Public License and is intended to protect the source code of the project and any derivative works. It is not intended to protect the data of the project. If you are using this project to store data, you should consider using a different license. Read the License for more information.

Acknowledgements

Adopted from Learn Terraform - Provision a GKE Cluster and Knative Install