Difference between revisions of "Kubernetes/Progressive Delivery Flux and Flagger"
Jump to navigation
Jump to search
(→Flux) |
(→Flux) |
||
Line 20: | Line 20: | ||
Cluster bootstrap | Cluster bootstrap | ||
<source lang=bash> | <source lang=bash> | ||
FLUX_GIT_USERNAME= | FLUX_GIT_USERNAME=my-git-username | ||
FLUX_GIT_EMAIL=my-git-email@example.com | |||
flux bootstrap git \ | flux bootstrap git \ | ||
--author-email= | --author-email=$FLUX_GIT_EMAIL \ | ||
--url=ssh://git@github.com/$FLUX_GIT_USERNAME/gitops-istio \ | --url=ssh://git@github.com/$FLUX_GIT_USERNAME/gitops-istio \ | ||
--branch=main \ | --branch=main \ |
Revision as of 08:15, 24 May 2021
Flux
Install fluxctl
curl -s https://fluxcd.io/install.sh | sudo bash # enable completions in ~/.bash_profile . <(flux completion bash) # TODO: Via release binaries # https://github.com/fluxcd/flux/releases # Pre check flux check --pre ► checking prerequisites ✔ kubectl 1.18.6 >=1.18.0-0 ✔ Kubernetes 1.18.9 >=1.16.0-0 ✔ prerequisites checks passed
Cluster bootstrap
FLUX_GIT_USERNAME=my-git-username FLUX_GIT_EMAIL=my-git-email@example.com flux bootstrap git \ --author-email=$FLUX_GIT_EMAIL \ --url=ssh://git@github.com/$FLUX_GIT_USERNAME/gitops-istio \ --branch=main \ --path=clusters/my-cluster
At bootstrap, Flux generates an SSH key and prints the public key. In order to sync your cluster state with git you need to copy the public key and create a deploy key with write access on your GitHub repository. On GitHub go to Settings > Deploy keys click on Add deploy key, check Allow write access, paste the Flux public key and click Add key.
References
- gitops-istio Tutorial