From 2bd686cfe73fc3e0fac3e8704fa0bdff201df246 Mon Sep 17 00:00:00 2001 From: liaozan <378024053@qq.com> Date: Thu, 10 Mar 2022 22:47:15 +0800 Subject: [PATCH] add k8s-service-template.yml --- k8s-deploy-template.yaml | 2 +- k8s-service-template.yaml | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 k8s-service-template.yaml diff --git a/k8s-deploy-template.yaml b/k8s-deploy-template.yaml index ff86d9a..1bce46c 100644 --- a/k8s-deploy-template.yaml +++ b/k8s-deploy-template.yaml @@ -36,4 +36,4 @@ spec: initialDelaySeconds: 30 periodSeconds: 10 imagePullSecrets: - - name: kp-schbrain + - name: kp-schbrain \ No newline at end of file diff --git a/k8s-service-template.yaml b/k8s-service-template.yaml new file mode 100644 index 0000000..17d0e59 --- /dev/null +++ b/k8s-service-template.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: Service +metadata: + name: ${SERVICE_NAME} + namespace: ${NAMESPACE} + labels: + app: ${SERVICE_NAME} +spec: + type: ClusterIP + ports: + - port: ${SERVICE_PORT} + targetPort: ${SERVICE_PORT} + selector: + app: ${APP_NAME} \ No newline at end of file -- GitLab