Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
70 lines (69 sloc) 1.42 KB
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: "30Mi"
cpu: "50m"
---
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/tls-acme: "true"
kubernetes.io/ingress.class: "nginx"
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: /