添加k8s文件

This commit is contained in:
2023-08-08 21:00:25 +08:00
parent 84660dd8c9
commit f269d012b3
3 changed files with 40 additions and 0 deletions

12
k8s/base/api-svr.yaml Normal file
View File

@@ -0,0 +1,12 @@
apiVersion: v1
kind: Service
metadata:
name: coal-api
spec:
selector:
app: coal-api
ports:
- protocol: TCP
port: 7456
targetPort: 7456
type: ClusterIP

24
k8s/base/api.yaml Normal file
View File

@@ -0,0 +1,24 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: coal-api
labels:
app: coal-api
spec:
replicas: 1
selector:
matchLabels:
app: coal-api
template:
metadata:
name: coal-api
labels:
app: coal-api
spec:
containers:
- name: coal-api
image: coal
imagePullPolicy: Always
ports:
- containerPort: 7456
restartPolicy: Always

4
k8s/base/ns.yaml Normal file
View File

@@ -0,0 +1,4 @@
apiVersion: v1
kind: Namespace
metadata:
name: coal