feat: 初始化零工后端代码
This commit is contained in:
61
gig-poc/infrastructure/k8s/web.yaml
Normal file
61
gig-poc/infrastructure/k8s/web.yaml
Normal file
@@ -0,0 +1,61 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: gig-poc-web
|
||||
namespace: gig-poc
|
||||
spec:
|
||||
replicas: 2
|
||||
selector:
|
||||
matchLabels:
|
||||
app: gig-poc-web
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: gig-poc-web
|
||||
spec:
|
||||
containers:
|
||||
- name: web
|
||||
image: gig-poc-web:latest
|
||||
imagePullPolicy: IfNotPresent
|
||||
ports:
|
||||
- containerPort: 80
|
||||
resources:
|
||||
requests:
|
||||
cpu: "200m"
|
||||
memory: "256Mi"
|
||||
limits:
|
||||
cpu: "1"
|
||||
memory: "1Gi"
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: gig-poc-web
|
||||
namespace: gig-poc
|
||||
spec:
|
||||
selector:
|
||||
app: gig-poc-web
|
||||
ports:
|
||||
- name: http
|
||||
port: 80
|
||||
targetPort: 80
|
||||
---
|
||||
apiVersion: autoscaling/v2
|
||||
kind: HorizontalPodAutoscaler
|
||||
metadata:
|
||||
name: gig-poc-web-hpa
|
||||
namespace: gig-poc
|
||||
spec:
|
||||
scaleTargetRef:
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
name: gig-poc-web
|
||||
minReplicas: 2
|
||||
maxReplicas: 10
|
||||
metrics:
|
||||
- type: Resource
|
||||
resource:
|
||||
name: cpu
|
||||
target:
|
||||
type: Utilization
|
||||
averageUtilization: 70
|
||||
Reference in New Issue
Block a user