ingress
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
Wolfgang Hottgenroth 2024-11-19 09:41:01 +01:00
parent 02a8f5baa5
commit 8e8a69264e
Signed by: wn
GPG Key ID: 18FDFA577A8871AD
3 changed files with 42 additions and 0 deletions

2
.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
cert/tls.key
cert/tls.crt

4
cert/create.sh Executable file
View File

@ -0,0 +1,4 @@
#!/bin/bash
kubectl create secret tls zigbee2mqtt-cert -n homea --cert=tls.crt --key=tls.key

36
deployment/ingress.yml Normal file
View File

@ -0,0 +1,36 @@
---
apiVersion: v1
kind: Service
metadata:
name: zigbee2mqtt
spec:
type: ClusterIP
selector:
app: zigbee2mqtt
ports:
- name: http
protocol: TCP
port: 8080
targetPort: 8080
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: zigbee2mqtt
spec:
ingressClassName: traefik-internal
tls:
- hosts:
- zigbee2mqtt.hottis.de
secretName: zigbee2mqtt-cert
rules:
- host: zigbee2mqtt.hottis.de
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: zigbee2mqtt
port:
number: 8080