update traefik kubernetes templates

This commit is contained in:
Christian Lempa 2024-11-08 10:29:27 +01:00
parent 30db37aec2
commit 6288d0faa2
5 changed files with 62 additions and 8 deletions

View File

@ -0,0 +1,22 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: example-deployment
namespace: your-namespace
labels:
app: example-app
spec:
replicas: 3 # how many pods?
selector:
matchLabels:
app: example-app
template:
metadata:
labels:
app: example-app
spec:
containers:
- name: nginx
image: nginx:latest
ports:
- containerPort: 80

View File

@ -0,0 +1,12 @@
apiVersion: v1
kind: Service
metadata:
name: example-service
namespace: your-namespace
spec:
selector:
app.kubernetes.io/name: MyApp
ports:
- protocol: TCP
port: 80
targetPort: 9376

View File

@ -14,13 +14,13 @@ service:
# type: ClusterIP
# (Optional) Add Ingress, when using ClusterIP
# ingress:
# enabled: true
# hosts:
# - host: "portainer-test-1.kube-prod-2.home.clcreative.de"
# paths:
# - path: "/"
# port: "9000"
ingress:
enabled: true
hosts:
- host: "portainer-test-1.kube-prod-2.home.clcreative.de"
paths:
- path: "/"
port: "9000"
# -- end
persistence:

View File

@ -0,0 +1,20 @@
apiVersion: traefik.io/v1alpha1
kind: IngressRoute
metadata:
name: ingressroute
# (Optional) Namespace
# namespace: your-namespace
# ---
spec:
entryPoints:
- web
- websecure
routes:
- match: Host(`your-hostname`)
kind: Rule
services:
- name: your-service
port: 80
# (Optional) TLS
# tls:
# secretName: your-tls-secret

View File

@ -1,4 +1,4 @@
apiVersion: traefik.containo.us/v1alpha1
apiVersion: traefik.io/v1alpha1
kind: IngressRouteTCP
metadata:
name: ingressroutetcp