Housekeeping
This commit is contained in:
parent
93683f68d3
commit
d0887b71a2
@ -9,7 +9,7 @@
|
||||
## K3s cluster
|
||||
On first node:
|
||||
```
|
||||
curl -sfL https://get.k3s.io | sh -s - --no-deploy traefik
|
||||
curl -sfL https://get.k3s.io | sh -s - --disable local-path,traefik
|
||||
cat /var/lib/rancher/k3s/server/token
|
||||
kubectl config view --raw
|
||||
```
|
||||
|
@ -23,6 +23,8 @@ spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: plex
|
||||
strategy:
|
||||
type: Recreate
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
|
@ -1,2 +1,5 @@
|
||||
csi:
|
||||
kubeletRootDir: /var/lib/kubelet
|
||||
defaultSettings:
|
||||
# defaultDataPath: /var/lib/longhorn/
|
||||
defaultDataPath: /mnt/blockstorage/
|
||||
|
@ -18,7 +18,7 @@ rules:
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: RoleBinding
|
||||
metadata:
|
||||
name: kubectl-rolloutrestart
|
||||
name: kubectl-rolloutrestart-default
|
||||
namespace: default
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
@ -29,6 +29,34 @@ subjects:
|
||||
name: kubectl-rolloutrestart
|
||||
namespace: default
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: RoleBinding
|
||||
metadata:
|
||||
name: kubectl-rolloutrestart-unifi
|
||||
namespace: unifi
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: ClusterRole
|
||||
name: kubectl-rolloutrestart
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: kubectl-rolloutrestart
|
||||
namespace: default
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: RoleBinding
|
||||
metadata:
|
||||
name: kubectl-rolloutrestart-pvr
|
||||
namespace: pvr
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: ClusterRole
|
||||
name: kubectl-rolloutrestart
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: kubectl-rolloutrestart
|
||||
namespace: default
|
||||
---
|
||||
apiVersion: batch/v1beta1
|
||||
kind: CronJob
|
||||
metadata:
|
||||
@ -51,6 +79,9 @@ spec:
|
||||
- name: kubectl
|
||||
image: bv11-cr01.bessems.eu/proxy/bitnami/kubectl
|
||||
command:
|
||||
- 'bash'
|
||||
- '/bin/bash'
|
||||
- '-c'
|
||||
- 'for deploy in `kubectl get deployments | cut -d " " -f 1`; do kubectl rollout restart deployment $deploy; done'
|
||||
args:
|
||||
- for deploy in `kubectl get deployments -n default | cut -d " " -f 1`; do kubectl rollout restart deployment -n default $deploy; done;
|
||||
for deploy in `kubectl get deployments -n unifi | cut -d " " -f 1`; do kubectl rollout restart deployment -n unifi $deploy; done;
|
||||
for deploy in `kubectl get deployments -n pvr | cut -d " " -f 1`; do kubectl rollout restart deployment -n pvr $deploy; done;
|
||||
|
Loading…
Reference in New Issue
Block a user