diff --git a/document/k8s/mall-admin-deployment.yaml b/document/k8s/mall-admin-deployment.yaml new file mode 100644 index 0000000..78f459a --- /dev/null +++ b/document/k8s/mall-admin-deployment.yaml @@ -0,0 +1,43 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: mall-admin-deployment + namespace: default + labels: + app: mall-admin +spec: + replicas: 1 + selector: + matchLabels: + app: mall-admin + template: + metadata: + labels: + app: mall-admin + spec: + containers: + - name: mall-admin + # 指定Docker Hub中的镜像地址 + image: macrodocker/mall-admin:1.0-SNAPSHOT + ports: + - containerPort: 8080 + env: + # 指定环境 + - name: spring.profiles.active + value: prod + # 指定时区 + - name: TZ + value: Asia/Shanghai + # 指定Nacos地址 + - name: spring.cloud.nacos.discovery.server-addr + value: http://192.168.3.101:8848 + - name: spring.cloud.nacos.config.server-addr + value: http://192.168.3.101:8848 + volumeMounts: + - mountPath: /var/logs + name: log-volume + volumes: + - name: log-volume + hostPath: + path: /mydata/app/mall-admin/logs + type: DirectoryOrCreate \ No newline at end of file diff --git a/document/k8s/mall-admin-service.yaml b/document/k8s/mall-admin-service.yaml new file mode 100644 index 0000000..911a280 --- /dev/null +++ b/document/k8s/mall-admin-service.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: Service +metadata: + name: mall-admin-service + namespace: default +spec: + type: ClusterIP + selector: + app: mall-admin + ports: + - name: http + protocol: TCP + port: 8080 + targetPort: 8080 \ No newline at end of file diff --git a/document/k8s/mall-auth-deployment.yaml b/document/k8s/mall-auth-deployment.yaml new file mode 100644 index 0000000..b8e07a5 --- /dev/null +++ b/document/k8s/mall-auth-deployment.yaml @@ -0,0 +1,43 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: mall-auth-deployment + namespace: default + labels: + app: mall-auth +spec: + replicas: 1 + selector: + matchLabels: + app: mall-auth + template: + metadata: + labels: + app: mall-auth + spec: + containers: + - name: mall-auth + # 指定Docker Hub中的镜像地址 + image: macrodocker/mall-auth:1.0-SNAPSHOT + ports: + - containerPort: 8401 + env: + # 指定环境 + - name: spring.profiles.active + value: prod + # 指定时区 + - name: TZ + value: Asia/Shanghai + # 指定Nacos地址 + - name: spring.cloud.nacos.discovery.server-addr + value: http://192.168.3.101:8848 + - name: spring.cloud.nacos.config.server-addr + value: http://192.168.3.101:8848 + volumeMounts: + - mountPath: /var/logs + name: log-volume + volumes: + - name: log-volume + hostPath: + path: /mydata/app/mall-auth/logs + type: DirectoryOrCreate \ No newline at end of file diff --git a/document/k8s/mall-auth-service.yaml b/document/k8s/mall-auth-service.yaml new file mode 100644 index 0000000..5a5ae88 --- /dev/null +++ b/document/k8s/mall-auth-service.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: Service +metadata: + name: mall-auth-service + namespace: default +spec: + type: ClusterIP + selector: + app: mall-auth + ports: + - name: http + protocol: TCP + port: 8401 + targetPort: 8401 \ No newline at end of file diff --git a/document/k8s/mall-gateway-deployment.yaml b/document/k8s/mall-gateway-deployment.yaml new file mode 100644 index 0000000..f3adc55 --- /dev/null +++ b/document/k8s/mall-gateway-deployment.yaml @@ -0,0 +1,43 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: mall-gateway-deployment + namespace: default + labels: + app: mall-gateway +spec: + replicas: 1 + selector: + matchLabels: + app: mall-gateway + template: + metadata: + labels: + app: mall-gateway + spec: + containers: + - name: mall-gateway + # 指定Docker Hub中的镜像地址 + image: macrodocker/mall-gateway:1.0-SNAPSHOT + ports: + - containerPort: 8201 + env: + # 指定环境 + - name: spring.profiles.active + value: prod + # 指定时区 + - name: TZ + value: Asia/Shanghai + # 指定Nacos地址 + - name: spring.cloud.nacos.discovery.server-addr + value: http://192.168.3.101:8848 + - name: spring.cloud.nacos.config.server-addr + value: http://192.168.3.101:8848 + volumeMounts: + - mountPath: /var/logs + name: log-volume + volumes: + - name: log-volume + hostPath: + path: /mydata/app/mall-gateway/logs + type: DirectoryOrCreate \ No newline at end of file diff --git a/document/k8s/mall-gateway-service.yaml b/document/k8s/mall-gateway-service.yaml new file mode 100644 index 0000000..85b50c5 --- /dev/null +++ b/document/k8s/mall-gateway-service.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Service +metadata: + name: mall-gateway-service + namespace: default +spec: + type: NodePort + selector: + app: mall-gateway + ports: + - name: http + protocol: TCP + port: 8201 + targetPort: 8201 + nodePort: 30201 \ No newline at end of file diff --git a/document/k8s/mall-monitor-deployment.yaml b/document/k8s/mall-monitor-deployment.yaml new file mode 100644 index 0000000..0b1bb3a --- /dev/null +++ b/document/k8s/mall-monitor-deployment.yaml @@ -0,0 +1,43 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: mall-monitor-deployment + namespace: default + labels: + app: mall-monitor +spec: + replicas: 1 + selector: + matchLabels: + app: mall-monitor + template: + metadata: + labels: + app: mall-monitor + spec: + containers: + - name: mall-monitor + # 指定Docker Hub中的镜像地址 + image: macrodocker/mall-monitor:1.0-SNAPSHOT + ports: + - containerPort: 8101 + env: + # 指定环境 + - name: spring.profiles.active + value: prod + # 指定时区 + - name: TZ + value: Asia/Shanghai + # 指定Nacos地址 + - name: spring.cloud.nacos.discovery.server-addr + value: http://192.168.3.101:8848 + - name: spring.cloud.nacos.config.server-addr + value: http://192.168.3.101:8848 + volumeMounts: + - mountPath: /var/logs + name: log-volume + volumes: + - name: log-volume + hostPath: + path: /mydata/app/mall-monitor/logs + type: DirectoryOrCreate \ No newline at end of file diff --git a/document/k8s/mall-monitor-service.yaml b/document/k8s/mall-monitor-service.yaml new file mode 100644 index 0000000..73d7ce0 --- /dev/null +++ b/document/k8s/mall-monitor-service.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: Service +metadata: + name: mall-monitor-service + namespace: default +spec: + type: ClusterIP + selector: + app: mall-monitor + ports: + - name: http + protocol: TCP + port: 8101 + targetPort: 8101 \ No newline at end of file diff --git a/document/k8s/mall-portal-deployment.yaml b/document/k8s/mall-portal-deployment.yaml new file mode 100644 index 0000000..1b26f7c --- /dev/null +++ b/document/k8s/mall-portal-deployment.yaml @@ -0,0 +1,43 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: mall-portal-deployment + namespace: default + labels: + app: mall-portal +spec: + replicas: 1 + selector: + matchLabels: + app: mall-portal + template: + metadata: + labels: + app: mall-portal + spec: + containers: + - name: mall-portal + # 指定Docker Hub中的镜像地址 + image: macrodocker/mall-portal:1.0-SNAPSHOT + ports: + - containerPort: 8085 + env: + # 指定环境 + - name: spring.profiles.active + value: prod + # 指定时区 + - name: TZ + value: Asia/Shanghai + # 指定Nacos地址 + - name: spring.cloud.nacos.discovery.server-addr + value: http://192.168.3.101:8848 + - name: spring.cloud.nacos.config.server-addr + value: http://192.168.3.101:8848 + volumeMounts: + - mountPath: /var/logs + name: log-volume + volumes: + - name: log-volume + hostPath: + path: /mydata/app/mall-portal/logs + type: DirectoryOrCreate \ No newline at end of file diff --git a/document/k8s/mall-portal-service.yaml b/document/k8s/mall-portal-service.yaml new file mode 100644 index 0000000..7b27258 --- /dev/null +++ b/document/k8s/mall-portal-service.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: Service +metadata: + name: mall-portal-service + namespace: default +spec: + type: ClusterIP + selector: + app: mall-portal + ports: + - name: http + protocol: TCP + port: 8085 + targetPort: 8085 \ No newline at end of file diff --git a/document/k8s/mall-search-deployment.yaml b/document/k8s/mall-search-deployment.yaml new file mode 100644 index 0000000..6ace3b3 --- /dev/null +++ b/document/k8s/mall-search-deployment.yaml @@ -0,0 +1,43 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: mall-search-deployment + namespace: default + labels: + app: mall-search +spec: + replicas: 1 + selector: + matchLabels: + app: mall-search + template: + metadata: + labels: + app: mall-search + spec: + containers: + - name: mall-search + # 指定Docker Hub中的镜像地址 + image: macrodocker/mall-search:1.0-SNAPSHOT + ports: + - containerPort: 8081 + env: + # 指定环境 + - name: spring.profiles.active + value: prod + # 指定时区 + - name: TZ + value: Asia/Shanghai + # 指定Nacos地址 + - name: spring.cloud.nacos.discovery.server-addr + value: http://192.168.3.101:8848 + - name: spring.cloud.nacos.config.server-addr + value: http://192.168.3.101:8848 + volumeMounts: + - mountPath: /var/logs + name: log-volume + volumes: + - name: log-volume + hostPath: + path: /mydata/app/mall-search/logs + type: DirectoryOrCreate \ No newline at end of file diff --git a/document/k8s/mall-search-service.yaml b/document/k8s/mall-search-service.yaml new file mode 100644 index 0000000..d57d3ef --- /dev/null +++ b/document/k8s/mall-search-service.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: Service +metadata: + name: mall-search-service + namespace: default +spec: + type: ClusterIP + selector: + app: mall-search + ports: + - name: http + protocol: TCP + port: 8081 + targetPort: 8081 \ No newline at end of file