-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnginx-fpm.yaml
57 lines (57 loc) · 1.11 KB
/
nginx-fpm.yaml
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
apiVersion: v1
kind: ConfigMap
metadata:
name: nginx-config
data:
nginx.conf: |
events {}
http {
server {
listen 8096;
root /var/www/html;
index index.html index.htm index.php;
}
}
---
apiVersion: v1
kind: Pod
metadata:
name: nginx-phpfpm
labels:
app: nginx-phpfpm
spec:
volumes:
- name: shared-files
emptyDir: {}
- name: nginx-config-volume
configMap:
name: nginx-config
containers:
- name: nginx-container
image: nginx:latest
ports:
- containerPort: 8096
volumeMounts:
- mountPath: "/var/www/html"
name: shared-files
- name: nginx-config-volume
mountPath: "/etc/nginx/nginx.conf"
subPath: "nginx.conf"
- name: php-fpm-container
image: php:8.2-fpm-alpine
volumeMounts:
- mountPath: "/var/www/html"
name: shared-files
---
apiVersion: v1
kind: Service
metadata:
name: nginx-phpfpm-service
spec:
type: NodePort
selector:
app: nginx-phpfpm
ports:
- port: 8096
targetPort: 8096
nodePort: 30012