Flux is the Kubernetes GitOps operator that manages deployments for you. It is the operator that makes GitOps happen in your cluster and ensures that the cluster config matches the git and automates your deployments. fluxctl is a command-line tool that can talk to Weave Flux
Using Flux we can synchronize a Kubernetes Cluster with Kubernetes Manifests stored in a GitHub Repo. The Development Organization needs to push releases of their application up to Docker Hub so they can be deployed by Flux. Set up a repository with the YAML required to use GitHub Actions Workflow to build the container, tag it, and push it to Docker Hub. Also, use Flux to promote workloads from Development to Production environments.
Installing Flux : sudo snap install fluxctl –classic (You can use brew as well – sudo brew install fluxctl)
Scanning Configuration : fluxctl install \
–git-user=${GLUSER} \
–git-email=${GLUSER}@gmail.com \
–git-url=git@gitlab.com:${GLUSER}/Repo \
–git-path=Directory1,Directory2 \
–namespace=flux | kubectl apply -f –
To run a Manual Sync : fluxctl sync
To list Workloads : fluxctl list-workloads –all-namespaces
To know the Deployment state state: fluxctl list–controllers
To know the identity key : fluxctl identity