-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample-deployment.yaml
More file actions
48 lines (48 loc) · 837 Bytes
/
Copy pathexample-deployment.yaml
File metadata and controls
48 lines (48 loc) · 837 Bytes
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
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-example
namespace: ${USER_NAME}
spec:
replicas: 1
selector:
matchLabels:
app: nginx
template:
metadata:
labels:
app: nginx
spec:
serviceAccountName: ${USER_NAME}
containers:
- name: nginx
image: nginx:latest
ports:
- containerPort: 80
---
apiVersion: v1
kind: Service
metadata:
name: nginx-service
namespace: ${USER_NAME}
spec:
selector:
app: nginx
ports:
- port: 80
targetPort: 80
---
apiVersion: traefik.io/v1alpha1
kind: IngressRoute
metadata:
name: nginx-route
namespace: ${USER_NAME}
spec:
entryPoints:
- web
routes:
- match: Host(`${USER_NAME}.example.com`)
kind: Rule
services:
- name: nginx-service
port: 80