Bootstrap Flux to a Kubernetes cluster.
To follow the guide, you need the following:
- A Kubernetes cluster. We recommend Kubernetes k3d for trying Flux out in a local development environment.
- A GitHub personal access token with repo permissions. See the GitHub documentation on creating a personal access token.
- Bootstrap Flux on a Kubernetes Cluster
git checkout step-3.apps.podinfo
gitops/assist.sh setup
gitops/assist.sh test
gitops/assist.sh status Run the bootstrap command:
watch flux get kustomizations
flux get kustomizations --watch
flux logs --all-namespaces --follow --tail=10
kubectl get gitrepositories -n flux-systemNote: You can also use
scripts/iterm2/watch.shto watch the logs and flux status.
- Test weave dashboard is running
gitops/validators/weave-dashboard.sh test - Test Nginx Ingress Controller is running with httpd
gitops/validators/httpd.sh test - Test app podinfo is running
gitops/validators/podinfo.sh test
Below section explains the steps that is wrapped in assist.sh script
Check you have everything needed to run Flux by running the following command:
flux check --preExport your GitHub personal access token and username:
git checkout main
local-dev/iaac/env/env.sh teardown
local-dev/iaac/env/env.sh setup
source .envRun the bootstrap command:
export BRANCH="main"
flux bootstrap github \
--owner=$GITHUB_USER \
--repository=$GITHUB_REPO \
--branch=$GITHUB_BRANCH \
--path=./gitops/clusters/dev \
--private=false \
--personal=trueThe bootstrap command above does following:
- Creates a git repository
gitops-experimentson your GitHub account - Adds Flux component manifests to the repository
- Deploys Flux Components to your Kubernetes Cluster
- installs Istio using the Istio base, istiod and gateway Helm charts
- waits for Istio control plane to be ready
- creates the Istio public gateway
- installs the nginx ingress controller
- installs the weave dashboard
- installs the cert-manager and letsencrypt cluster issuer
- install the podinfo app
- creates the podinfo ingress route using the Istio gateway