apiVersion: apps/v1
kind: Deployment
metadata:
creationTimestamp: null
labels:
app: 所属app
name: deploy名称
namespace: 命名空间
spec:
replicas: 1
selector:
matchLabels:
podn: 对应pod名称
strategy: {}
template:
metadata:
creationTimestamp: null
labels:
podn: 对应pod名称
spec:
containers:
- image: 镜像地址
imagePullPolicy: Always
name: 容器名称
resources: {}
env:
- name: "环境变量名称"
value: "环境变量值"
volumeMounts:
- name: 挂载卷,对应下面的卷名称
mountPath: 挂载目录
volumes:
- name: 卷名称
configMap:
name: 对应cm名称
status: {}
---
apiVersion: v1
kind: Service
metadata:
creationTimestamp: null
labels:
app: 所属app名称
name: svc名称
namespace: 命名空间
spec:
ports:
- port: 8081
protocol: TCP
targetPort: 8081
nodePort: 30117
selector:
podn: 映射pod名称
type: NodePort
status:
loadBalancer: {}
---
apiVersion: v1
kind: ConfigMap
metadata:
name: cm名称
namespace: 命名空间
data:
config.json: |-
sideMenu.json: |-