-
-
Save devsteppe9/bf2ec5e81fa2f559c49f94e34b3064e0 to your computer and use it in GitHub Desktop.
Kubernetes manifest for adguard DNS server
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Namespace | |
| apiVersion: v1 | |
| kind: Namespace | |
| metadata: | |
| name: adguard | |
| --- | |
| # Persistent Volume (Edit path/storage as needed) | |
| apiVersion: v1 | |
| kind: PersistentVolume | |
| metadata: | |
| name: adguard-pv | |
| namespace: adguard | |
| spec: | |
| capacity: | |
| storage: 5Gi | |
| accessModes: | |
| - ReadWriteOnce | |
| persistentVolumeReclaimPolicy: Retain | |
| hostPath: | |
| path: /mnt/homelab/adguard | |
| type: DirectoryOrCreate | |
| --- | |
| # PVC | |
| apiVersion: v1 | |
| kind: PersistentVolumeClaim | |
| metadata: | |
| name: adguard-pvc | |
| namespace: adguard | |
| spec: | |
| accessModes: | |
| - ReadWriteOnce | |
| resources: | |
| requests: | |
| storage: 5Gi | |
| storageClassName: '' | |
| --- | |
| # Deployment | |
| apiVersion: apps/v1 | |
| kind: Deployment | |
| metadata: | |
| name: adguardhome | |
| namespace: adguard | |
| labels: | |
| app: adguardhome | |
| spec: | |
| replicas: 1 | |
| selector: | |
| matchLabels: | |
| app: adguardhome | |
| template: | |
| metadata: | |
| labels: | |
| app: adguardhome | |
| spec: | |
| containers: | |
| - name: adguardhome | |
| image: adguard/adguardhome:v0.107.71 | |
| imagePullPolicy: IfNotPresent | |
| # Mount config + data | |
| volumeMounts: | |
| - name: data | |
| mountPath: /opt/adguardhome/work | |
| subPath: work | |
| - name: data | |
| mountPath: /opt/adguardhome/conf | |
| subPath: conf | |
| ports: | |
| - name: dns-udp | |
| containerPort: 53 | |
| protocol: UDP | |
| - name: dns-tcp | |
| containerPort: 53 | |
| protocol: TCP | |
| - name: http | |
| containerPort: 3000 | |
| protocol: TCP | |
| # Read config from ConfigMap if needed | |
| volumes: | |
| - name: data | |
| persistentVolumeClaim: | |
| claimName: adguard-pvc | |
| --- | |
| # Service | |
| apiVersion: v1 | |
| kind: Service | |
| metadata: | |
| name: adguard-service | |
| namespace: adguard | |
| spec: | |
| selector: | |
| app: adguardhome | |
| ports: | |
| - name: dns-udp | |
| protocol: UDP | |
| port: 53 | |
| targetPort: 53 | |
| - name: dns-tcp | |
| protocol: TCP | |
| port: 53 | |
| targetPort: 53 | |
| - name: http | |
| protocol: TCP | |
| port: 3000 | |
| targetPort: 3000 | |
| type: LoadBalancer |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment