apiVersion: apps/v1
kind: Deployment
metadata:
namespace: ${APP_NAMESPACE}
labels:
version: v1
app: ${APP_NAME}
app.kubernetes.io/version: v1
app.kubernetes.io/name: ${APP_NAME}
name: ${APP_NAME}-v1
annotations:
servicemesh.kubesphere.io/enabled: 'true'
spec:
replicas: ${REPLICAS}
selector:
matchLabels:
version: v1
app: ${APP_NAME}
app.kubernetes.io/version: v1
app.kubernetes.io/name: ${APP_NAME}
template:
metadata:
labels:
version: v1
app: ${APP_NAME}
app.kubernetes.io/version: v1
app.kubernetes.io/name: ${APP_NAME}
annotations:
sidecar.istio.io/inject: 'true'
spec:
containers:
- name: ${APP_NAME}
imagePullPolicy: Always
image: ${IMAGE}
ports:
- name: grpc-${PORTS_NAME}
protocol: TCP
containerPort: ${APP_CONTAINER_PORT}
env:
- name: ASPNETCORE_ENVIRONMENT
value: ${ASPNETCORE_ENVIRONMENT}
serviceAccount: default
affinity: {}
initContainers: []
volumes: []
imagePullSecrets:
- name: docker-aliyun-id
strategy:
type: RollingUpdate
rollingUpdate:
maxUnavailable: 25%
maxSurge: 25%
---
apiVersion: v1
kind: Service
metadata:
namespace: ${APP_NAMESPACE}
labels:
version: v1
app: ${APP_NAME}
app.kubernetes.io/version: v1
app.kubernetes.io/name: ${APP_NAME}
annotations:
kubesphere.io/serviceType: statelessservice
servicemesh.kubesphere.io/enabled: 'true'
name: ${APP_NAME}
spec:
sessionAffinity: None
selector:
app: ${APP_NAME}
app.kubernetes.io/version: v1
app.kubernetes.io/name: ${APP_NAME}
ports:
- name: grpc-${PORTS_NAME}
protocol: TCP
port: ${APP_CONTAINER_PORT}
targetPort: ${APP_CONTAINER_PORT}
- name: tcp-${PORTS_NAME}
protocol: TCP
port: 9091
targetPort: 9091
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。
扫码关注腾讯云开发者
领取腾讯云代金券
Copyright © 2013 - 2025 Tencent Cloud. All Rights Reserved. 腾讯云 版权所有
深圳市腾讯计算机系统有限公司 ICP备案/许可证号:粤B2-20090059 深公网安备号 44030502008569
腾讯云计算(北京)有限责任公司 京ICP证150476号 | 京ICP备11018762号 | 京公网安备号11010802020287
Copyright © 2013 - 2025 Tencent Cloud.
All Rights Reserved. 腾讯云 版权所有