提交 9402de74 作者: 余乾开

feat(Kustomziation):nodeport service

上级 d48bb6dd
apiVersion: apps/v1
kind: Deployment
metadata:
name: pms-deployment
namespace: dev
spec:
replicas: 1
selector:
matchLabels:
app: pms
template:
metadata:
labels:
app: pms
spec:
containers:
- name: pms
image: "mmc-registry.cn-shenzhen.cr.aliyuncs.com/sharefly/pms:39ee3869863ba60a609e4f78f71595e1916ecb13"
resources:
limits:
memory: 1024Mi
cpu: 100m
ports:
- containerPort: 8099
env:
- name: SPRING_PROFILES_ACTIVE
value: dev
# valueFrom:
# configMapKeyRef:
# name: pms-map
# key: SPRING_PROFILES_ACTIVE
---
apiVersion: v1
kind: Service
metadata:
name: pms-svc
namespace: dev
spec:
selector:
app: pms
type: NodePort #NodePort LoadBalancer需要k8s服务商提供支持
ports:
- protocol: TCP
port: 8099
targetPort: 8099
nodePort: 30099 #如果不指定,将随机使用30000~32767内的一个端口
\ No newline at end of file
apiVersion: apps/v1
kind: Deployment
metadata:
name: pms-deployment
spec:
template:
spec:
containers:
- name: pms
image: REGISTRY/NAMESPACE/IMAGE:TAG
\ No newline at end of file
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ../../base
namePrefix: dev-
- ../../base
#namePrefix: dev-
namespace: dev
commonLabels:
variant: dev
commonAnnotations:
note: This is dev!
patchesStrategicMerge:
- configMap.yaml
- deployment.yaml
- configMap.yaml
- deployment.yaml
- service.yaml
images:
- name: REGISTRY/NAMESPACE/IMAGE:TAG
newName: mmc-registry.cn-shenzhen.cr.aliyuncs.com/sharefly/pms
newTag: cb46fe6e6230b6298a1d16b90fcc46dd6717174d
- name: REGISTRY/NAMESPACE/IMAGE:TAG
newName: mmc-registry.cn-shenzhen.cr.aliyuncs.com/sharefly/pms
newTag: cb46fe6e6230b6298a1d16b90fcc46dd6717174d
apiVersion: apps/v1
kind: Deployment
metadata:
name: pms-deployment
spec:
replicas: 1
template:
spec:
containers:
- name: pms
image: REGISTRY/NAMESPACE/IMAGE:TAG
\ No newline at end of file
......@@ -3,7 +3,7 @@ kind: Kustomization
resources:
- ../../base
namespace: prod
namePrefix: prod-
#namePrefix: prod-
commonLabels:
variant: prod
commonAnnotations:
......@@ -11,3 +11,4 @@ commonAnnotations:
patchesStrategicMerge:
- configMap.yaml
- deployment.yaml
- service.yaml
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论