From 804ca70101c38a1032918ace532665f84e8c1c46 Mon Sep 17 00:00:00 2001 From: ducoterra Date: Mon, 20 Apr 2020 09:47:25 -0400 Subject: [PATCH] separate service --- custom/deploy.yaml | 27 +-------------------------- custom/rbac.yaml | 7 +++++++ custom/service.yaml | 17 +++++++++++++++++ 3 files changed, 25 insertions(+), 26 deletions(-) create mode 100644 custom/service.yaml diff --git a/custom/deploy.yaml b/custom/deploy.yaml index 90ca4ee..2deddc2 100644 --- a/custom/deploy.yaml +++ b/custom/deploy.yaml @@ -1,9 +1,3 @@ -apiVersion: v1 -kind: ServiceAccount -metadata: - name: traefik-custom-controller - ---- kind: Deployment apiVersion: apps/v1 metadata: @@ -37,23 +31,4 @@ spec: - name: web containerPort: 9080 - name: tcpep - containerPort: 9443 - ---- -apiVersion: v1 -kind: Service -metadata: - name: traefik -spec: - type: LoadBalancer - selector: - app: traefik - ports: - - protocol: TCP - port: 9080 - name: web - targetPort: 9080 - - protocol: TCP - port: 9443 - name: websecure - targetPort: 9443 \ No newline at end of file + containerPort: 9443 \ No newline at end of file diff --git a/custom/rbac.yaml b/custom/rbac.yaml index 337f1ff..90595c6 100644 --- a/custom/rbac.yaml +++ b/custom/rbac.yaml @@ -1,3 +1,10 @@ +apiVersion: v1 +kind: ServiceAccount +metadata: + name: traefik-custom-controller + +--- + kind: ClusterRole apiVersion: rbac.authorization.k8s.io/v1beta1 metadata: diff --git a/custom/service.yaml b/custom/service.yaml new file mode 100644 index 0000000..3add463 --- /dev/null +++ b/custom/service.yaml @@ -0,0 +1,17 @@ +apiVersion: v1 +kind: Service +metadata: + name: traefik +spec: + type: LoadBalancer + selector: + app: traefik + ports: + - protocol: TCP + port: 9080 + name: web + targetPort: 9080 + - protocol: TCP + port: 9443 + name: websecure + targetPort: 9443 \ No newline at end of file