This guide assumes you have some understanding of the core concepts and have read the introduction to Flux.
This guide assumes you have some understanding of the core concepts and have read the introduction to Flux.
The core concepts used in this guide are [GitOps](../core-concepts/index.md#gitops), [Sources](../core-concepts/index.md#sources), [Kustomization](../core-concepts/index.md#kustomization).
The core concepts used in this guide are [GitOps](../core-concepts/index.md#gitops),
In this tutorial, you will deploy an application to a kubernetes cluster with Flux and manage the cluster in a complete GitOps manner. You'll be using a dedicated Git repository e.g. `fleet-infra` to manage the Kubernetes clusters. All the manifest will be pushed to this repository and then applied by Flux.
In this tutorial, you will deploy an application to a kubernetes cluster with Flux
and manage the cluster in a complete GitOps manner.
You'll be using a dedicated Git repository e.g. `fleet-infra` to manage your Kubernetes clusters.
## Prerequisites
## Prerequisites
In order to follow the guide, you will need one Kubernetes cluster version 1.16 or newer and kubectl version 1.18.
In order to follow the guide, you will need a Kubernetes cluster version 1.16 or newer and kubectl version 1.18.
For a quick local test, you can use [Kubernetes kind](https://kind.sigs.k8s.io/docs/user/quick-start/).
For a quick local test, you can use [Kubernetes kind](https://kind.sigs.k8s.io/docs/user/quick-start/).
Any other Kubernetes setup will work as well though.
Any other Kubernetes setup will work as well though.
Flux is installed in a complete GitOps way and its manifest will be pushed to the repository, so you will also need a GitHub account and a
Flux is installed in a GitOps way and its manifest will be pushed to the repository,
@ -134,7 +139,8 @@ deployment "notification-controller" successfully rolled out
✔ bootstrap finished
✔ bootstrap finished
```
```
If you prefer GitLab, export `GITLAB_TOKEN` env var and use the command [flux bootstrap gitlab](../cmd/flux_bootstrap_gitlab.md).
If you prefer GitLab, export `GITLAB_TOKEN` env var and
use the command [flux bootstrap gitlab](../guides/installation.md#gitlab-and-gitlab-enterprise).
!!! hint "Idempotency"
!!! hint "Idempotency"
It is safe to run the bootstrap command as many times as you want.
It is safe to run the bootstrap command as many times as you want.
@ -145,21 +151,25 @@ If you prefer GitLab, export `GITLAB_TOKEN` env var and use the command [flux bo
## Clone the git repository
## Clone the git repository
We are going to be managing the application in a GitOps manner with the git repository. The Flux manifests generated by the CLI will be pushed to the git repository. Instead of applying the manifests directly to the cluster, Flux will apply it for us instead :).
We are going to drive app deployments in a GitOps manner,
using the Git repository as the desired state for our cluster.
Instead of applying the manifests directly to the cluster,
Flux will apply it for us instead.
Therefore, we need to clone the repository to our local machine.
Therefore, we need to clone the repository to our local machine:
We will be using a public repository [github.com/stefanprodan/podinfo](https://github.com/stefanprodan/podinfo), podinfo is a tiny web application made with Go.
We will be using a public repository [github.com/stefanprodan/podinfo](https://github.com/stefanprodan/podinfo),
podinfo is a tiny web application made with Go.
Create a GitRepository manifest pointing to the repository's master branch with Flux CLI.
Create a [GitRepository](../components/source/gitrepositories/)
manifest pointing to podinfo repository's master branch: