From 2196168d6d14d0acd36d42fc37c248ff9a2312ba Mon Sep 17 00:00:00 2001 From: mayiming <1627832236@qq.com> Date: Tue, 16 Sep 2025 01:19:13 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E7=94=A8=E6=88=B7deployment?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docker/userService/userServer.yaml | 13 +++++++++++++ docker/userService/userService.yaml | 26 ++++++++++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 docker/userService/userServer.yaml create mode 100644 docker/userService/userService.yaml diff --git a/docker/userService/userServer.yaml b/docker/userService/userServer.yaml new file mode 100644 index 0000000..8663bd1 --- /dev/null +++ b/docker/userService/userServer.yaml @@ -0,0 +1,13 @@ +apiVersion: v1 +kind: Service +metadata: + name: title +spec: + selector: + app: title + ports: + - protocol: TCP + port: 80 + targetPort: 8080 + type: NodePort + \ No newline at end of file diff --git a/docker/userService/userService.yaml b/docker/userService/userService.yaml new file mode 100644 index 0000000..c82ec93 --- /dev/null +++ b/docker/userService/userService.yaml @@ -0,0 +1,26 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: title + labels: + app: title +spec: + replicas: 1 + selector: + matchLabels: + app: title + template: + metadata: + name: title + labels: + app: title + spec: + containers: + - name: title + image: nginx + imagePullPolicy: IfNotPresent + ports: + - containerPort: 80 + protocol: TCP + restartPolicy: Always + \ No newline at end of file