parent
0abc964586
commit
cfad22a120
@ -1,31 +0,0 @@
|
|||||||
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
|
|
@ -1,15 +0,0 @@
|
|||||||
apiVersion: v1
|
|
||||||
kind: Service
|
|
||||||
metadata:
|
|
||||||
name: openresty-service
|
|
||||||
spec:
|
|
||||||
selector:
|
|
||||||
app: openresty
|
|
||||||
ports:
|
|
||||||
- name: http
|
|
||||||
port: 80
|
|
||||||
targetPort: 80
|
|
||||||
- name: https
|
|
||||||
port: 443
|
|
||||||
targetPort: 443
|
|
||||||
type: LoadBalancer # 或者 NodePort
|
|
@ -1,5 +0,0 @@
|
|||||||
# Deployment
|
|
||||||
kubectl apply -f deployment.yaml
|
|
||||||
|
|
||||||
#Export Service
|
|
||||||
kubectl apply -f service.yaml
|
|
Loading…
Reference in new issue