-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathphp-cm.yaml
More file actions
71 lines (69 loc) · 1.5 KB
/
Copy pathphp-cm.yaml
File metadata and controls
71 lines (69 loc) · 1.5 KB
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
k8s-app: wordpress-php
qcloud-app: wordpress-php
name: wordpress-php
namespace: lnmp
spec:
replicas: 2
selector:
matchLabels:
k8s-app: wordpress-php
qcloud-app: wordpress-php
strategy:
rollingUpdate:
maxSurge: 1
maxUnavailable: 0
type: RollingUpdate
template:
metadata:
labels:
k8s-app: wordpress-php
qcloud-app: wordpress-php
spec:
containers:
- env:
- name: PATH
value: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
image: ccr.ccs.tencentyun.com/chenyong/php:5.6.31-fpm-mysql-wp
imagePullPolicy: Always
name: php
resources:
limits:
cpu: 500m
memory: 1Gi
requests:
cpu: 250m
memory: 256Mi
volumeMounts:
- mountPath: /var/www/wordpress/wp-config.php
name: wp-config
subPath: wp-config.php
dnsPolicy: ClusterFirst
imagePullSecrets:
- name: qcloudregistrykey
- name: tencenthubkey
restartPolicy: Always
volumes:
- configMap:
defaultMode: 420
name: php-wp-config
name: wp-config
---
apiVersion: v1
kind: Service
metadata:
name: wordpress-php
namespace: lnmp
spec:
ports:
- name: tcp-9000-9000
port: 9000
protocol: TCP
targetPort: 9000
selector:
k8s-app: wordpress-php
qcloud-app: wordpress-php
type: ClusterIP