--- apiVersion: v1 kind: Service metadata: name: adm-comp labels: app: adm-comp spec: selector: app: adm-comp ports: - port: 80 targetPort: 80 name: server-port --- apiVersion: apps/v1 kind: Deployment metadata: name: adm-comp spec: replicas: 1 selector: matchLabels: app: adm-comp template: metadata: labels: app: adm-comp spec: containers: - name: adm-comp image: labisenlin.persagy.com/library/adm_comp:latest imagePullPolicy: Always ports: - containerPort: 80 name: server-port resources: limits: memory: 1Gi requests: memory: 512Mi env: - name: TZ value: Asia/Shanghai - name: SERVER_PORT value: "80" volumeMounts: - name: config mountPath: /etc/nginx/nginx.conf subPath: path/to/nginx.conf.js volumes: - name: config configMap: name: public-config defaultMode: 0777 items: - key: nginx.conf path: path/to/nginx.conf.js