From 70f55ef9874bce65daee813677c9d076a3010737 Mon Sep 17 00:00:00 2001 From: bamanker Date: Thu, 23 Nov 2023 14:54:22 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E4=BA=86k8s=20devops?= =?UTF-8?q?=E7=9A=84=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- deploy.yaml | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/deploy.yaml b/deploy.yaml index 3afb06b..599f0cc 100644 --- a/deploy.yaml +++ b/deploy.yaml @@ -2,16 +2,15 @@ apiVersion: apps/v1 kind: Deployment metadata: labels: - app: $APP_NAME - version: $TAG - name: $APP_NAME - namespace: my-proj #一定要写名称空间 + app: dailylove + name: dailylove + namespace: dl #一定要写名称空间 spec: progressDeadlineSeconds: 600 replicas: 1 selector: matchLabels: - app: $APP_NAME + app: dailylove strategy: rollingUpdate: maxSurge: 50% @@ -20,8 +19,7 @@ spec: template: metadata: labels: - app: $APP_NAME - version: $TAG + app: dailylove spec: imagePullSecrets: - name: aliyun-docker-hub #提前在项目下配置访问阿里云的账号密码 @@ -53,9 +51,8 @@ apiVersion: v1 kind: Service metadata: labels: - app: $APP_NAME - version: $TAG - name: $APP_NAME + app: dailylove + name: dailylove namespace: my-proj spec: ports: @@ -64,14 +61,14 @@ spec: protocol: TCP targetPort: 13146 selector: - app: $APP_NAME + app: dailylove sessionAffinity: None type: ClusterIP --- apiVersion: v1 kind: ServiceAccount metadata: - name: $APP_NAME # ServiceAccount的名字 + name: dailylove # ServiceAccount的名字 namespace: my-proj # serviceaccount的namespace labels: - app: $APP_NAME #ServiceAccount的标签 + app: dailylove #ServiceAccount的标签