-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathworkloads.yml
81 lines (80 loc) · 1.38 KB
/
workloads.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# Based on https://github.com/kubernetes-sigs/kind/blob/main/site/static/examples/ingress/usage.yaml
kind: Pod
apiVersion: v1
metadata:
name: foo-app
labels:
app: foo
workload: ingress-demo
spec:
containers:
- name: foo-app
image: hashicorp/http-echo:0.2.3
args:
- "-text='hello world! this is foo!'"
---
kind: Service
apiVersion: v1
metadata:
name: foo-service
labels:
workload: ingress-demo
spec:
selector:
app: foo
ports:
# Default port used by the image
- port: 5678
---
kind: Pod
apiVersion: v1
metadata:
name: bar-app
labels:
app: bar
workload: ingress-demo
spec:
containers:
- name: bar-app
image: hashicorp/http-echo:0.2.3
args:
- "-text='hello world! this is bar!'"
---
kind: Service
apiVersion: v1
metadata:
name: bar-service
labels:
workload: ingress-demo
spec:
selector:
app: bar
ports:
# Default port used by the image
- port: 5678
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: example-ingress
labels:
workload: ingress-demo
spec:
rules:
- http:
paths:
- path: /foo
pathType: Prefix
backend:
service:
name: foo-service
port:
number: 5678
- path: /bar
pathType: Prefix
backend:
service:
name: bar-service
port:
number: 5678
---