add node labels to readme

This commit is contained in:
auricom
2020-12-28 12:11:02 +01:00
parent d8cdf08d6a
commit 1059c82aea

View File

@@ -35,3 +35,33 @@ gpg --export-secret-keys --armor <GPG_KEY_ID> | kubectl create secret generic so
```bash
sops --encrypt --pgp=<GPG_KEY_ID> --encrypted-regex '^(data|stringData)$' --in-place <FILE_PATH>
```
## Labels nodes
```bash
kubectl taint node k3os-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 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 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 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
```
https://github.com/rancher/k3s/issues/1401 for k3os-system deployment