apiVersion: apps/v1
kind: Deployment
metadata:
name: igirl
namespace: chaolai
labels:
app: igirl
spec:
replicas: 1
selector:
matchLabels:
app: igirl
template:
metadata:
labels:
app: igirl
spec:
restartPolicy: Always
containers:
- name: igirl
image: registry.cn-beijing.aliyuncs.com/hantang/igirl:1.0.2
imagePullPolicy: IfNotPresent
ports:
- containerPort: 80
env:
- name: TZ
value: Asia/Shanghai
- name: LANG
value: zh_CN.UTF-8
- name: APP_ENV
valueFrom:
configMapKeyRef:
name: zhichan-config
key: APP_ENV
- name: DB_HOST
valueFrom:
configMapKeyRef:
name: zhichan-config
key: DB_HOST
- name: DB_PORT
valueFrom:
configMapKeyRef:
name: zhichan-config
key: DB_PORT
- name: DB_PWD
valueFrom:
configMapKeyRef:
name: zhichan-config
key: DB_PWD
- name: DB_USER
valueFrom:
configMapKeyRef:
name: zhichan-config
key: DB_USER
- name: IGIRL_DB_NAME
valueFrom:
configMapKeyRef:
name: zhichan-config
key: IGIRL_DB_NAME
- name: IGIRL_REDIS_DB
valueFrom:
configMapKeyRef:
name: zhichan-config
key: IGIRL_REDIS_DB
- name: REDIS_HOST
valueFrom:
configMapKeyRef:
name: zhichan-config
key: REDIS_HOST
- name: REDIS_PORT
valueFrom:
configMapKeyRef:
name: zhichan-config
key: REDIS_PORT
- name: REDIS_PWD
valueFrom:
configMapKeyRef:
name: zhichan-config
key: REDIS_PWD
- name: NODE_PORT
valueFrom:
configMapKeyRef:
name: zhichan-config
key: NODE_PORT
---
kind: Service
apiVersion: v1
metadata:
labels:
app: igirl-service
name: igirl-service
namespace: chaolai
spec:
type: NodePort
ports:
- port: 80
targetPort: 80
nodePort: 19100
selector:
app: igirl