08-27-周三_17-09-29
This commit is contained in:
63
Kubernetes/resources/02.phpfpm_v2.yaml
Normal file
63
Kubernetes/resources/02.phpfpm_v2.yaml
Normal file
@@ -0,0 +1,63 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
labels:
|
||||
app: php
|
||||
name: php
|
||||
spec:
|
||||
replicas: 3
|
||||
selector:
|
||||
matchLabels:
|
||||
app: php
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: php
|
||||
spec:
|
||||
containers:
|
||||
- name: myapp
|
||||
image: myphp:7.4-fpm
|
||||
ports:
|
||||
- containerPort: 9000
|
||||
livenessProbe:
|
||||
tcpSocket:
|
||||
port: 9000
|
||||
initialDelaySeconds: 15
|
||||
periodSeconds: 10
|
||||
timeoutSeconds: 5
|
||||
failureThreshold: 3
|
||||
readinessProbe:
|
||||
tcpSocket:
|
||||
port: 9000
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 10
|
||||
timeoutSeconds: 3
|
||||
failureThreshold: 2
|
||||
volumeMounts:
|
||||
- name: html
|
||||
mountPath: /usr/share/nginx/html
|
||||
- name: config
|
||||
mountPath: /usr/local/etc
|
||||
volumes:
|
||||
- name: html
|
||||
nfs:
|
||||
server: 10.3.204.100
|
||||
path: /root/data/nfs/html
|
||||
- name: config
|
||||
nfs:
|
||||
server: 10.3.204.100
|
||||
path: /root/data/nfs/php
|
||||
|
||||
---
|
||||
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: phpfpm
|
||||
spec:
|
||||
selector:
|
||||
app: php
|
||||
type: ClusterIP
|
||||
ports:
|
||||
- port: 9000
|
||||
targetPort: 9000
|
Reference in New Issue
Block a user