Files
todo-backend/k8s/deployment.yaml

36 lines
607 B
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: todo-backend
namespace: drone
labels:
app: todo-backend
spec:
replicas: 1
selector:
matchLabels:
app: todo-backend
template:
metadata:
labels:
app: todo-backend
spec:
containers:
- name: todo-backend
image: ccr.ccs.tencentyun.com/violin/todo-backend:latest
ports:
- containerPort: 8080
---
apiVersion: v1
kind: Service
metadata:
name: todo-backend
namespace: drone
spec:
selector:
app: todo-backend
ports:
- port: 80
targetPort: 8080
type: ClusterIP