1 Star 0 Fork 0

braveyly/java-k8s-demo

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
YamlStatefulSet.yaml 969 Bytes
一键复制 编辑 原始数据 按行查看 历史
yiyi 提交于 2024-10-19 10:00 . init k8s-jenkins demo
# statefulSet yaml template
---
apiVersion: v1
kind: Service
metadata:
name: java-k8s-demo
namespace: test
labels:
app: java-k8s-demo
spec:
type: NodePort
ports:
- port: 8090
targetPort: 8090
nodePort: 31106
name: rest-http
selector:
app: java-k8s-demo
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: java-k8s-demo
namespace: test
spec:
serviceName: java-k8s-demo
replicas: 1
selector:
matchLabels:
app: java-k8s-demo
template:
metadata:
labels:
app: java-k8s-demo
spec:
imagePullSecrets:
- name: docker-login
containers:
- name: java-k8s-demo
image: 192.168.139.133:30002/test/java-k8s-demo-test_local_maven:0.0.1-SNAPSHOT
imagePullPolicy: Always
ports:
- containerPort: 8090
resources:
requests:
cpu: 100m
memory: 100Mi
podManagementPolicy: Parallel
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/braveyly/java-k8s-demo.git
git@gitee.com:braveyly/java-k8s-demo.git
braveyly
java-k8s-demo
java-k8s-demo
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385