apiVersion: apps/v1 kind: Deployment metadata: name: adguard spec: replicas: 1 selector: matchLabels: app: adguard template: metadata: labels: app: adguard spec: initContainers: - name: config-binder image: alpine command: ["sh", "-c", "mkdir -p /adguard/conf && cp /binder/AdGuardHome.yaml /adguard/conf/AdGuardHome.yaml"] volumeMounts: - name: adguard-config-volume mountPath: /binder - name: adguard-data mountPath: /adguard containers: - name: adguard image: adguard/adguardhome ports: - containerPort: 53 protocol: UDP - containerPort: 53 protocol: TCP - containerPort: 3000 protocol: TCP volumeMounts: - name: adguard-data mountPath: /opt/adguardhome/conf subPath: conf - name: adguard-data mountPath: /opt/adguardhome/work subPath: work volumes: - name: adguard-config-volume configMap: name: adguard-config - name: adguard-data persistentVolumeClaim: claimName: adguard-pvc