This repository provides a simple Terraform configuration to allow it to build a
k3s
-based Kubernetes cluster with Flux, hosted in GitHub, to provide
GitOps for standardised configuration and service deployments, and connected
with Cloudflare for DNS and ingress tunnels.
Note
This repository is not responsible for deploying the base configuration for
each k3s Cluster; that is managed through the ansible
repository
instead. Once the Cluster is started and running, then this Terraform
configuration will deploy standard ConfigMap
and Secret
resources, and
bootstrap fluxcd
on to the Cluster.
The following must be set in the environment before terraform plan
and apply
can be run:
$ set -x GITHUB_TOKEN xxx
$ set -x CLOUDFLARE_TOKEN xxx
$ set -x AUTH0_API_TOKEN xxx
$ gcloud auth login
...
You are now logged in as [jon@than.io].
Your current project is [project-name-here]. You can change this setting by running:
$ gcloud config set project PROJECT_ID
$ flux create secret oci ghcr-auth \
--url=ghcr.io \
--username={github-user} \
--password={github-pat}
► oci secret 'ghcr-auth' created in 'flux-system' namespace