mirror of
https://github.com/eliasstepanik/caddy-ingess.git
synced 2026-01-11 12:38:27 +00:00
94 lines
1.5 KiB
YAML
94 lines
1.5 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: example
|
|
labels:
|
|
app: example
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: example
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: example
|
|
spec:
|
|
containers:
|
|
- name: httpecho
|
|
image: hashicorp/http-echo
|
|
args:
|
|
- "-listen=:8080"
|
|
- "-text=hello world"
|
|
ports:
|
|
- containerPort: 8080
|
|
---
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: example2
|
|
labels:
|
|
app: example2
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: example2
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: example2
|
|
spec:
|
|
containers:
|
|
- name: httpecho
|
|
image: hashicorp/http-echo
|
|
args:
|
|
- "-listen=:8080"
|
|
- "-text=hello world 2"
|
|
ports:
|
|
- containerPort: 8080
|
|
---
|
|
kind: Service
|
|
apiVersion: v1
|
|
metadata:
|
|
name: example
|
|
spec:
|
|
type: ClusterIP
|
|
selector:
|
|
app: example
|
|
ports:
|
|
- protocol: TCP
|
|
port: 80
|
|
targetPort: 8080
|
|
---
|
|
kind: Service
|
|
apiVersion: v1
|
|
metadata:
|
|
name: example2
|
|
spec:
|
|
type: ClusterIP
|
|
selector:
|
|
app: example2
|
|
ports:
|
|
- protocol: TCP
|
|
port: 80
|
|
targetPort: 8080
|
|
---
|
|
apiVersion: extensions/v1beta1
|
|
kind: Ingress
|
|
metadata:
|
|
name: example
|
|
annotations:
|
|
kubernetes.io/ingress.class: caddy
|
|
spec:
|
|
rules:
|
|
- host: caddy2.kubed.co
|
|
http:
|
|
paths:
|
|
- path: /hello2
|
|
backend:
|
|
serviceName: example2
|
|
servicePort: 8080
|
|
- backend:
|
|
serviceName: example
|
|
servicePort: 8080 |