<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Flux – Flux installation</title><link>https://deploy-preview-2413--fluxcd.netlify.app/flux/installation/</link><description>Recent content in Flux installation on Flux</description><generator>Hugo -- gohugo.io</generator><language>en</language><atom:link href="https://deploy-preview-2413--fluxcd.netlify.app/flux/installation/index.xml" rel="self" type="application/rss+xml"/><item><title>Flux: Flux bootstrap</title><link>https://deploy-preview-2413--fluxcd.netlify.app/flux/installation/bootstrap/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://deploy-preview-2413--fluxcd.netlify.app/flux/installation/bootstrap/</guid><description/></item><item><title>Flux: Flux configuration</title><link>https://deploy-preview-2413--fluxcd.netlify.app/flux/installation/configuration/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://deploy-preview-2413--fluxcd.netlify.app/flux/installation/configuration/</guid><description/></item><item><title>Flux: Flux upgrade</title><link>https://deploy-preview-2413--fluxcd.netlify.app/flux/installation/upgrade/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://deploy-preview-2413--fluxcd.netlify.app/flux/installation/upgrade/</guid><description>
&lt;p>Flux can be upgrade from any &lt;code>v2.x&lt;/code> release to any other &lt;code>v2.x&lt;/code> release (the latest patch version).
For more details about supported versions and upgrades please see the Flux
&lt;a href="https://deploy-preview-2413--fluxcd.netlify.app/flux/releases/">release documentation&lt;/a>.&lt;/p>
&lt;div class="alert alert-info" role="alert">
&lt;h4 class="alert-heading">Upgrade Procedure for Flux v2.7+&lt;/h4>
We have published a dedicated step-by-step upgrade guide, please follow the instructions from
&lt;a href="https://github.com/fluxcd/flux2/discussions/5572" target="_blank">Upgrade Procedure for Flux v2.7+&lt;/a>.
&lt;/div>
&lt;h2 id="flux-cli-upgrade">Flux CLI upgrade&lt;/h2>
&lt;p>Running &lt;code>flux check --pre&lt;/code> will tell you if a newer Flux version is available.&lt;/p>
&lt;p>Update the Flux CLI to the latest release using a
&lt;a href="https://deploy-preview-2413--fluxcd.netlify.app/flux/installation/">package manager&lt;/a> or by
downloading the binary from
&lt;a href="https://github.com/fluxcd/flux2/releases" target="_blank">GitHub releases&lt;/a>.&lt;/p>
&lt;p>Verify that you are running the latest version with:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f0f0f0;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-sh" data-lang="sh">&lt;span style="display:flex;">&lt;span>flux --version
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h2 id="flux-controllers-upgrade">Flux controllers upgrade&lt;/h2>
&lt;p>The Flux controllers have the capability to upgrade themselves if they were installed using the
&lt;a href="https://deploy-preview-2413--fluxcd.netlify.app/flux/installation/bootstrap/">bootstrap procedure&lt;/a>.&lt;/p>
&lt;h3 id="upgrade-with-git">Upgrade with Git&lt;/h3>
&lt;p>To upgrade the Flux controllers with Git, you can generate the new Kubernetes manifests using the
Flux CLI and push them to the Git repository where bootstrap was run.&lt;/p>
&lt;p>Note that this procedure &lt;strong>does not require direct access&lt;/strong> to the Kubernetes cluster where Flux is installed.&lt;/p>
&lt;p>Assuming you&amp;rsquo;ve bootstrapped with &lt;code>--path=/clusters/my-cluster&lt;/code>, you can update the manifests in Git with:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f0f0f0;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>git clone https://&amp;lt;git-host&amp;gt;/&amp;lt;org&amp;gt;/&amp;lt;bootstrap-repo&amp;gt;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#007020">cd&lt;/span> &amp;lt;bootstrap-repo&amp;gt;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>flux install --export &amp;gt; ./clusters/my-cluster/flux-system/gotk-components.yaml
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>git add -A &lt;span style="color:#666">&amp;amp;&amp;amp;&lt;/span> git commit -m &lt;span style="color:#4070a0">&amp;#34;Update &lt;/span>&lt;span style="color:#007020;font-weight:bold">$(&lt;/span>flux -v&lt;span style="color:#007020;font-weight:bold">)&lt;/span>&lt;span style="color:#4070a0"> on my-cluster&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>git push
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>If you&amp;rsquo;ve enabled extra Flux components at bootstrap,
like those required for the
&lt;a href="https://deploy-preview-2413--fluxcd.netlify.app/flux/guides/image-update/">image automation feature&lt;/a>.
Ensure to include these components when generating the components manifest:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f0f0f0;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>flux install &lt;span style="color:#4070a0;font-weight:bold">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-weight:bold">&lt;/span>--components-extra image-reflector-controller,image-automation-controller &lt;span style="color:#4070a0;font-weight:bold">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-weight:bold">&lt;/span>--export &amp;gt; ./clusters/my-cluster/flux-system/gotk-components.yaml
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Wait for Flux to detect the changes or, tell it to do the upgrade immediately with:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f0f0f0;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-sh" data-lang="sh">&lt;span style="display:flex;">&lt;span>flux reconcile ks flux-system --with-source
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;div class="alert alert-info" role="alert">
&lt;h4 class="alert-heading">Automated upgrades&lt;/h4>
You can automate the components manifest update with GitHub Actions
and open a PR when there is a new Flux version available.
For more details please see
&lt;a href="https://deploy-preview-2413--fluxcd.netlify.app/flux/flux-gh-action/">Flux GitHub Action docs&lt;/a>.
&lt;/div>
&lt;h3 id="upgrade-with-flux-cli">Upgrade with Flux CLI&lt;/h3>
&lt;p>If you&amp;rsquo;ve used the
&lt;a href="https://deploy-preview-2413--fluxcd.netlify.app/flux/installation/bootstrap/">bootstrap&lt;/a> procedure to deploy Flux,
then rerun the bootstrap command for each cluster using the same arguments as before:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f0f0f0;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-sh" data-lang="sh">&lt;span style="display:flex;">&lt;span>flux bootstrap github &lt;span style="color:#4070a0;font-weight:bold">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-weight:bold">&lt;/span> --owner&lt;span style="color:#666">=&lt;/span>my-github-username &lt;span style="color:#4070a0;font-weight:bold">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-weight:bold">&lt;/span> --repository&lt;span style="color:#666">=&lt;/span>my-repository &lt;span style="color:#4070a0;font-weight:bold">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-weight:bold">&lt;/span> --branch&lt;span style="color:#666">=&lt;/span>main &lt;span style="color:#4070a0;font-weight:bold">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-weight:bold">&lt;/span> --path&lt;span style="color:#666">=&lt;/span>clusters/my-cluster &lt;span style="color:#4070a0;font-weight:bold">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-weight:bold">&lt;/span> --personal
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>The above command will clone the repository, it will update the components manifest in
&lt;code>&amp;lt;path&amp;gt;/flux-system/gotk-components.yaml&lt;/code> and it will push the changes to the remote branch.&lt;/p>
&lt;p>Verify that the controllers have been upgrade with:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f0f0f0;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-sh" data-lang="sh">&lt;span style="display:flex;">&lt;span>flux check
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="upgrade-with-terraform">Upgrade with Terraform&lt;/h3>
&lt;p>If you&amp;rsquo;ve used the
&lt;a href="https://github.com/fluxcd/terraform-provider-flux/" target="_blank">Terraform Provider&lt;/a> to bootstrap Flux,
then update the provider to the
&lt;a href="https://github.com/fluxcd/terraform-provider-flux/releases" target="_blank">latest version&lt;/a>
and run &lt;code>terraform apply&lt;/code>.&lt;/p>
&lt;p>The upgrade performed with Terraform behaves in the same way as the
&lt;a href="#upgrade-with-flux-cli">upgrade with Flux CLI&lt;/a>.&lt;/p>
&lt;h3 id="upgrade-with-kubectl">Upgrade with kubectl&lt;/h3>
&lt;p>If you&amp;rsquo;ve installed Flux directly on the cluster with kubectl,
then rerun the command using the latest manifests from GitHub releases page:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f0f0f0;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-sh" data-lang="sh">&lt;span style="display:flex;">&lt;span>kubectl apply --server-side -f https://github.com/fluxcd/flux2/releases/latest/download/install.yaml
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div></description></item><item><title>Flux: Flux uninstall</title><link>https://deploy-preview-2413--fluxcd.netlify.app/flux/installation/uninstall/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://deploy-preview-2413--fluxcd.netlify.app/flux/installation/uninstall/</guid><description>
&lt;p>No matter which
&lt;a href="https://deploy-preview-2413--fluxcd.netlify.app/flux/installation/">installation&lt;/a> method you&amp;rsquo;ve used to deploy the
Flux controllers on a cluster, you can uninstall them using the Flux CLI.&lt;/p>
&lt;p>The uninstallation procedure removes only the Flux components, without touching
reconciled namespaces, tenants, cluster addons, workloads, Helm releases, etc.&lt;/p>
&lt;p>Please note that uninstalling Flux by any other means e.g. deleting the deployments
and namespace with &lt;strong>kubectl is not supported&lt;/strong>.&lt;/p>
&lt;h2 id="uninstall-with-flux-cli">Uninstall with Flux CLI&lt;/h2>
&lt;p>You can uninstall the Flux controllers running on a cluster with:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f0f0f0;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-sh" data-lang="sh">&lt;span style="display:flex;">&lt;span>flux uninstall
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>The above command performs the following operations:&lt;/p>
&lt;ul>
&lt;li>deletes Flux components (deployments and services)&lt;/li>
&lt;li>deletes Flux network policies&lt;/li>
&lt;li>deletes Flux RBAC (service accounts, cluster roles and cluster role bindings)&lt;/li>
&lt;li>removes the Kubernetes finalizers from Flux custom resources&lt;/li>
&lt;li>deletes Flux custom resource definitions and custom resources&lt;/li>
&lt;li>deletes the namespace where Flux was installed&lt;/li>
&lt;/ul>
&lt;p>If you&amp;rsquo;ve installed Flux in a namespace that you wish to preserve, you
can skip the namespace deletion with:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f0f0f0;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-sh" data-lang="sh">&lt;span style="display:flex;">&lt;span>flux uninstall --namespace&lt;span style="color:#666">=&lt;/span>flux-system --keep-namespace
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;div class="alert alert-info" role="alert">
&lt;h4 class="alert-heading">Reinstall&lt;/h4>
Note that the &lt;code>uninstall&lt;/code> command will not remove any Kubernetes objects
or Helm releases that were reconciled on the cluster by Flux.
It is safe to uninstall Flux and rerun the bootstrap, any existing workloads
will not be affected.
&lt;/div></description></item></channel></rss>