Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

Install Flux

See https://fluxcd.io/docs/installation/#install-the-flux-cli

...

Code Block
$ curl -s https://fluxcd.io/install.sh | sudo bash


Generate a User Token in GitHub

https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token

...

Code Block
languagebash
$ export GITHUB_TOKEN=xxxx
$ export GITHUB_USER=johnmehan


Bootstrap the Repository

Perform pre-check to make sure we are able to install flux.

...

Code Block
languagebash
$ git clone git@github.com:johnmehan/ft.git
$ cd ft
$ cd local 


Create Helm Repository

Create secret for flux to use to talk to the helm repository

...

Code Block
languagebash
$ flux get sources helm

NAME    READY   MESSAGE                                                         REVISION                                       SUSPENDED
ncyd    True    Fetched revision: 732d32e292bd0def8d5782211f139523d23880a1      732d32e292bd0def8d5782211f139523d23880a1       False



Create a Helm Release


Code Block
languagebash
$ flux create helmrelease ssh-server --source=HelmRepository/ncyd-helm-virtual --chart ssh-server --release-name ssh-server --target-namespace default --interval 5m0s --export > helmrelease-ssh-server.yaml

...

Code Block
flux reconcile ks flux-system --with-source


Debugging a Failed Helm Release

You may some of the following commands in order to determine the failure.

Code Block
languagebash
# get list of helmreleases
$ flux get hr -A

# get details about the helmrelease
$ kubectl describe helmrelease <HR_NAME> -n flux-system

# See logs in source controller
$ kubectl logs -f -n flux-system deployment/source-controller


References

ReferencesURL
Flux2 Docshttps://fluxcd.io/docs/
Supercharge your Kubernetes deployments with Flux v2 and GitHub - Introductionhttps://www.youtube.com/watch?v=N6UCKF7JD7k
Get Started with Fluxhttps://fluxcd.io/docs/get-started/
Install the Flux CLIhttps://fluxcd.io/docs/installation/#install-the-flux-cli
flux2-kustomize-helm-examplehttps://github.com/fluxcd/flux2-kustomize-helm-example

...