mirror of
https://github.com/wahyd4/home-docker.git
synced 2026-08-08 20:15:03 +10:00
commit
This commit is contained in:
+1
-1
@@ -33,7 +33,7 @@ spec:
|
||||
spec:
|
||||
containers:
|
||||
- name: langflow
|
||||
image: langflowai/langflow:1.2.0
|
||||
image: mirror.gcr.io/langflowai/langflow:1.2.0
|
||||
imagePullPolicy: IfNotPresent
|
||||
ports:
|
||||
- containerPort: 7860
|
||||
|
||||
@@ -39,7 +39,7 @@ spec:
|
||||
- name: regcred
|
||||
containers:
|
||||
- name: adguard
|
||||
image: adguard/adguardhome:v0.108.0-b.33
|
||||
image: mirror.gcr.io/adguard/adguardhome:v0.108.0-b.33
|
||||
imagePullPolicy: IfNotPresent
|
||||
ports:
|
||||
- containerPort: 80
|
||||
|
||||
@@ -63,7 +63,7 @@ spec:
|
||||
containers:
|
||||
- name: backup
|
||||
# Same image as in /etc/kubernetes/manifests/etcd.yaml
|
||||
image: postgres:11
|
||||
image: mirror.gcr.io/postgres:11
|
||||
env:
|
||||
- name: DB_PASSWORD
|
||||
valueFrom:
|
||||
|
||||
+1
-1
@@ -29,7 +29,7 @@ spec:
|
||||
effect: NoSchedule
|
||||
containers:
|
||||
- name: mysql
|
||||
image: mysql:8.2
|
||||
image: mirror.gcr.io/mysql:8.2
|
||||
ports:
|
||||
- containerPort: 3306
|
||||
env:
|
||||
|
||||
+3
-3
@@ -57,7 +57,7 @@ spec:
|
||||
value: "-Xms1200m -Xmx1200m"
|
||||
initContainers:
|
||||
- name: fix-permissions
|
||||
image: alpine
|
||||
image: mirror.gcr.io/alpine
|
||||
command: ["sh", "-c", "chown -R 1000:1000 /usr/share/elasticsearch/data"]
|
||||
securityContext:
|
||||
privileged: true
|
||||
@@ -65,12 +65,12 @@ spec:
|
||||
- name: data
|
||||
mountPath: /usr/share/elasticsearch/data
|
||||
- name: increase-vm-max-map
|
||||
image: alpine
|
||||
image: mirror.gcr.io/alpine
|
||||
command: ["sysctl", "-w", "vm.max_map_count=262144"]
|
||||
securityContext:
|
||||
privileged: true
|
||||
- name: increase-fd-ulimit
|
||||
image: alpine
|
||||
image: mirror.gcr.io/alpine
|
||||
command: ["sh", "-c", "ulimit -n 65536"]
|
||||
securityContext:
|
||||
privileged: true
|
||||
|
||||
+3
-3
@@ -16,7 +16,7 @@ spec:
|
||||
spec:
|
||||
containers:
|
||||
- name: ddns-toozhao-com
|
||||
image: oznu/cloudflare-ddns
|
||||
image: mirror.gcr.io/oznu/cloudflare-ddns
|
||||
env:
|
||||
- name: API_KEY
|
||||
valueFrom:
|
||||
@@ -57,7 +57,7 @@ spec:
|
||||
spec:
|
||||
containers:
|
||||
- name: ddns-junv-cc
|
||||
image: oznu/cloudflare-ddns
|
||||
image: mirror.gcr.io/oznu/cloudflare-ddns
|
||||
env:
|
||||
- name: API_KEY
|
||||
valueFrom:
|
||||
@@ -98,7 +98,7 @@ spec:
|
||||
spec:
|
||||
containers:
|
||||
- name: ddns-m-junv-cc
|
||||
image: oznu/cloudflare-ddns
|
||||
image: mirror.gcr.io/oznu/cloudflare-ddns
|
||||
env:
|
||||
- name: API_KEY
|
||||
valueFrom:
|
||||
|
||||
@@ -22,7 +22,7 @@ spec:
|
||||
path: Caddyfile
|
||||
containers:
|
||||
- name: home-proxy
|
||||
image: caddy:2
|
||||
image: mirror.gcr.io/caddy:2
|
||||
args:
|
||||
[
|
||||
"caddy",
|
||||
|
||||
+1
-1
@@ -33,7 +33,7 @@ spec:
|
||||
spec:
|
||||
containers:
|
||||
- name: n8n
|
||||
image: n8nio/n8n:1.80.2
|
||||
image: mirror.gcr.io/n8nio/n8n:1.80.2
|
||||
imagePullPolicy: IfNotPresent
|
||||
securityContext:
|
||||
runAsUser: 0
|
||||
|
||||
@@ -43,7 +43,7 @@ spec:
|
||||
spec:
|
||||
containers:
|
||||
- name: searxng
|
||||
image: docker.io/searxng/searxng:2025.2.20-28d1240fc
|
||||
image: mirror.gcr.io/searxng/searxng:2025.2.20-28d1240fc
|
||||
env:
|
||||
- name: TZ
|
||||
value: Australia/Melbourne
|
||||
|
||||
+1
-1
@@ -27,7 +27,7 @@ spec:
|
||||
claimName: books-nfs
|
||||
containers:
|
||||
- name: alist
|
||||
image: xhofe/alist
|
||||
image: mirror.gcr.io/xhofe/alist
|
||||
securityContext:
|
||||
runAsUser: 0
|
||||
runAsGroup: 0
|
||||
|
||||
+1
-1
@@ -30,7 +30,7 @@ spec:
|
||||
path: password
|
||||
containers:
|
||||
- name: jackett
|
||||
image: linuxserver/jackett:0.22.1615
|
||||
image: mirror.gcr.io/linuxserver/jackett:0.22.1615
|
||||
securityContext:
|
||||
runAsUser: 0
|
||||
imagePullPolicy: IfNotPresent
|
||||
|
||||
+1
-1
@@ -469,7 +469,7 @@ spec:
|
||||
# - name: SERVER_HOSTNAME
|
||||
# value: au-sydney.privacy.network
|
||||
- name: files
|
||||
image: wahyd4/aria2-ui:edge
|
||||
image: mirror.gcr.io/wahyd4/aria2-ui:edge
|
||||
imagePullPolicy: Always
|
||||
ports:
|
||||
- containerPort: 80
|
||||
|
||||
@@ -21,7 +21,7 @@ spec:
|
||||
claimName: downloads-nfs
|
||||
containers:
|
||||
- name: static-file-server
|
||||
image: caddy:2
|
||||
image: mirror.gcr.io/caddy:2
|
||||
args: ["caddy", "file-server", "--listen", ":8080", "--root", "/www", "--browse"]
|
||||
securityContext:
|
||||
runAsUser: 1000
|
||||
|
||||
@@ -11,7 +11,7 @@ spec:
|
||||
containers:
|
||||
- name: backup
|
||||
# Same image as in /etc/kubernetes/manifests/etcd.yaml
|
||||
image: postgres:11
|
||||
image: mirror.gcr.io/postgres:11
|
||||
env:
|
||||
- name: DB_PASSWORD
|
||||
valueFrom:
|
||||
|
||||
+43
@@ -30,6 +30,42 @@ docker run --rm -it \
|
||||
--env ETCDCTL_API=3 \
|
||||
'k8s.gcr.io/etcd:3.2.24' sh
|
||||
|
||||
# Etcd recover a failed cluster
|
||||
|
||||
1. Stop the etcd service on the crashed node
|
||||
systemctl stop etcd
|
||||
2. Clean up the existing etcd data
|
||||
rm -rf /var/lib/etcd/*
|
||||
3. Get the member list from a healthy etcd node
|
||||
On one of the working nodes, run:
|
||||
|
||||
|
||||
# remove old member
|
||||
|
||||
ETCDCTL_API=3 etcdctl member remove 6c10765e571d3ce8 \
|
||||
--endpoints=https://192.168.1.10:2379 \
|
||||
--cacert=/etc/etcd/ca.pem \
|
||||
--cert=/etc/etcd/etcd.pem \
|
||||
--key=/etc/etcd/etcd-key.pem
|
||||
|
||||
# then add it back, both do it from a healthy node
|
||||
|
||||
ETCDCTL_API=3 etcdctl member add server-3 \
|
||||
--peer-urls=https://192.168.1.2:2380 \
|
||||
--endpoints=https://192.168.1.10:2379 \
|
||||
--cacert=/etc/etcd/ca.pem \
|
||||
--cert=/etc/etcd/etcd.pem \
|
||||
--key=/etc/etcd/etcd-key.pem
|
||||
# Backup existing config
|
||||
sudo cp /etc/kubernetes/admin.conf /etc/kubernetes/admin.conf.backup
|
||||
|
||||
# Generate new admin.conf
|
||||
sudo kubeadm init phase kubeconfig admin
|
||||
|
||||
# Copy to user's home directory
|
||||
mkdir -p $HOME/.kube
|
||||
sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
|
||||
sudo chown $(id -u):$(id -g) $HOME/.kube/config
|
||||
|
||||
|
||||
# 1 reset cluster
|
||||
@@ -185,3 +221,10 @@ sudo apt install kubeadm=1.27.6-00
|
||||
### Restore files from nas
|
||||
|
||||
rsync -chavzP --stats rsync://junv@192.168.1.4/backups/192.168.1.2/redis /mnt/k8s
|
||||
|
||||
|
||||
# Disk full
|
||||
|
||||
|
||||
# check large files
|
||||
sudo du -xh --max-depth=1 /mnt/k8s | sort -hr | head -n 15
|
||||
|
||||
Reference in New Issue
Block a user