Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
project-www-pc
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
project-www-pc
Commits
6af96528
提交
6af96528
authored
2月 03, 2026
作者:
王鹏飞
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
chore: 添加 Kubernetes 配置文件
上级
2ac4bab7
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
126 行增加
和
0 行删除
+126
-0
k8s.yml
k8s.yml
+126
-0
没有找到文件。
k8s.yml
0 → 100644
浏览文件 @
6af96528
# Deployment yaml 配置
apiVersion
:
apps/v1
kind
:
Deployment
metadata
:
namespace
:
${NAMESPACE}
name
:
${APPNAME}
labels
:
app
:
${APPNAME}
spec
:
progressDeadlineSeconds
:
600
replicas
:
1
revisionHistoryLimit
:
10
selector
:
matchLabels
:
app
:
${APPNAME}
strategy
:
rollingUpdate
:
maxSurge
:
25%
maxUnavailable
:
25%
type
:
RollingUpdate
template
:
metadata
:
labels
:
app
:
${APPNAME}
spec
:
nodeName
:
k8s-n-91
containers
:
-
command
:
-
./start.sh
env
:
-
name
:
TZ
value
:
Asia/Shanghai
-
name
:
timestamp
value
:
'
${TIMESTAMP}'
image
:
'
${IMAGE_VPC}'
imagePullPolicy
:
Always
name
:
${APPNAME}
ports
:
-
containerPort
:
2048
name
:
port01
protocol
:
TCP
resources
:
limits
:
cpu
:
300m
memory
:
512Mi
requests
:
cpu
:
300m
memory
:
512Mi
stdin
:
true
volumeMounts
:
-
name
:
storage
mountPath
:
"
/data2/logs/"
-
name
:
volume-localtime
mountPath
:
/etc/localtime
imagePullSecrets
:
-
name
:
kube-node-lease-login-2022-11-21
dnsPolicy
:
ClusterFirst
restartPolicy
:
Always
volumes
:
-
name
:
storage
persistentVolumeClaim
:
claimName
:
nas-com-web
-
name
:
volume-localtime
hostPath
:
path
:
/etc/localtime
type
:
'
'
# Service yaml 配置
---
apiVersion
:
v1
kind
:
Service
metadata
:
namespace
:
${NAMESPACE}
name
:
${APPNAME}-svc
spec
:
ports
:
-
name
:
port01
port
:
12048
protocol
:
TCP
targetPort
:
2048
selector
:
app
:
${APPNAME}
type
:
ClusterIP
# Ingress yaml 配置
---
apiVersion
:
networking.k8s.io/v1
kind
:
Ingress
metadata
:
namespace
:
${NAMESPACE}
name
:
${APPNAME}-ingress
annotations
:
nginx.ingress.kubernetes.io/service-weight
:
'
'
nginx.ingress.kubernetes.io/ssl-redirect
:
'
false'
# 指定 Ingress Controller 的类型
kubernetes.io/ingress.class
:
"
nginx"
spec
:
rules
:
-
host
:
${DOMAIN}.ezijing.com
http
:
paths
:
-
backend
:
service
:
name
:
${APPNAME}-svc
port
:
number
:
12048
path
:
/
pathType
:
ImplementationSpecific
-
host
:
${DOMAIN1}.ezijing.com
http
:
paths
:
-
backend
:
service
:
name
:
${APPNAME}-svc
port
:
number
:
12048
path
:
/
pathType
:
ImplementationSpecific
tls
:
-
hosts
:
-
${DOMAIN}.ezijing.com
secretName
:
kube-node-lease-ssl-2022-11-21
-
hosts
:
-
${DOMAIN1}.ezijing.com
secretName
:
kube-node-lease-ssl-2022-11-21
\ No newline at end of file
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论