gf-k8s/apps/services/gorilych.ru.yaml
2019-10-27 05:48:03 +07:00

69 lines
1.3 KiB
YAML

---
apiVersion: apps/v1beta2
kind: Deployment
metadata:
name: gorilychru
labels:
app: gorilychru
spec:
replicas: 1
selector:
matchLabels:
app: gorilychru
template:
metadata:
labels:
app: gorilychru
spec:
volumes:
- name: gorilychru
hostPath:
path: /data/home/www/gorilych.ru
type: Directory
#- name: nginxdefaultconf
# hostPath:
# path: /data/gorilych.ru/nginx.vh.default.conf
containers:
- name: gorilychru
image: nginx:alpine
ports:
- containerPort: 80
name: gorilychru
volumeMounts:
- mountPath: /usr/share/nginx/html
name: gorilychru
#- mountPath: /etc/nginx/conf.d/default.conf
# name: nginxdefaultconf
---
kind: Service
apiVersion: v1
metadata:
name: gorilychru
spec:
selector:
app: gorilychru
ports:
- name: gorilychru
protocol: TCP
port: 80
targetPort: gorilychru
---
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: gorilychru
annotations:
nginx.ingress.kubernetes.io/ssl-redirect: "false"
spec:
tls:
- secretName: san-gorilych-ru-tls
hosts:
- gorilych.ru
rules:
- host: gorilych.ru
http:
paths:
- backend:
serviceName: gorilychru
servicePort: 80