A local Kubernetes setup using Kind and Flux as template for your (and mine) experiments.
- Create a new repository from this template into your own profile.
- Clone it locally and step into its directory.
- Use
makefor preparing your workstation and preparing the playground.
Please have a look to the top section of the Makefile to change its configuration for adopting it to your needs.
The included Makefile supports the following tasks:
-
make prepare: Downloads thekubectl,kindandfluxclis to~/.fksfor later use. It's doesn't manipulate any of your regular local setup. -
make pre-check: Validates the required setup: podman or docker, kubectl, kind and flux. -
make new: Creates a new k8s kind cluster and points the local kube context to it. If available, podman will be used unless envNO_PODMAN=1doesn't prevent it. Otherwise docker is used. -
make bootstrap: Bootstraps flux to the local cluster, targeting the this GitHub repository you're using and the current checked out branch.GITHUB_TOKENenv needs to be configured with a repo-scoped GitHub personal access token -
make check: Runs automatically before bootstrap, validating the kube context and printing the targeted GitHub repository. -
make wait: Blocks til reconciliation finished and the cluster is ready to use. -
make clean: Removes the local kind cluster.
- Kind config binding to host ports 8080 and 8443, so please free up those ports or change the config
- Basic GitOps setup with nginx-ingress listing to those ports and
- kubernetes-dashboard accessible at http://localhost:8080/dashboard/
- An empty apps folder targeted by a respective kustomization, ready to take your experiments
While kubectl, kind and flux are managed with this repository (for version compatibility of everything in here), your local setup has to fulfill the following:
podman(has precedence) ordockerclient available (and in case of docker configured properly to its daemon)curlfor downloading the managed clis- some common tools used by the Makefile:
jqcutawkwhichtar(with gzip support)
Please don't hesitate to file any issues or propose enhancements to this repo.