mirror of
https://github.com/fluxcd/flux2.git
synced 2025-11-03 19:42:51 +08:00
Update bootstrap docs to match v0.2
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
This commit is contained in:
@ -111,7 +111,7 @@ flux bootstrap github \
|
||||
|
||||
Example output:
|
||||
|
||||
```text
|
||||
```console
|
||||
$ flux bootstrap github --owner=gitopsrun --repository=fleet-infra --path=staging-cluster --team=devs
|
||||
► connecting to github.com
|
||||
✔ repository created
|
||||
@ -122,6 +122,7 @@ $ flux bootstrap github --owner=gitopsrun --repository=fleet-infra --path=stagin
|
||||
► installing components in flux-system namespace
|
||||
deployment "source-controller" successfully rolled out
|
||||
deployment "kustomize-controller" successfully rolled out
|
||||
deployment "helm-controller" successfully rolled out
|
||||
deployment "notification-controller" successfully rolled out
|
||||
✔ install completed
|
||||
► configuring deploy key
|
||||
@ -213,11 +214,11 @@ In about 30s the synchronization should start:
|
||||
|
||||
```console
|
||||
$ watch flux get kustomizations
|
||||
NAME REVISION SUSPENDED READY MESSAGE
|
||||
flux-system main/6eea299fe9997c8561b826b67950afaf9a476cf8 False True Applied revision: main/6eea299fe9997c8561b826b67950afaf9a476cf8
|
||||
webapp-backend False False dependency 'flux-system/webapp-common' is not ready
|
||||
webapp-common master/7411da595c25183daba255068814b83843fe3395 False True Applied revision: master/7411da595c25183daba255068814b83843fe3395
|
||||
webapp-frontend False False dependency 'flux-system/webapp-backend' is not ready
|
||||
NAME READY MESSAGE
|
||||
flux-system True Applied revision: main/6eea299fe9997c8561b826b67950afaf9a476cf8
|
||||
webapp-backend False dependency 'flux-system/webapp-common' is not ready
|
||||
webapp-common True Applied revision: master/7411da595c25183daba255068814b83843fe3395
|
||||
webapp-frontend False dependency 'flux-system/webapp-backend' is not ready
|
||||
```
|
||||
|
||||
When the synchronization finishes you can check that the webapp services are running:
|
||||
|
||||
@ -67,7 +67,7 @@ flux bootstrap <GIT-PROVIDER> \
|
||||
and `--arch=arm64` for ARMv8 64-bit container images.
|
||||
|
||||
If you wish to install a specific version, use the Flux
|
||||
[release tag](https://github.com/fluxcd/flux2/releases) e.g. `--version=v0.0.14`.
|
||||
[release tag](https://github.com/fluxcd/flux2/releases) e.g. `--version=v0.2.0`.
|
||||
|
||||
With `--path` you can configure the directory which will be used to reconcile the target cluster.
|
||||
To control multiple clusters from the same Git repository, you have to set a unique path per
|
||||
@ -76,9 +76,9 @@ cluster e.g. `staging-cluster` and `production-cluster`:
|
||||
```sh
|
||||
├── staging-cluster # <- path=staging-cluster
|
||||
│ └── flux-system # <- namespace dir generated by bootstrap
|
||||
│ ├── toolkit-components.yaml
|
||||
│ ├── toolkit-kustomization.yaml
|
||||
│ └── toolkit-source.yaml
|
||||
│ ├── gotk-components.yaml
|
||||
│ ├── gotk-sync.yaml
|
||||
│ └── kustomization.yaml
|
||||
└── production-cluster # <- path=production-cluster
|
||||
└── flux-system
|
||||
```
|
||||
@ -213,16 +213,16 @@ Generate the Flux manifests with:
|
||||
```sh
|
||||
flux install --version=latest \
|
||||
--arch=amd64 \ # on ARM64/AARCH64 clusters use --arch=arm64
|
||||
--export > ./my-cluster/flux-system/toolkit-components.yaml
|
||||
--export > ./my-cluster/flux-system/gotk-components.yaml
|
||||
```
|
||||
|
||||
If your cluster must pull images from a private container registry, first you should pull
|
||||
the toolkit images from GitHub Container Registry and push them to your registry, for example:
|
||||
|
||||
```sh
|
||||
docker pull ghcr.io/fluxcd/source-controller:v0.0.14
|
||||
docker tag ghcr.io/fluxcd/source-controller:v0.0.14 registry.internal/fluxcd/source-controller:v0.0.14
|
||||
docker push registry.internal/fluxcd/source-controller:v0.0.14
|
||||
docker pull ghcr.io/fluxcd/source-controller:v0.2.0
|
||||
docker tag ghcr.io/fluxcd/source-controller:v0.2.0 registry.internal/fluxcd/source-controller:v0.2.0
|
||||
docker push registry.internal/fluxcd/source-controller:v0.2.0
|
||||
```
|
||||
|
||||
Create the pull secret in the `flux-system` namespace:
|
||||
@ -241,19 +241,19 @@ Set your registry domain, and the pull secret when generating the manifests:
|
||||
flux install --version=latest \
|
||||
--registry=registry.internal/fluxcd \
|
||||
--image-pull-secret=regcred \
|
||||
--export > ./my-cluster/flux-system/toolkit-components.yaml
|
||||
--export > ./my-cluster/flux-system/gotk-components.yaml
|
||||
```
|
||||
|
||||
Commit and push the manifest to the master branch:
|
||||
|
||||
```sh
|
||||
git add -A && git commit -m "add toolkit manifests" && git push
|
||||
git add -A && git commit -m "add components" && git push
|
||||
```
|
||||
|
||||
Apply the manifests on your cluster:
|
||||
|
||||
```sh
|
||||
kubectl apply -f ./my-cluster/flux-system/toolkit-components.yaml
|
||||
kubectl apply -f ./my-cluster/flux-system/gotk-components.yaml
|
||||
```
|
||||
|
||||
Verify that the controllers have started:
|
||||
@ -297,25 +297,27 @@ flux create kustomization flux-system \
|
||||
--interval=10m
|
||||
```
|
||||
|
||||
Export both objects, commit and push the manifests to Git:
|
||||
Export both objects, generate a `kustomization.yaml`, commit and push the manifests to Git:
|
||||
|
||||
```sh
|
||||
flux export source git flux-system \
|
||||
> ./my-cluster/flux-system/toolkit-source.yaml
|
||||
> ./my-cluster/flux-system/gotk-sync.yaml
|
||||
|
||||
flux export kustomization flux-system \
|
||||
> ./my-cluster/flux-system/toolkit-kustomization.yaml
|
||||
>> ./my-cluster/flux-system/gotk-sync.yaml
|
||||
|
||||
git add -A && git commit -m "add toolkit reconciliation" && git push
|
||||
cd ./my-cluster/flux-system && kustomize create --autodetect
|
||||
|
||||
git add -A && git commit -m "add sync manifests" && git push
|
||||
```
|
||||
|
||||
To upgrade the toolkit to a newer version, run the install command and commit the changes:
|
||||
To upgrade the Flux components to a newer version, run the install command and commit the changes:
|
||||
|
||||
```sh
|
||||
flux install --version=latest \
|
||||
--export > ./my-cluster/flux-system/toolkit-components.yaml
|
||||
--export > ./my-cluster/flux-system/gotk-components.yaml
|
||||
|
||||
git add -A && git commit -m "update toolkit" && git push
|
||||
git add -A && git commit -m "update flux" && git push
|
||||
```
|
||||
|
||||
The source-controller will pull the changes on the cluster, then the kustomize-controller
|
||||
|
||||
Reference in New Issue
Block a user