-
Notifications
You must be signed in to change notification settings - Fork 0
/
deploy.yaml
120 lines (120 loc) · 2.24 KB
/
deploy.yaml
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
name: h3.k0s.io
spec:
secretName: h3.k0s.io
dnsNames:
- 'h3.k0s.io'
issuerRef:
name: letsencrypt
# We can reference ClusterIssuers by changing the kind here.
# The default value is Issuer (i.e. a locally namespaced Issuer)
kind: ClusterIssuer
group: cert-manager.io
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: h3
spec:
replicas: 1
selector:
matchLabels:
app: h3
strategy:
type: Recreate
template:
metadata:
labels:
app: h3
spec:
containers:
- args:
- |
# k0s agent
h3 server
ports:
- containerPort: 4430
hostPort: 444
protocol: UDP
- containerPort: 4430
protocol: TCP
env:
- name: PORT
value: "4430"
- name: HOST
value: h3.k0s.io
- name: ALT_SVC
value: h3=":444"
- name: UI
value: https://http3.vercel.app
- name: CERT
value: tls.crt
- name: KEY
value: tls.key
command:
- bash
- -c
image: btwiuse/h3
imagePullPolicy: Always
name: h3
volumeMounts:
- mountPath: /h3
name: h3
restartPolicy: Always
volumes:
- secret:
secretName: h3.k0s.io
name: h3
- hostPath:
path: /
name: chroot
---
apiVersion: v1
kind: Service
metadata:
name: h3
spec:
internalTrafficPolicy: Cluster
ipFamilies:
- IPv4
ports:
- port: 8000
protocol: TCP
targetPort: 4430
nodePort: 30444
name: tcp
- port: 4000
protocol: UDP
targetPort: 4430
nodePort: 30444
name: udp
selector:
app: h3
sessionAffinity: None
type: NodePort
---
# TODO How to make traefik ingress work with http3?
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
annotations:
kubernetes.io/ingress.class: traefik
name: h3.k0s.io
spec:
rules:
- host: h3.k0s.io
http:
paths:
- backend:
service:
name: h3
port:
number: 8000
path: /
pathType: ImplementationSpecific
tls:
- hosts:
- h3.k0s.io
secretName: h3