This is an example repository that demonstrates how to use GitOps to create GKE (Google Kubernetes Engine) clusters on demand, register them to a Fleet, and bootstrap them with FluxCD.
Once the newly created Fleet clusters are bootstrapped with FluxCD, they will automatically begin to synchronize all GKE cluster platform configurations and application tenant configurations.
This Git repository contains the following directories.
๐ apps # Example of a application operators configuration
๐ hack # Directory for scripts
๐ kubernetes # Example of a platform operators configuration
โโ๐ clusters # FluxCD cluster installation
โโ๐ namespaces # Platform tooling and configuration
โโ๐ tenants # Teams onboarded as tenants
The below showcases the collection of open-source solutions currently implemented in the cluster. Each of these components has been documented, and their deployment is managed using FluxCD, which adheres to GitOps principles.
Name | Description | |
---|---|---|
Kubernetes | An open-source system for automating deployment, scaling, and management of containerized applications | |
FluxCD | GitOps tool for deploying applications to Kubernetes | |
NA | Config Connector | Manage GCP GCP resources declaratively using Kubernetes-style configuration |
NA | Gateway API | Kubernetes service networking through expressive, extensible, and role-oriented interfaces that are implemented by many vendors and have broad industry support. |
- Google Cloud Account with permission to create GKE clusters
- kubectl CLI installed and configured
- gcloud CLI installed and configured
- flux CLI tools
- sops CLI installed and configured
- YAML editing skills
Before you begin, check that all GCP project references are updated in the repository to your corrosponding GCP project ID.
Additionally, worth noting that once you have completed the following steps the GITHUB_TOKEN
will be stored in a SOPS encrypted kubernetes secret.
- Fork and clone this repository
git clone https://github.com/<user/org>/anz-next-demo-23.git
- Navigate to the cloned directory and run the setup script
export PROJECT_ID=<YOUR PROJECT ID>
export GITHUB_TOKEN=<YOUR GITHUB TOKEN>
export GITHUB_USER=<YOUR GITHUB USER>
cd anz-next-demo-23
./hack/bootstrap.sh
Note: Change the exported variables to the appropriate values; Additional values can be adapted in the bootstrap.sh script.
- Follow the on-screen instructions to set up your GKE cluster
This repository is Apache 2.0 licensed