From bfaa9f2df7d61bb7a8a575260f7af10130032e1a Mon Sep 17 00:00:00 2001 From: liangjiajie <466087152@qq.com> Date: Tue, 11 Jun 2024 15:42:37 +0800 Subject: [PATCH] =?UTF-8?q?k8s=20=E9=83=A8=E7=BD=B2yml=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pipeline.yml | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 pipeline.yml diff --git a/pipeline.yml b/pipeline.yml new file mode 100644 index 0000000..3265c3a --- /dev/null +++ b/pipeline.yml @@ -0,0 +1,60 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + namespace: test + name: pipeline + labels: + app: pipeline +spec: + replicas: 2 + selector: + matchLabels: + app: pipeline + template: + metadata: + labels: + app: pipeline + spec: + containers: + - name: pipeline + image: registry.cn-hangzhou.aliyuncs.com/night_yy_php/pipeline:v3.0.4 + imagePullPolicy: Always + ports: + - containerPort: 8080 + + +--- +apiVersion: v1 +kind: Service +metadata: + namespace: test + name: pipeline + labels: + app: pipeline +spec: + selector: + app: pipeline + ports: + - port: 8081 + targetPort: 8080 + type: NodePort + +--- +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + namespace: test + name: pipeline +spec: + ingressClassName: ingress + rules: + - host: pipeline.night.com + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: pipeline + port: + number: 8081