Install Weave Flux

Now we will use Helm to install Weave Flux into our cluster and enable it to interact with our Kubernetes configuration GitHub repo.

First, install the Flux Custom Resource Definition:

kubectl apply -f

Check that Tiller is installed.

helm ls

When tiller has already been installed, this command should either return a list of helm charts that have already been deployed or nothing.

If you get the message Error: could not find tiller, see installing helm for instructions.

In the following steps, your Git user name will be required. Without this information, the resulting pipeline will not function as expected. Set this as an environment variable to reuse in the next commands:


Next, add the Flux chart repository to Helm and install Flux.

Update the Git URL below to match your user name and Kubernetes configuration manifest repository.

helm repo add fluxcd

helm upgrade -i flux \
--set helmOperator.create=true \
--set helmOperator.createCRD=false \
--set${YOURUSER}/k8s-config \
--namespace flux \

Watch the install and confirm everything starts. There should be 3 pods.

kubectl get pods -n flux

Install fluxctl in order to get the SSH key to allow GitHub write access. This allows Flux to keep the configuration in GitHub in sync with the configuration deployed in the cluster.

sudo wget -O /usr/local/bin/fluxctl
sudo chmod 755 /usr/local/bin/fluxctl

fluxctl version
fluxctl identity --k8s-fwd-ns flux

Copy the provided key and add that as a deploy key in the GitHub repository.

  • In GitHub, select your k8s-config GitHub repo. Go to Settings and click Deploy Keys. Alternatively, you can go by direct URL by replacing your user name in this URL:
  • Click on Add Deploy Key
    • Name: Flux Deploy Key
    • Paste the key output from fluxctl
    • Click Allow Write Access. This allows Flux to keep the repo in sync with the real state of the cluster
    • Click Add Key

Now Flux is configured and should be ready to pull configuration.