mirror of
https://github.com/furyhawk/cloudy.git
synced 2026-05-24 00:45:58 +00:00
refactor: Update Traefik ingress routes file paths
This commit is contained in:
@@ -0,0 +1,47 @@
|
||||
apiVersion: traefik.io/v1alpha1
|
||||
kind: IngressRoute
|
||||
metadata:
|
||||
name: myingressroute
|
||||
namespace: default
|
||||
|
||||
spec:
|
||||
entryPoints:
|
||||
- web
|
||||
|
||||
routes:
|
||||
- match: Host(`test.traefik.local`) && PathPrefix(`/bar`)
|
||||
kind: Rule
|
||||
services:
|
||||
- name: whoami
|
||||
port: 80
|
||||
|
||||
---
|
||||
apiVersion: traefik.io/v1alpha1
|
||||
kind: IngressRouteTCP
|
||||
metadata:
|
||||
name: ingressroute.tcp
|
||||
namespace: default
|
||||
|
||||
spec:
|
||||
entryPoints:
|
||||
- tcpep
|
||||
routes:
|
||||
- match: HostSNI(`testtcp.traefik.local`)
|
||||
services:
|
||||
- name: whoamitcp
|
||||
port: 8080
|
||||
|
||||
---
|
||||
apiVersion: traefik.io/v1alpha1
|
||||
kind: IngressRouteUDP
|
||||
metadata:
|
||||
name: ingressroute.udp
|
||||
namespace: default
|
||||
|
||||
spec:
|
||||
entryPoints:
|
||||
- udpep
|
||||
routes:
|
||||
- services:
|
||||
- name: whoamiudp
|
||||
port: 8080
|
||||
@@ -0,0 +1,8 @@
|
||||
# traefik ingress route
|
||||
|
||||
## Description
|
||||
```bash
|
||||
k apply -f ingress_route.yaml -f whoami.yaml
|
||||
http://test.traefik.local/bar
|
||||
k delete -f ingress_route.yaml -f whoami.yaml
|
||||
```
|
||||
@@ -0,0 +1,82 @@
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: traefik-ingress-controller
|
||||
|
||||
---
|
||||
kind: Deployment
|
||||
apiVersion: apps/v1
|
||||
metadata:
|
||||
name: traefik
|
||||
labels:
|
||||
app: traefik
|
||||
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: traefik
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: traefik
|
||||
spec:
|
||||
serviceAccountName: traefik-ingress-controller
|
||||
containers:
|
||||
- name: traefik
|
||||
image: traefik:v3.1
|
||||
args:
|
||||
- --log.level=DEBUG
|
||||
- --api
|
||||
- --api.insecure
|
||||
- --entryPoints.web.address=:80
|
||||
- --entryPoints.tcpep.address=:8000
|
||||
- --entryPoints.udpep.address=:9000/udp
|
||||
- --providers.kubernetescrd
|
||||
ports:
|
||||
- name: web
|
||||
containerPort: 80
|
||||
- name: admin
|
||||
containerPort: 8080
|
||||
- name: tcpep
|
||||
containerPort: 8000
|
||||
- name: udpep
|
||||
containerPort: 9000
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: traefik
|
||||
spec:
|
||||
type: LoadBalancer
|
||||
selector:
|
||||
app: traefik
|
||||
ports:
|
||||
- protocol: TCP
|
||||
port: 80
|
||||
name: web
|
||||
targetPort: 80
|
||||
- protocol: TCP
|
||||
port: 8080
|
||||
name: admin
|
||||
targetPort: 8080
|
||||
- protocol: TCP
|
||||
port: 8000
|
||||
name: tcpep
|
||||
targetPort: 8000
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: traefikudp
|
||||
spec:
|
||||
type: LoadBalancer
|
||||
selector:
|
||||
app: traefik
|
||||
ports:
|
||||
- protocol: UDP
|
||||
port: 9000
|
||||
name: udpep
|
||||
targetPort: 9000
|
||||
@@ -0,0 +1,126 @@
|
||||
kind: Deployment
|
||||
apiVersion: apps/v1
|
||||
metadata:
|
||||
name: whoami
|
||||
namespace: default
|
||||
labels:
|
||||
app: traefiklabs
|
||||
name: whoami
|
||||
|
||||
spec:
|
||||
replicas: 2
|
||||
selector:
|
||||
matchLabels:
|
||||
app: traefiklabs
|
||||
task: whoami
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: traefiklabs
|
||||
task: whoami
|
||||
spec:
|
||||
containers:
|
||||
- name: whoami
|
||||
image: traefik/whoami
|
||||
ports:
|
||||
- containerPort: 80
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: whoami
|
||||
namespace: default
|
||||
|
||||
spec:
|
||||
ports:
|
||||
- name: http
|
||||
port: 80
|
||||
selector:
|
||||
app: traefiklabs
|
||||
task: whoami
|
||||
|
||||
---
|
||||
kind: Deployment
|
||||
apiVersion: apps/v1
|
||||
metadata:
|
||||
name: whoamitcp
|
||||
namespace: default
|
||||
labels:
|
||||
app: traefiklabs
|
||||
name: whoamitcp
|
||||
|
||||
spec:
|
||||
replicas: 2
|
||||
selector:
|
||||
matchLabels:
|
||||
app: traefiklabs
|
||||
task: whoamitcp
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: traefiklabs
|
||||
task: whoamitcp
|
||||
spec:
|
||||
containers:
|
||||
- name: whoamitcp
|
||||
image: traefik/whoamitcp
|
||||
ports:
|
||||
- containerPort: 8080
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: whoamitcp
|
||||
namespace: default
|
||||
|
||||
spec:
|
||||
ports:
|
||||
- protocol: TCP
|
||||
port: 8080
|
||||
selector:
|
||||
app: traefiklabs
|
||||
task: whoamitcp
|
||||
|
||||
---
|
||||
kind: Deployment
|
||||
apiVersion: apps/v1
|
||||
metadata:
|
||||
name: whoamiudp
|
||||
namespace: default
|
||||
labels:
|
||||
app: traefiklabs
|
||||
name: whoamiudp
|
||||
|
||||
spec:
|
||||
replicas: 2
|
||||
selector:
|
||||
matchLabels:
|
||||
app: traefiklabs
|
||||
task: whoamiudp
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: traefiklabs
|
||||
task: whoamiudp
|
||||
spec:
|
||||
containers:
|
||||
- name: whoamiudp
|
||||
image: traefik/whoamiudp:latest
|
||||
ports:
|
||||
- containerPort: 8080
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: whoamiudp
|
||||
namespace: default
|
||||
|
||||
spec:
|
||||
ports:
|
||||
- port: 8080
|
||||
selector:
|
||||
app: traefiklabs
|
||||
task: whoamiudp
|
||||
Reference in New Issue
Block a user