kubernetes/worker/mayday.yaml

82 lines
1.2 KiB
YAML
Raw Normal View History

2023-03-31 10:26:19 +08:00
apiVersion: v1
kind: Namespace
metadata:
name: mayday
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: mysql
namespace: mayday
labels:
app: mysql
spec:
replicas: 1
selector:
matchLabels:
app: mysql
template:
metadata:
labels:
app: mysql
spec:
containers:
- name: mysql
image: 10.36.174.164/xingdian/mysql:v1
ports:
- containerPort: 3306
---
apiVersion: v1
kind: Service
metadata:
namespace: mayday
name: mysql
spec:
selector:
app: mysql
type: NodePort
ports:
- port: 3306
targetPort: 3306
nodePort: 30050
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: mayday-xingdian
namespace: mayday
labels:
app: mayday
spec:
replicas: 1
selector:
matchLabels:
app: mayday
template:
metadata:
labels:
app: mayday
spec:
containers:
- name: mayday
image: 10.36.174.164/xingdian/mayday:v1
ports:
- containerPort: 8091
---
apiVersion: v1
kind: Service
metadata:
name: mayday
namespace: mayday
spec:
selector:
app: mayday
type: NodePort
ports:
- port: 8091
targetPort: 8091
nodePort: 30051