代码拉取完成,页面将自动刷新
# 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
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。