更新 kubernetes部署
@@ -1,5 +1,78 @@
|
|||||||
Deployment.yaml
|
Deployment.yaml
|
||||||
|
|
||||||
```
|
```
|
||||||
aaa
|
# K8s Deployment - 由 ConfTemplate 生成
|
||||||
|
# 生成时间: 2026/8/7 14:37:00
|
||||||
|
# 部署命令: kubectl apply -f deployment.yaml
|
||||||
|
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: shell-gen
|
||||||
|
namespace: default
|
||||||
|
labels:
|
||||||
|
app: shell-gen
|
||||||
|
version: v1
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
revisionHistoryLimit: 10
|
||||||
|
progressDeadlineSeconds: 600
|
||||||
|
minReadySeconds: 0
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: shell-gen
|
||||||
|
strategy:
|
||||||
|
type: RollingUpdate
|
||||||
|
rollingUpdate:
|
||||||
|
maxSurge: 25%
|
||||||
|
maxUnavailable: 0
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: shell-gen
|
||||||
|
version: v1
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: shell-gen
|
||||||
|
image: "harbor.yunwei.blog/projects/shell-gen:0.0.1"
|
||||||
|
imagePullPolicy: IfNotPresent
|
||||||
|
ports:
|
||||||
|
- name: http
|
||||||
|
containerPort: 5099
|
||||||
|
protocol: TCP
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu: 100m
|
||||||
|
memory: 128Mi
|
||||||
|
limits:
|
||||||
|
cpu: 500m
|
||||||
|
memory: 256Mi
|
||||||
|
terminationGracePeriodSeconds: 30
|
||||||
|
```
|
||||||
|
shell-gen-service.yaml
|
||||||
|
|
||||||
|
```
|
||||||
|
# K8s Service - 由 ConfTemplate 生成
|
||||||
|
# 生成时间: 2026/8/7 14:42:29
|
||||||
|
# 部署命令: kubectl apply -f service.yaml
|
||||||
|
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: shell-gen
|
||||||
|
namespace: default
|
||||||
|
labels:
|
||||||
|
app: shell-gen
|
||||||
|
spec:
|
||||||
|
type: NodePort
|
||||||
|
selector:
|
||||||
|
app: shell-gen
|
||||||
|
ports:
|
||||||
|
- name: http
|
||||||
|
port: 80
|
||||||
|
targetPort: 5099
|
||||||
|
protocol: TCP
|
||||||
|
nodePort: 30088
|
||||||
|
externalTrafficPolicy: Cluster
|
||||||
|
|
||||||
```
|
```
|
||||||
Reference in New Issue
Block a user