Flux Lab: Install Flux to a Cluster💣
Install Flux💣
Note
(Fedora Note)
kubectl
is a prereq for flux, and flux expects it in /usr/local/bin/kubectl
symlink it or copy the binary to fix errors.
Verify there’s no issue with your IronBank Image Pull Credentials💣
- The goal here is to left shift feedback of potential problems before they occur.
# Note: In production you'd use an IronBank service account / robot credential like this:
# export REGISTRY1_USER='robot-ironbank+bigbang-onboarding-imagepull'
# For demos you can use your personal credentials
export REGISTRY1_USER=$(sops --decrypt ~/Desktop/bootstrap/base/secrets.enc.yaml | grep username | tr -d " " | cut -d : -f 2)
export REGISTRY1_TOKEN=$(sops --decrypt ~/Desktop/bootstrap/base/secrets.enc.yaml | grep password | tr -d " " | cut -d : -f 2)
echo $REGISTRY1_TOKEN | docker login registry1.dso.mil --username $REGISTRY1_USER --password-stdin
Install flux.yaml to the cluster💣
cd ~/Desktop
git clone https://repo1.dso.mil/platform-one/big-bang/bigbang.git
cd bigbang/
./scripts/install_flux.sh -u $REGISTRY1_USER -p $REGISTRY1_TOKEN
kubectl get pod -n=flux-system
Now new objects types are recognized inside of the cluster💣
kubectl get crds | grep flux
Thanks to flux install adding newly recognised resource types / CRDs
In the next lab we’ll get feedback when we run these commands
kubectl get gitrepositories --all-namespaces
kubectl get kustomizations -A
The expected output is:
no resources found
Unless you already ran kubectl apply bigbang.yaml
those are fine / they get fixed in a future lab.
The significance of this command is that it at least recognised kustomizations and git repositories as valid object types