You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
871 B
31 lines
871 B
10 months ago
|
apiVersion: apps/v1
|
||
|
kind: Deployment
|
||
|
metadata:
|
||
|
name: openresty-deployment
|
||
|
spec:
|
||
|
replicas: 2 # 根据需求设置副本数量
|
||
|
selector:
|
||
|
matchLabels:
|
||
|
app: openresty
|
||
|
template:
|
||
|
metadata:
|
||
|
labels:
|
||
|
app: openresty
|
||
|
spec:
|
||
|
containers:
|
||
|
- name: openresty
|
||
|
image: swr.cn-north-4.myhuaweicloud.com/ddn-k8s/docker.io/openresty/openresty:1.25.3.1-5-alpine-fat
|
||
|
ports:
|
||
|
- containerPort: 80
|
||
|
name: http
|
||
|
- containerPort: 443
|
||
|
name: https
|
||
|
volumeMounts:
|
||
|
- mountPath: /usr/local/openresty/nginx/conf/lua-scripts
|
||
|
name: lua-scripts-volume
|
||
|
command: ["/bin/bash", "-c"]
|
||
|
args: ["exec /usr/bin/openresty -g 'daemon off;'"]
|
||
|
volumes:
|
||
|
- name: lua-scripts-volume
|
||
|
configMap:
|
||
|
name: openresty-lua-configmap
|