This repo contains Flux component manifests bootstrapped by the Flux CLI. Refer to https://fluxcd.io/docs/get-started/.
flux bootstrap github
: Creates the repositoryflux-intro
in your GitHub account and adds Flux component manifests to it in theflux-system
directory. Also deploys Flux components to your current K8s cluster and configures Flux components to track changes to the repo.
Note that I did not specify a subdirectory via the --path
flag (i.e. --path=./clusters/my-cluster
), which would bootstrap all components in that subdirectory and instruct Flux to only track changes in that subdirectory.
flux bootstrap github \
--owner=$GITHUB_USER \
--repository=flux-intro \
--personal
(From here on out, Git commit and push all changes to the repo following each step.)
flux create source git
: Creates aGitRepository
manifest pointing to another repo, podinfo for reconciling manifests from that repo.
Note that this doesn't yet reconcile any manifests. It just registers a new source repository to reconcile from and checks it for updates every 30 seconds.
flux create source git podinfo \
--url=https://github.com/stefanprodan/podinfo \
--branch=master \
--interval=30s \
--export > podinfo-source.yaml
flux create kustomization
: Creates aKustomization
manifest that specifies a directory in the registered source repository to reconcile manifests from. Flux will reconcile every 5 minutes.
Kustomize is a major dependency for Flux. Flux expects the directory to have a single kustomization.yaml
file that declares the manifests to reconcile. Plain YAML manifests are acceptable, but Flux will still create a kustomization.yaml
internally.
flux create kustomization podinfo \
--target-namespace=default \
--source=podinfo \
--path="./kustomize" \
--prune=true \
--interval=5m \
--export > podinfo-kustomization.yaml
flux get kustomizations --watch
: Watches for events around each defined Kustomization. This helps us to know that ourpodinfo
Kustomization is being applied.
Manifests from repos you don't own can be customized by adding patches
to the spec
of a Kustomization
.
See the update made in podinfo-kustomization.yaml for an example.