2021-08-20 09:38:18 +02:00

49 lines
963 B
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: app2
labels:
app: app2
spec:
replicas: 1
selector:
matchLabels:
app: app2
template:
metadata:
labels:
app: app2
spec:
containers:
- name: app2
image: php:fpm
volumeMounts:
- name: www
mountPath: /var/www/html
volumes:
- name: www
hostPath:
path: /shared/www/app2.example.com
type: Directory
---
apiVersion: v1
kind: Service
metadata:
name: app2
# this label is mandatory
labels:
bunkerized-nginx: "yes"
annotations:
bunkerized-nginx.SERVER_NAME: "app2.example.com"
bunkerized-nginx.REMOTE_PHP: "app2.default.svc.cluster.local"
bunkerized-nginx.REMOTE_PHP_PATH: "/var/www/html"
bunkerized-nginx.AUTO_LETS_ENCRYPT: "yes"
spec:
type: ClusterIP
selector:
app: app2
ports:
- protocol: TCP
port: 9000
targetPort: 9000