From 2c7499193337db68a69ad898b8645525a38b14c7 Mon Sep 17 00:00:00 2001 From: fei Date: Wed, 21 Jan 2026 09:40:54 +0000 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20deployment.yaml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- deployment.yaml | 35 ++++++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/deployment.yaml b/deployment.yaml index 4287ca8..4510857 100644 --- a/deployment.yaml +++ b/deployment.yaml @@ -1 +1,34 @@ -# \ No newline at end of file +apiVersion: apps/v1 +kind: Deployment +metadata: + name: nginx-test + labels: + app: nginx +spec: + replicas: 1 + selector: + matchLabels: + app: nginx + template: + metadata: + labels: + app: nginx + spec: + containers: + - name: nginx + image: nginx:stable-alpine + ports: + - containerPort: 80 +--- +apiVersion: v1 +kind: Service +metadata: + name: nginx-service +spec: + selector: + app: nginx + ports: + - protocol: TCP + port: 80 + targetPort: 80 + type: ClusterIP \ No newline at end of file