37 lines
640 B
YAML
37 lines
640 B
YAML
|
apiVersion: apps/v1
|
||
|
kind: Deployment
|
||
|
metadata:
|
||
|
name: gin-web
|
||
|
spec:
|
||
|
replicas: 1
|
||
|
selector:
|
||
|
matchLabels:
|
||
|
app: gin-web
|
||
|
template:
|
||
|
metadata:
|
||
|
labels:
|
||
|
app: gin-web
|
||
|
annotations:
|
||
|
prometheus.io/scrape: "true"
|
||
|
prometheus.io/port: "3000"
|
||
|
prometheus.io/path: "/metrics"
|
||
|
spec:
|
||
|
containers:
|
||
|
- name: app
|
||
|
image: ccr.ccs.tencentyun.com/abcdh/tools:test-gin
|
||
|
ports:
|
||
|
- containerPort: 3000
|
||
|
---
|
||
|
apiVersion: v1
|
||
|
kind: Service
|
||
|
metadata:
|
||
|
name: gin-web-svc
|
||
|
spec:
|
||
|
selector:
|
||
|
app: gin-web
|
||
|
ports:
|
||
|
- protocol: TCP
|
||
|
port: 3000
|
||
|
targetPort: 3000
|
||
|
|