new cluster

This commit is contained in:
auricom
2021-03-21 01:33:51 +01:00
parent 49718cb277
commit d527627d28
105 changed files with 1835 additions and 2181 deletions

View File

@@ -1,6 +1,7 @@
<img src="https://camo.githubusercontent.com/5b298bf6b0596795602bd771c5bddbb963e83e0f/68747470733a2f2f692e696d6775722e636f6d2f7031527a586a512e706e67" align="left" width="144px" height="144px"/>
### My home Kubernetes cluster :sailboat:
_... managed by Flux and serviced with RenovateBot_ :robot:
<br/>
@@ -8,11 +9,10 @@ _... managed by Flux and serviced with RenovateBot_ :robot:
<br/>
[![Discord](https://img.shields.io/badge/discord-chat-7289DA.svg?maxAge=60&style=for-the-badge)](https://discord.gg/AvJxRMRf6H)
[![k3s](https://img.shields.io/badge/k3s-v1.19.2-orange?style=for-the-badge)](https://k3s.io/)
[![k3s](https://img.shields.io/badge/k3s-v1.20.4-orange?style=for-the-badge)](https://k3s.io/)
[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white&style=for-the-badge)](https://github.com/pre-commit/pre-commit)
[![renovate](https://img.shields.io/badge/renovate-enabled-success?style=for-the-badge&logo=data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjUgNSAzNzAgMzcwIj48Y2lyY2xlIGN4PSIxODkiIGN5PSIxOTAiIHI9IjE4NCIgZmlsbD0iI2ZlMiIvPjxwYXRoIGZpbGw9IiM4YmIiIGQ9Ik0yNTEgMjU2bC0zOC0zOGExNyAxNyAwIDAxMC0yNGw1Ni01NmMyLTIgMi02IDAtN2wtMjAtMjFhNSA1IDAgMDAtNyAwbC0xMyAxMi05LTggMTMtMTNhMTcgMTcgMCAwMTI0IDBsMjEgMjFjNyA3IDcgMTcgMCAyNGwtNTYgNTdhNSA1IDAgMDAwIDdsMzggMzh6Ii8+PHBhdGggZmlsbD0iI2Q1MSIgZD0iTTMwMCAyODhsLTggOGMtNCA0LTExIDQtMTYgMGw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iAwIDAwMC05bC0yNC0yMy00LTJ6Ii8+PC9zdmc+)](https://github.com/renovatebot/renovate)
### Bootstrap Flux
```bash
@@ -24,6 +24,7 @@ flux bootstrap github \
--personal \
--network-policy=false
```
### SOPS secret from GPG key
```bash
@@ -40,28 +41,23 @@ sops --encrypt --pgp=<GPG_KEY_ID> --encrypted-regex '^(data|stringData)$' --in-p
```bash
kubectl taint node k3os-server k3s-controlplane=true:NoSchedule
kubectl taint node k3s-server k3s-controlplane=true:NoSchedule
kubectl label node k3os-worker1 node-role.kubernetes.io/worker=true
kubectl label node k3os-worker2 node-role.kubernetes.io/worker=true
kubectl label node k3os-worker3 node-role.kubernetes.io/worker=true
kubectl label node k3s-worker1 node-role.kubernetes.io/worker=true
kubectl label node k3s-worker2 node-role.kubernetes.io/worker=true
kubectl label node k3s-worker3 node-role.kubernetes.io/worker=true
kubectl annotate node k3os-worker1 node.longhorn.io/default-node-tags='["storage","fast"]'
kubectl annotate node k3os-worker2 node.longhorn.io/default-node-tags='["storage","fast"]'
kubectl annotate node k3os-worker3 node.longhorn.io/default-node-tags='["storage","fast"]'
kubectl annotate node k3s-worker1 node.longhorn.io/default-node-tags='["storage","fast"]'
kubectl annotate node k3s-worker2 node.longhorn.io/default-node-tags='["storage","fast"]'
kubectl annotate node k3s-worker3 node.longhorn.io/default-node-tags='["storage","fast"]'
kubectl annotate node k3os-worker1 node.longhorn.io/create-default-disk='config'
kubectl annotate node k3os-worker2 node.longhorn.io/create-default-disk='config'
kubectl annotate node k3os-worker3 node.longhorn.io/create-default-disk='config'
kubectl annotate node k3s-worker1 node.longhorn.io/create-default-disk='config'
kubectl annotate node k3s-worker2 node.longhorn.io/create-default-disk='config'
kubectl annotate node k3s-worker3 node.longhorn.io/create-default-disk='config'
kubectl annotate node k3os-worker1 node.longhorn.io/default-disks-config=[ { "name":"fast-ssd-disk", "path":"/var/lib/longhorn", "allowScheduling":true, "storageReserved":304857600, "tags":[ "ssd", "fast" ] }]
kubectl annotate node k3os-worker2 node.longhorn.io/default-disks-config=[ { "name":"fast-ssd-disk", "path":"/var/lib/longhorn", "allowScheduling":true, "storageReserved":304857600, "tags":[ "ssd", "fast" ] }]
kubectl annotate node k3os-worker3 node.longhorn.io/default-disks-config=[ { "name":"fast-ssd-disk", "path":"/var/lib/longhorn", "allowScheduling":true, "storageReserved":304857600, "tags":[ "ssd", "fast" ] }]
#kubectl label node k3os-server plan.upgrade.cattle.io/k3os-latest=true
#kubectl label node k3os-worker1 plan.upgrade.cattle.io/k3os-latest=true
#kubectl label node k3os-worker2 plan.upgrade.cattle.io/k3os-latest=true
#kubectl label node k3os-worker3 plan.upgrade.cattle.io/k3os-latest=true
kubectl annotate node k3s-worker1 node.longhorn.io/default-disks-config=[ { "name":"fast-ssd-disk", "path":"/var/lib/longhorn", "allowScheduling":true, "storageReserved":304857600, "tags":[ "ssd", "fast" ] }]
kubectl annotate node k3s-worker2 node.longhorn.io/default-disks-config=[ { "name":"fast-ssd-disk", "path":"/var/lib/longhorn", "allowScheduling":true, "storageReserved":304857600, "tags":[ "ssd", "fast" ] }]
kubectl annotate node k3s-worker3 node.longhorn.io/default-disks-config=[ { "name":"fast-ssd-disk", "path":"/var/lib/longhorn", "allowScheduling":true, "storageReserved":304857600, "tags":[ "ssd", "fast" ] }]
```
https://github.com/rancher/k3s/issues/1401 for k3os-system deployment
https://github.com/rancher/k3s/issues/1401 for k3s-system deployment