提交 37b496c9 作者: 余乾开

feat(Kustomization):补充Image

上级 13dfec99
apiVersion: apps/v1
kind: Deployment
metadata:
name: pms-deployment
namespace: default
spec:
replicas: 1
selector:
matchLabels:
app: pms
template:
metadata:
labels:
app: pms
spec:
containers:
- name: pms
image: registry.cn-shanghai.aliyuncs.com/public-namespace/myapp:v1
resources:
limits:
memory: 256Mi
cpu: 100m
ports:
- containerPort: 80
# env:
# - name: SPRING_PROFILES_ACTIVE
# valueFrom:
# configMapKeyRef:
# name: pms-map
# key: SPRING_PROFILES_ACTIVE
\ No newline at end of file
apiVersion: v1
kind: Service
metadata:
name: pms-svc
namespace: default
spec:
selector:
app: pms
type: NodePort #NodePort LoadBalancer需要k8s服务商提供支持
ports:
- protocol: TCP
port: 80
targetPort: 80
nodePort: 30080 #如果不指定,将随机使用30000~32767内的一个端口
\ No newline at end of file
...@@ -3,4 +3,8 @@ kind: Deployment ...@@ -3,4 +3,8 @@ kind: Deployment
metadata: metadata:
name: pms-deployment name: pms-deployment
spec: spec:
replicas: 1 template:
\ No newline at end of file spec:
containers:
- name: pms
image: REGISTRY/NAMESPACE/IMAGE:TAG
\ No newline at end of file
...@@ -3,4 +3,9 @@ kind: Deployment ...@@ -3,4 +3,9 @@ kind: Deployment
metadata: metadata:
name: pms-deployment name: pms-deployment
spec: spec:
replicas: 1 replicas: 1
\ No newline at end of file template:
spec:
containers:
- name: pms
image: REGISTRY/NAMESPACE/IMAGE:TAG
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论