expose dns service for acmedns

This commit is contained in:
Tobias Brunner 2023-03-09 20:46:15 +01:00
parent 98c179a645
commit 6be43fe5f0
Signed by: tobru
SSH key fingerprint: SHA256:kywVhvCA+MIxL6eBgoQa+BfC/ROJqcfD2bpy1PR6Ebk
5 changed files with 45 additions and 42 deletions

23
apps/acmedns/ingress.yaml Normal file
View file

@ -0,0 +1,23 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: acmedns
annotations:
cert-manager.io/cluster-issuer: letsencrypt-prod
traefik.ingress.kubernetes.io/router.middlewares: kube-system-redirect-https@kubernetescrd
spec:
rules:
- host: acmedns.tbrnt.ch
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: acmedns-api
port:
number: 8080
tls:
- hosts:
- acmedns.tbrnt.ch
secretName: ingress-cert

View file

@ -1,27 +0,0 @@
apiVersion: traefik.containo.us/v1alpha1
kind: IngressRouteTCP
metadata:
labels:
app: acmedns
name: acmedns
spec:
entryPoints:
- dnstcp
routes:
- match: HostSNI(`*`)
services:
- name: acmedns-dns
port: 5353
weight: 10
#---
#apiVersion: traefik.containo.us/v1alpha1
#kind: IngressRouteUDP
#metadata:
# name: acmedns
#spec:
# entryPoints:
# - foo
# routes:
# - services:
# - name: acmedns-dns
# port: 53

View file

@ -0,0 +1,8 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- deployment.yaml
- configmap.yaml
#- ingress.yaml
- service.yaml
- pvc.yaml

View file

@ -1,4 +1,3 @@
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
@ -7,7 +6,7 @@ metadata:
app: acmedns
spec:
accessModes:
- ReadWriteOnce
- ReadWriteOnce
volumeMode: Filesystem
resources:
requests:

View file

@ -6,10 +6,10 @@ metadata:
name: acmedns-api
spec:
ports:
- name: acmedns
port: 8080
protocol: TCP
targetPort: 8080
- name: acmedns
port: 8080
protocol: TCP
targetPort: 8080
selector:
app: acmedns
type: ClusterIP
@ -22,14 +22,14 @@ metadata:
name: acmedns-dns
spec:
ports:
- name: dnstcp
port: 5353
protocol: TCP
targetPort: 5353
- name: dnsudp
port: 5353
protocol: UDP
targetPort: 5353
- name: dnstcp
port: 53
protocol: TCP
targetPort: 53
- name: dnsudp
port: 53
protocol: UDP
targetPort: 53
selector:
app: acmedns
type: ClusterIP
type: LoadBalancer