1 Star 0 Fork 17

luzhijun/sprint-boot-demo

forked from cuiliang/spring-boot-demo 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
k8s.yaml 1.49 KB
一键复制 编辑 原始数据 按行查看 历史
cuiliang 提交于 2024-05-11 09:27 . 新增k8s部署pipeline
apiVersion: apps/v1
kind: Deployment
metadata:
name: demo
namespace: NAME_SPACE
labels:
app: demo
spec:
selector:
matchLabels:
app: demo
template:
metadata:
labels:
app: demo
spec:
containers:
- name: demo
image: IMAGE_NAME
resources:
requests:
cpu: 100m
memory: 100Mi
limits:
cpu: 500m
memory: 512Mi
livenessProbe:
httpGet:
path: /health
port: 8888
readinessProbe:
httpGet:
path: /health
port: 8888
ports:
- containerPort: 8888
name: demo
volumeMounts:
- name: localtime
mountPath: /etc/localtime
volumes:
- name: localtime
hostPath:
path: /usr/share/zoneinfo/Asia/Shanghai
restartPolicy: Always
---
apiVersion: v1
kind: Service
metadata:
name: demo
namespace: NAME_SPACE
spec:
selector:
app: demo
type: ClusterIP
sessionAffinity: None
sessionAffinityConfig:
clientIP:
timeoutSeconds: 10800
ports:
- name: demo
port: 8888
targetPort: 8888
---
apiVersion: traefik.containo.us/v1alpha1
kind: IngressRoute
metadata:
name: demo
namespace: NAME_SPACE
spec:
entryPoints:
- web
routes:
- match: Host(`DOMAIN_NAME`)
kind: Rule
services:
- name: demo
port: 8888
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Java
1
https://gitee.com/luzhijun2023/sprint_boot_demo.git
git@gitee.com:luzhijun2023/sprint_boot_demo.git
luzhijun2023
sprint_boot_demo
sprint-boot-demo
master

搜索帮助