add monitor and pihole
This commit is contained in:
67
README.md
67
README.md
@@ -99,6 +99,61 @@ To uninstall
|
||||
/usr/local/bin/k3s-uninstall.sh
|
||||
```
|
||||
|
||||
To drain a node (for maintenance)
|
||||
|
||||
```bash
|
||||
export NODE=
|
||||
kubectl drain $NODE --ignore-daemonsets --delete-local-data
|
||||
```
|
||||
|
||||
### Create an NFS pv and pvc
|
||||
|
||||
pv.yaml
|
||||
|
||||
```yaml
|
||||
apiVersion: v1
|
||||
kind: PersistentVolume
|
||||
metadata:
|
||||
name: {{ .Release.Name }}
|
||||
annotations:
|
||||
"helm.sh/resource-policy": keep
|
||||
spec:
|
||||
storageClassName: {{ .Release.Name }}
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
capacity:
|
||||
storage: 100Gi
|
||||
nfs:
|
||||
server: freenas
|
||||
path: "/mnt/enc0/pi/pihole"
|
||||
```
|
||||
|
||||
pvc.yaml
|
||||
|
||||
```yaml
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: {{ .Release.Name }}
|
||||
annotations:
|
||||
"helm.sh/resource-policy": keep
|
||||
spec:
|
||||
storageClassName: {{ .Release.Name }}
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 100Gi
|
||||
```
|
||||
|
||||
### Disable local-storage
|
||||
|
||||
```bash
|
||||
'--disable=local-storage' \
|
||||
systemctl daemon-reload
|
||||
service k3s restart
|
||||
```
|
||||
|
||||
### Install Docker
|
||||
|
||||
```bash
|
||||
@@ -111,18 +166,8 @@ sudo apt-get remove python-configparser
|
||||
sudo pip3 -v install docker-compose
|
||||
```
|
||||
|
||||
### Add NFS for local-storage
|
||||
|
||||
Disable local-path:
|
||||
|
||||
```bash
|
||||
echo 'freenas:/mnt/enc0/pi /var/lib/rancher/k3s/storage nfs noexec,nosuid,nofail 0 0' >> /etc/fstab
|
||||
mkdir -p /var/lib/rancher/k3s/storage
|
||||
mount -a
|
||||
```
|
||||
|
||||
### Pihole password
|
||||
|
||||
```bash
|
||||
echo $(kubectl get secret pihole --output=jsonpath='{.data.WEBPASSWORD}' | base64 --decode)
|
||||
```
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user