aboutsummaryrefslogtreecommitdiffstats
path: root/kubernetes/pihole
diff options
context:
space:
mode:
authorterminaldweller <thabogre@gmail.com>2021-11-18 14:40:41 +0000
committerterminaldweller <thabogre@gmail.com>2021-11-18 14:40:41 +0000
commitc43133af81f5a15ce85a8722a881debab9a32316 (patch)
tree111b3e7080cd45d465bd40e87c0b720c30ea9293 /kubernetes/pihole
parentmoved bitlbee to kubernetes. using bitlbee-libpurple now (diff)
downloadscripts-c43133af81f5a15ce85a8722a881debab9a32316.tar.gz
scripts-c43133af81f5a15ce85a8722a881debab9a32316.zip
kubernetes updates
Diffstat (limited to '')
-rwxr-xr-xkubernetes/pihole/deploy.sh5
-rw-r--r--kubernetes/pihole/pihole-configmap.yaml6
-rw-r--r--kubernetes/pihole/pihole-deployment.yaml (renamed from kubernetes/rpi/pihole-deployment.yaml)35
-rw-r--r--kubernetes/pihole/pihole-secret.yaml (renamed from kubernetes/rpi/secret.yaml)2
4 files changed, 32 insertions, 16 deletions
diff --git a/kubernetes/pihole/deploy.sh b/kubernetes/pihole/deploy.sh
new file mode 100755
index 0000000..7b2dc5b
--- /dev/null
+++ b/kubernetes/pihole/deploy.sh
@@ -0,0 +1,5 @@
+#!/usr/bin/env sh
+
+kubectl apply -f ./pihole-secret.yaml
+kubectl apply -f ./pihole-configmap.yaml
+kubectl apply -f ./pihole-deployment.yaml
diff --git a/kubernetes/pihole/pihole-configmap.yaml b/kubernetes/pihole/pihole-configmap.yaml
new file mode 100644
index 0000000..d0c34bf
--- /dev/null
+++ b/kubernetes/pihole/pihole-configmap.yaml
@@ -0,0 +1,6 @@
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ name: pihole-configmap
+data:
+ pihole_tz: iran/tehran
diff --git a/kubernetes/rpi/pihole-deployment.yaml b/kubernetes/pihole/pihole-deployment.yaml
index cee5d53..8f48319 100644
--- a/kubernetes/rpi/pihole-deployment.yaml
+++ b/kubernetes/pihole/pihole-deployment.yaml
@@ -6,7 +6,7 @@ metadata:
app: pihole
spec:
replicas: 1
- selcetor:
+ selector:
matchLabels:
app: pihole
template:
@@ -26,12 +26,12 @@ spec:
- name: TZ
valueFrom:
configMapKeyRef:
- name: k3s-rpi-configmap
+ name: pihole-configmap
key: pihole_tz
- name: WEBPASSWORD
- valueFrom:
+ valueFrom:
secretKeyRef:
- name: k3s-rpi-secrets
+ name: pihole-secret
key: pihole-webpassword
---
apiVersion: v1
@@ -41,25 +41,30 @@ metadata:
spec:
selector:
app: pihole
- type: LoadBalancer
+ type: NodePort
ports:
- protocol: TCP
- port: 53
+ port: 2053
targetPort: 53
- nodePort: 53
+ nodePort: 30153
+ name: "pihole-tcp-53"
- protocol: UDP
- port: 53
+ port: 2053
targetPort: 53
- nodePort: 53
+ nodePort: 30153
+ name: "pihole-udp-53"
- protocol: UDP
- port: 67
+ port: 2067
targetPort: 67
- nodePort: 67
+ nodePort: 30167
+ name: "pihole-udp-67"
- protocol: TCP
- port: 80
+ port: 2080
targetPort: 80
- nodePort: 80
+ nodePort: 30180
+ name: "pihole-tcp-80"
- protocol: TCP
- port: 443
+ port: 20443
targetPort: 443
- nodePort: 443
+ nodePort: 30443
+ name: "pihole-tcp-443"
diff --git a/kubernetes/rpi/secret.yaml b/kubernetes/pihole/pihole-secret.yaml
index 0ac4b60..f79d6a6 100644
--- a/kubernetes/rpi/secret.yaml
+++ b/kubernetes/pihole/pihole-secret.yaml
@@ -1,7 +1,7 @@
apiVersion: v1
kind: Secret
metadata:
- name: k3s-rpi-secrets
+ name: pihole-secret
type: Opaque
data:
pihole-webpassword: WGFzaG1pdGgjNjY2Cg==