mirror of
https://github.com/funkypenguin/geek-cookbook/
synced 2025-12-13 09:46:23 +00:00
Update for flux API changes
Signed-off-by: David Young <davidy@funkypenguin.co.nz>
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
title: FIXMEHow to use Rook Ceph for Persistent Storage in Kubernetes
|
title: Creating CSI snapshots on bare-metal Kubernetes
|
||||||
description: FIXMEHow to deploy Rook Ceph into your Kubernetes cluster for persistent storage
|
description: How to use snapshot controller on your bare-metal Kubernetes to create volume snapshots
|
||||||
---
|
---
|
||||||
# Creating CSI snapshots
|
# Creating CSI snapshots
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,10 @@
|
|||||||
# Backup
|
# Backup
|
||||||
|
|
||||||
|
Don't be like [Cameron](http://haltandcatchfire.wikia.com/wiki/Cameron_Howe). Backup your stuff.
|
||||||
|
|
||||||
|
<!-- markdownlint-disable MD033 -->
|
||||||
|
<iframe width="560" height="315" src="https://www.youtube.com/embed/1UtFeMoqVHQ" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
|
||||||
|
|
||||||
> Waitasec, what happened to "cattle :cow:, not pets"? Why should you need backup in your cluster?
|
> Waitasec, what happened to "cattle :cow:, not pets"? Why should you need backup in your cluster?
|
||||||
|
|
||||||
Ha. good question. If you're happily running Kubernetes in a cloud provider and using managed services for all your stateful workloads (*managed databases, etc*) then you don't need backup.
|
Ha. good question. If you're happily running Kubernetes in a cloud provider and using managed services for all your stateful workloads (*managed databases, etc*) then you don't need backup.
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ This section is a [direct copy of the official docs](https://fluxcd.io/docs/inst
|
|||||||
|
|
||||||
Create a GitHub [personal access token](https://github.com/settings/tokens) that can create repositories by checking all permissions under repo, as well as all options under `admin:public_key `. (*we'll use the token in the bootstrapping step below*)
|
Create a GitHub [personal access token](https://github.com/settings/tokens) that can create repositories by checking all permissions under repo, as well as all options under `admin:public_key `. (*we'll use the token in the bootstrapping step below*)
|
||||||
|
|
||||||
``` tip
|
!!! tip
|
||||||
A **personal token**, not one of these new-fangled "fine grained access tokens", which don't work with Flux (yet) :)
|
A **personal token**, not one of these new-fangled "fine grained access tokens", which don't work with Flux (yet) :)
|
||||||
|
|
||||||
### Create GitHub Repo
|
### Create GitHub Repo
|
||||||
@@ -86,7 +86,7 @@ kube-system metrics-server-86cbb8457f-25688 1/1 Running 0
|
|||||||
Now, run a customized version of the following:
|
Now, run a customized version of the following:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
GITHUB_TOKEN=<your-token>
|
GITHUB_TOKEN=<your-token> \
|
||||||
flux bootstrap github \
|
flux bootstrap github \
|
||||||
--owner=my-github-username \
|
--owner=my-github-username \
|
||||||
--repository=my-repository \
|
--repository=my-repository \
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ Create a kustomization for the chart, pointing flux to a path in the repo where
|
|||||||
??? example "Here's an example Kustomization..."
|
??? example "Here's an example Kustomization..."
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
apiVersion: kustomize.toolkit.fluxcd.io/v1beta1
|
apiVersion: kustomize.toolkit.fluxcd.io/v1
|
||||||
kind: Kustomization
|
kind: Kustomization
|
||||||
metadata:
|
metadata:
|
||||||
name: podinfo
|
name: podinfo
|
||||||
@@ -82,7 +82,6 @@ Create a kustomization for the chart, pointing flux to a path in the repo where
|
|||||||
sourceRef:
|
sourceRef:
|
||||||
kind: GitRepository
|
kind: GitRepository
|
||||||
name: flux-system
|
name: flux-system
|
||||||
validation: server
|
|
||||||
healthChecks:
|
healthChecks:
|
||||||
- apiVersion: apps/v1
|
- apiVersion: apps/v1
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ Now that the "global" elements of this deployment (*Namespace and HelmRepository
|
|||||||
|
|
||||||
??? example "Example Kustomization (click to expand)"
|
??? example "Example Kustomization (click to expand)"
|
||||||
```yaml
|
```yaml
|
||||||
apiVersion: kustomize.toolkit.fluxcd.io/v1beta1
|
apiVersion: kustomize.toolkit.fluxcd.io/v1
|
||||||
kind: Kustomization
|
kind: Kustomization
|
||||||
metadata:
|
metadata:
|
||||||
name: nginx-ingress-controller
|
name: nginx-ingress-controller
|
||||||
@@ -69,7 +69,6 @@ Now that the "global" elements of this deployment (*Namespace and HelmRepository
|
|||||||
sourceRef:
|
sourceRef:
|
||||||
kind: GitRepository
|
kind: GitRepository
|
||||||
name: flux-system
|
name: flux-system
|
||||||
validation: server
|
|
||||||
healthChecks:
|
healthChecks:
|
||||||
- apiVersion: apps/v1
|
- apiVersion: apps/v1
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ spec:
|
|||||||
Now that the "global" elements of this deployment (*Namespace and HelmRepository*) have been defined, we do some "flux-ception", and go one layer deeper, adding another Kustomization, telling flux to deploy any YAMLs found in the repo at `/traefik`. I create this example Kustomization in my flux repo:
|
Now that the "global" elements of this deployment (*Namespace and HelmRepository*) have been defined, we do some "flux-ception", and go one layer deeper, adding another Kustomization, telling flux to deploy any YAMLs found in the repo at `/traefik`. I create this example Kustomization in my flux repo:
|
||||||
|
|
||||||
```yaml title="/bootstrap/kustomizations/kustomization-traefik.yaml"
|
```yaml title="/bootstrap/kustomizations/kustomization-traefik.yaml"
|
||||||
apiVersion: kustomize.toolkit.fluxcd.io/v1beta1
|
apiVersion: kustomize.toolkit.fluxcd.io/v1
|
||||||
kind: Kustomization
|
kind: Kustomization
|
||||||
metadata:
|
metadata:
|
||||||
name: traefik
|
name: traefik
|
||||||
@@ -71,7 +71,6 @@ spec:
|
|||||||
sourceRef:
|
sourceRef:
|
||||||
kind: GitRepository
|
kind: GitRepository
|
||||||
name: flux-system
|
name: flux-system
|
||||||
validation: server
|
|
||||||
healthChecks:
|
healthChecks:
|
||||||
- apiVersion: apps/v1
|
- apiVersion: apps/v1
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ metadata:
|
|||||||
Now that the "global" elements of this deployment have been defined, we do some "flux-ception", and go one layer deeper, adding another Kustomization, telling flux to deploy any YAMLs found in the repo at `/nfs-subdir`. I create this example Kustomization in my flux repo:
|
Now that the "global" elements of this deployment have been defined, we do some "flux-ception", and go one layer deeper, adding another Kustomization, telling flux to deploy any YAMLs found in the repo at `/nfs-subdir`. I create this example Kustomization in my flux repo:
|
||||||
|
|
||||||
```yaml title="/bootstrap/kustomizations/kustomization-nfs-subdir.yaml"
|
```yaml title="/bootstrap/kustomizations/kustomization-nfs-subdir.yaml"
|
||||||
apiVersion: kustomize.toolkit.fluxcd.io/v1beta1
|
apiVersion: kustomize.toolkit.fluxcd.io/v1
|
||||||
kind: Kustomization
|
kind: Kustomization
|
||||||
metadata:
|
metadata:
|
||||||
name: nfs-subdir
|
name: nfs-subdir
|
||||||
@@ -73,7 +73,6 @@ spec:
|
|||||||
sourceRef:
|
sourceRef:
|
||||||
kind: GitRepository
|
kind: GitRepository
|
||||||
name: flux-system
|
name: flux-system
|
||||||
validation: server
|
|
||||||
healthChecks:
|
healthChecks:
|
||||||
- apiVersion: apps/v1
|
- apiVersion: apps/v1
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ spec:
|
|||||||
Now that the "global" elements of this deployment (*Namespace and HelmRepository*) have been defined, we do some "flux-ception", and go one layer deeper, adding another Kustomization, telling flux to deploy any YAMLs found in the repo at `/topolvm`. I create this example Kustomization in my flux repo:
|
Now that the "global" elements of this deployment (*Namespace and HelmRepository*) have been defined, we do some "flux-ception", and go one layer deeper, adding another Kustomization, telling flux to deploy any YAMLs found in the repo at `/topolvm`. I create this example Kustomization in my flux repo:
|
||||||
|
|
||||||
```yaml title="/bootstrap/kustomizations/kustomization-topolvm.yaml"
|
```yaml title="/bootstrap/kustomizations/kustomization-topolvm.yaml"
|
||||||
apiVersion: kustomize.toolkit.fluxcd.io/v1beta1
|
apiVersion: kustomize.toolkit.fluxcd.io/v1
|
||||||
kind: Kustomization
|
kind: Kustomization
|
||||||
metadata:
|
metadata:
|
||||||
name: topolvm--topolvm-system
|
name: topolvm--topolvm-system
|
||||||
@@ -79,7 +79,6 @@ spec:
|
|||||||
sourceRef:
|
sourceRef:
|
||||||
kind: GitRepository
|
kind: GitRepository
|
||||||
name: flux-system
|
name: flux-system
|
||||||
validation: server
|
|
||||||
healthChecks:
|
healthChecks:
|
||||||
- apiVersion: apps/v1
|
- apiVersion: apps/v1
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ Now that the "global" elements of this deployment (*just the HelmRepository in t
|
|||||||
|
|
||||||
??? example "Example Kustomization (click to expand)"
|
??? example "Example Kustomization (click to expand)"
|
||||||
```yaml
|
```yaml
|
||||||
apiVersion: kustomize.toolkit.fluxcd.io/v1beta1
|
apiVersion: kustomize.toolkit.fluxcd.io/v1
|
||||||
kind: Kustomization
|
kind: Kustomization
|
||||||
metadata:
|
metadata:
|
||||||
name: sealed-secrets
|
name: sealed-secrets
|
||||||
@@ -96,7 +96,6 @@ Now that the "global" elements of this deployment (*just the HelmRepository in t
|
|||||||
sourceRef:
|
sourceRef:
|
||||||
kind: GitRepository
|
kind: GitRepository
|
||||||
name: flux-system
|
name: flux-system
|
||||||
validation: server
|
|
||||||
healthChecks:
|
healthChecks:
|
||||||
- apiVersion: apps/v1
|
- apiVersion: apps/v1
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ spec:
|
|||||||
Now that the "global" elements of this deployment have been defined, we do some "flux-ception", and go one layer deeper, adding another Kustomization, telling flux to deploy any YAMLs found in the repo at `/secret-replicator`. I create this example Kustomization in my flux repo:
|
Now that the "global" elements of this deployment have been defined, we do some "flux-ception", and go one layer deeper, adding another Kustomization, telling flux to deploy any YAMLs found in the repo at `/secret-replicator`. I create this example Kustomization in my flux repo:
|
||||||
|
|
||||||
```yaml title="/bootstrap/kustomizations/kustomization-secret-replicator.yaml"
|
```yaml title="/bootstrap/kustomizations/kustomization-secret-replicator.yaml"
|
||||||
apiVersion: kustomize.toolkit.fluxcd.io/v1beta1
|
apiVersion: kustomize.toolkit.fluxcd.io/v1
|
||||||
kind: Kustomization
|
kind: Kustomization
|
||||||
metadata:
|
metadata:
|
||||||
name: secret-replicator
|
name: secret-replicator
|
||||||
@@ -57,7 +57,6 @@ spec:
|
|||||||
sourceRef:
|
sourceRef:
|
||||||
kind: GitRepository
|
kind: GitRepository
|
||||||
name: flux-system
|
name: flux-system
|
||||||
validation: server
|
|
||||||
healthChecks:
|
healthChecks:
|
||||||
- apiVersion: apps/v1
|
- apiVersion: apps/v1
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
---
|
---
|
||||||
title: Install Invidious in Kubernetes
|
title: Install Invidious in Kubernetes
|
||||||
description: How to install your own Invidious instance using Kubernetes
|
description: How to install your own Invidious instance using Kubernetes
|
||||||
status: new
|
|
||||||
---
|
---
|
||||||
|
|
||||||
# Install Invidious in Kubernetes
|
# Install Invidious in Kubernetes
|
||||||
@@ -73,7 +72,7 @@ metadata:
|
|||||||
Now that the "global" elements of this deployment (*just the GitRepository in this case*) have been defined, we do some "flux-ception", and go one layer deeper, adding another Kustomization, telling flux to deploy any YAMLs found in the repo at `/invidious`. I create this example Kustomization in my flux repo:
|
Now that the "global" elements of this deployment (*just the GitRepository in this case*) have been defined, we do some "flux-ception", and go one layer deeper, adding another Kustomization, telling flux to deploy any YAMLs found in the repo at `/invidious`. I create this example Kustomization in my flux repo:
|
||||||
|
|
||||||
```yaml title="/bootstrap/kustomizations/kustomization-invidious.yaml"
|
```yaml title="/bootstrap/kustomizations/kustomization-invidious.yaml"
|
||||||
apiVersion: kustomize.toolkit.fluxcd.io/v1beta1
|
apiVersion: kustomize.toolkit.fluxcd.io/v1
|
||||||
kind: Kustomization
|
kind: Kustomization
|
||||||
metadata:
|
metadata:
|
||||||
name: invidious
|
name: invidious
|
||||||
@@ -86,7 +85,6 @@ spec:
|
|||||||
sourceRef:
|
sourceRef:
|
||||||
kind: GitRepository
|
kind: GitRepository
|
||||||
name: flux-system
|
name: flux-system
|
||||||
validation: server
|
|
||||||
healthChecks:
|
healthChecks:
|
||||||
- apiVersion: apps/v1
|
- apiVersion: apps/v1
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ metadata:
|
|||||||
Now that the "global" elements of this deployment (*just the GitRepository in this case*) have been defined, we do some "flux-ception", and go one layer deeper, adding another Kustomization, telling flux to deploy any YAMLs found in the repo at `/mastodon`. I create this example Kustomization in my flux repo:
|
Now that the "global" elements of this deployment (*just the GitRepository in this case*) have been defined, we do some "flux-ception", and go one layer deeper, adding another Kustomization, telling flux to deploy any YAMLs found in the repo at `/mastodon`. I create this example Kustomization in my flux repo:
|
||||||
|
|
||||||
```yaml title="/bootstrap/kustomizations/kustomization-mastodon.yaml"
|
```yaml title="/bootstrap/kustomizations/kustomization-mastodon.yaml"
|
||||||
apiVersion: kustomize.toolkit.fluxcd.io/v1beta1
|
apiVersion: kustomize.toolkit.fluxcd.io/v1
|
||||||
kind: Kustomization
|
kind: Kustomization
|
||||||
metadata:
|
metadata:
|
||||||
name: mastodon
|
name: mastodon
|
||||||
@@ -85,7 +85,6 @@ spec:
|
|||||||
sourceRef:
|
sourceRef:
|
||||||
kind: GitRepository
|
kind: GitRepository
|
||||||
name: flux-system
|
name: flux-system
|
||||||
validation: server
|
|
||||||
healthChecks:
|
healthChecks:
|
||||||
- apiVersion: apps/v1
|
- apiVersion: apps/v1
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
|
|||||||
@@ -128,7 +128,7 @@ metadata:
|
|||||||
Now that the "global" elements of this deployment (*just the GitRepository in this case*) have been defined, we do some "flux-ception", and go one layer deeper, adding another Kustomization, telling flux to deploy any YAMLs found in the repo at `/invidious`. I create this example Kustomization in my flux repo:
|
Now that the "global" elements of this deployment (*just the GitRepository in this case*) have been defined, we do some "flux-ception", and go one layer deeper, adding another Kustomization, telling flux to deploy any YAMLs found in the repo at `/invidious`. I create this example Kustomization in my flux repo:
|
||||||
|
|
||||||
```yaml title="/bootstrap/kustomizations/kustomization-invidious.yaml"
|
```yaml title="/bootstrap/kustomizations/kustomization-invidious.yaml"
|
||||||
apiVersion: kustomize.toolkit.fluxcd.io/v1beta1
|
apiVersion: kustomize.toolkit.fluxcd.io/v1
|
||||||
kind: Kustomization
|
kind: Kustomization
|
||||||
metadata:
|
metadata:
|
||||||
name: invidious
|
name: invidious
|
||||||
@@ -141,7 +141,6 @@ spec:
|
|||||||
sourceRef:
|
sourceRef:
|
||||||
kind: GitRepository
|
kind: GitRepository
|
||||||
name: flux-system
|
name: flux-system
|
||||||
validation: server
|
|
||||||
healthChecks:
|
healthChecks:
|
||||||
- apiVersion: apps/v1
|
- apiVersion: apps/v1
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
|
|||||||
Reference in New Issue
Block a user