-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathk8s.yaml
More file actions
70 lines (70 loc) · 1.49 KB
/
Copy pathk8s.yaml
File metadata and controls
70 lines (70 loc) · 1.49 KB
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
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: zihao
spec:
replicas: 1
revisionHistoryLimit: 1
template:
metadata:
labels:
app: zihao
spec:
containers:
- name: zihao
image: nginx:alpine
imagePullPolicy: Always
command: ["/bin/sh", "-c"]
args:
- "wget https://raw.githubusercontent.com/zzh8829/zihao/master/deploy/nginx_gcs_proxy.conf -O /etc/nginx/nginx_gcs_proxy.conf && \
wget https://raw.githubusercontent.com/zzh8829/zihao/master/deploy/nginx_zihao.conf -O /etc/nginx/conf.d/default.conf && \
nginx -g 'daemon off;'"
ports:
- containerPort: 8000
resources:
requests:
memory: "20Mi"
cpu: "10m"
---
apiVersion: v1
kind: Service
metadata:
name: zihao
labels:
app: zihao
spec:
ports:
- port: 80
targetPort: 8000
selector:
app: zihao
---
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: zihao
annotations:
kubernetes.io/ingress.class: "nginx"
certmanager.k8s.io/issuer: "letsencrypt-prod"
certmanager.k8s.io/acme-challenge-type: http01
spec:
tls:
- hosts:
- zihao.me
- www.zihao.me
secretName: zihao-tls
rules:
- host: zihao.me
http:
paths:
- backend:
serviceName: zihao
servicePort: 80
path: /
- host: www.zihao.me
http:
paths:
- backend:
serviceName: zihao
servicePort: 80
path: /