From 3e7f96f403570036e5ace1fafcfeaec420ac40c1 Mon Sep 17 00:00:00 2001 From: ajaxfan <909938737@qq.com> Date: Sat, 16 Jan 2021 11:37:33 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BA=86=E6=9E=84=E5=BB=BA?= =?UTF-8?q?=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config-dev | 17 ++++++++++++++++ frontend-dev.yaml | 50 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 67 insertions(+) create mode 100644 config-dev create mode 100644 frontend-dev.yaml diff --git a/config-dev b/config-dev new file mode 100644 index 0000000..6fe3b43 --- /dev/null +++ b/config-dev @@ -0,0 +1,17 @@ +apiVersion: v1 +clusters: +- cluster: + insecure-skip-tls-verify: true + server: https://10.125.164.35:48662 + name: demok8s +contexts: +- context: + cluster: demok8s + user: cluster-admin + name: default +current-context: default +kind: Config +users: +- name: cluster-admin + user: + token: df5e4896a4f6d1b1447b2584ca7405f7 diff --git a/frontend-dev.yaml b/frontend-dev.yaml new file mode 100644 index 0000000..fb34657 --- /dev/null +++ b/frontend-dev.yaml @@ -0,0 +1,50 @@ +# 接口版本 +apiVersion: apps/v1 +# 接口类型 +kind: Deployment +metadata: + name: fe-service-ebtp-frontend + namespace: default + labels: + app: fe-service-ebtp-frontend +# 必选,详细定义 +spec: + # pod 副本数量 + replicas: 1 + # 选择器,匹配pod模板 + selector: + matchLabels: + app: fe-service-ebtp-frontend + template: + metadata: + labels: + # 模板名称 + app: fe-service-ebtp-frontend + # 定义容器模板,该模板可以包含多个容器 + spec: + # 必选,Pod中容器列表 + containers: + - name: jl-example + image: harbor.dcos.guangzhou.unicom.local/eshop/fe-service-ebtp-frontend:latest + # 需要暴露的端口库号列表 + ports: + - containerPort: 18022 + +--- +kind: Service +apiVersion: v1 +metadata: + name: fe-service-ebtp-frontend + namespace: default + labels: + app: fe-service-ebtp-frontend + annotations: + lb.cke.tg.unicom/target-vports: 18022-18022 +spec: + ports: + - port: 18022 + targetPort: 18022 + selector: + app: fe-service-ebtp-frontend +status: + loadBalancer: {} \ No newline at end of file