mirror of
https://github.com/amkartashov/gf-k8s.git
synced 2026-01-10 01:19:44 +00:00
73 lines
1.4 KiB
YAML
73 lines
1.4 KiB
YAML
---
|
|
apiVersion: apps/v1
|
|
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: /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: networking.k8s.io/v1
|
|
kind: Ingress
|
|
metadata:
|
|
name: gorilychru
|
|
annotations:
|
|
kubernetes.io/ingress.class: nginx
|
|
nginx.ingress.kubernetes.io/ssl-redirect: "false"
|
|
spec:
|
|
tls:
|
|
- secretName: san-gorilych-ru-tls
|
|
hosts:
|
|
- gorilych.ru
|
|
rules:
|
|
- host: gorilych.ru
|
|
http:
|
|
paths:
|
|
- pathType: ImplementationSpecific
|
|
backend:
|
|
service:
|
|
name: gorilychru
|
|
port:
|
|
number: 80
|
|
|