From 1e0ac734f399ef7b14690327f963c069636d5a3c Mon Sep 17 00:00:00 2001 From: umeshravi0595 <107918224+umeshravi0595@users.noreply.github.com> Date: Mon, 8 May 2023 21:09:46 +0530 Subject: [PATCH 01/12] Create zull-api.yaml --- .../zuul-api-gateway/zull-api.yaml | 56 +++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 micro-service-starter/kubernetes_code/zuul-api-gateway/zull-api.yaml diff --git a/micro-service-starter/kubernetes_code/zuul-api-gateway/zull-api.yaml b/micro-service-starter/kubernetes_code/zuul-api-gateway/zull-api.yaml new file mode 100644 index 0000000..96ccc6a --- /dev/null +++ b/micro-service-starter/kubernetes_code/zuul-api-gateway/zull-api.yaml @@ -0,0 +1,56 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: zuul-api-gateway + namespace: ui-web-app + labels: + app: zuul-api-gateway +spec: + selector: + matchLabels: + app: zuul-api-gateway + replicas: 1 + strategy: + rollingUpdate: + maxSurge: 25% + maxUnavailable: 25% + type: RollingUpdate + template: + metadata: + labels: + app: zuul-api-gateway + spec: + containers: + - name: zuul-api-gateway + image: umeshron05/zuul-api:latest + imagePullPolicy: IfNotPresent + ports: + - containerPort: 9999 + name: zull-api + affinity: + podAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + labelSelector: + matchExpressions: + - key: app + operator: In + values: + - zuul-api-gateway + topologyKey: "kubernetes.io/hostname" + +--- + +apiVersion: v1 +kind: Service +metadata: + name: zuul-api-gateway + namespace: ui-web-app +spec: + selector: + app: zuul-api-gateway + type: NodePort + ports: + - name: zuul-api-gateway + port: 9999 + targetPort: 9999 + nodePort: 32470 From b5f8eef5ad86be2155547777c7bf9994d20b0660 Mon Sep 17 00:00:00 2001 From: umeshravi0595 <107918224+umeshravi0595@users.noreply.github.com> Date: Mon, 8 May 2023 21:13:58 +0530 Subject: [PATCH 02/12] Update zull-api.yaml --- .../zuul-api-gateway/zull-api.yaml | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/micro-service-starter/kubernetes_code/zuul-api-gateway/zull-api.yaml b/micro-service-starter/kubernetes_code/zuul-api-gateway/zull-api.yaml index 96ccc6a..bcda353 100644 --- a/micro-service-starter/kubernetes_code/zuul-api-gateway/zull-api.yaml +++ b/micro-service-starter/kubernetes_code/zuul-api-gateway/zull-api.yaml @@ -20,6 +20,16 @@ spec: labels: app: zuul-api-gateway spec: + affinity: + podAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + labelSelector: + matchExpressions: + - key: app + operator: In + values: + - zuul-api-gateway + topologyKey: "kubernetes.io/hostname" containers: - name: zuul-api-gateway image: umeshron05/zuul-api:latest @@ -27,16 +37,6 @@ spec: ports: - containerPort: 9999 name: zull-api - affinity: - podAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - labelSelector: - matchExpressions: - - key: app - operator: In - values: - - zuul-api-gateway - topologyKey: "kubernetes.io/hostname" --- From 93fa0cb93cbed475990293ac72bf32fd306def2f Mon Sep 17 00:00:00 2001 From: umeshravi0595 <107918224+umeshravi0595@users.noreply.github.com> Date: Mon, 8 May 2023 21:18:25 +0530 Subject: [PATCH 03/12] Update zull-api.yaml --- .../kubernetes_code/zuul-api-gateway/zull-api.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/micro-service-starter/kubernetes_code/zuul-api-gateway/zull-api.yaml b/micro-service-starter/kubernetes_code/zuul-api-gateway/zull-api.yaml index bcda353..3de1947 100644 --- a/micro-service-starter/kubernetes_code/zuul-api-gateway/zull-api.yaml +++ b/micro-service-starter/kubernetes_code/zuul-api-gateway/zull-api.yaml @@ -28,7 +28,7 @@ spec: - key: app operator: In values: - - zuul-api-gateway + - ui-web-app topologyKey: "kubernetes.io/hostname" containers: - name: zuul-api-gateway From ed44631531f0bbef36ab8602dae9a71e0fc3624d Mon Sep 17 00:00:00 2001 From: umeshravi0595 <107918224+umeshravi0595@users.noreply.github.com> Date: Mon, 8 May 2023 21:20:13 +0530 Subject: [PATCH 04/12] Update zull-api.yaml --- .../kubernetes_code/zuul-api-gateway/zull-api.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/micro-service-starter/kubernetes_code/zuul-api-gateway/zull-api.yaml b/micro-service-starter/kubernetes_code/zuul-api-gateway/zull-api.yaml index 3de1947..a1a6cfa 100644 --- a/micro-service-starter/kubernetes_code/zuul-api-gateway/zull-api.yaml +++ b/micro-service-starter/kubernetes_code/zuul-api-gateway/zull-api.yaml @@ -23,12 +23,12 @@ spec: affinity: podAffinity: requiredDuringSchedulingIgnoredDuringExecution: - labelSelector: + - labelSelector: matchExpressions: - key: app operator: In values: - - ui-web-app + - zuul-api-gateway topologyKey: "kubernetes.io/hostname" containers: - name: zuul-api-gateway From a4c2f69a4c769ad7122a41f74134753f7eebf94f Mon Sep 17 00:00:00 2001 From: umeshravi0595 <107918224+umeshravi0595@users.noreply.github.com> Date: Mon, 8 May 2023 21:37:23 +0530 Subject: [PATCH 05/12] Update zull-api.yaml --- .../kubernetes_code/zuul-api-gateway/zull-api.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/micro-service-starter/kubernetes_code/zuul-api-gateway/zull-api.yaml b/micro-service-starter/kubernetes_code/zuul-api-gateway/zull-api.yaml index a1a6cfa..ca1c447 100644 --- a/micro-service-starter/kubernetes_code/zuul-api-gateway/zull-api.yaml +++ b/micro-service-starter/kubernetes_code/zuul-api-gateway/zull-api.yaml @@ -28,7 +28,7 @@ spec: - key: app operator: In values: - - zuul-api-gateway + - ui-web-app topologyKey: "kubernetes.io/hostname" containers: - name: zuul-api-gateway From 209a73d6d4c47db7ef7f53f1a652fa5323ad6852 Mon Sep 17 00:00:00 2001 From: umeshravi0595 <107918224+umeshravi0595@users.noreply.github.com> Date: Mon, 8 May 2023 21:40:40 +0530 Subject: [PATCH 06/12] Update zull-api.yaml --- .../kubernetes_code/zuul-api-gateway/zull-api.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/micro-service-starter/kubernetes_code/zuul-api-gateway/zull-api.yaml b/micro-service-starter/kubernetes_code/zuul-api-gateway/zull-api.yaml index ca1c447..4bf9c25 100644 --- a/micro-service-starter/kubernetes_code/zuul-api-gateway/zull-api.yaml +++ b/micro-service-starter/kubernetes_code/zuul-api-gateway/zull-api.yaml @@ -25,11 +25,11 @@ spec: requiredDuringSchedulingIgnoredDuringExecution: - labelSelector: matchExpressions: - - key: app + - key: kubernetes.io/hostname operator: In values: - ui-web-app - topologyKey: "kubernetes.io/hostname" + containers: - name: zuul-api-gateway image: umeshron05/zuul-api:latest From 07d65a477491c2b508e25c9ca8cad306f68ca5ba Mon Sep 17 00:00:00 2001 From: umeshravi0595 <107918224+umeshravi0595@users.noreply.github.com> Date: Mon, 8 May 2023 21:42:18 +0530 Subject: [PATCH 07/12] Update zull-api.yaml --- .../kubernetes_code/zuul-api-gateway/zull-api.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/micro-service-starter/kubernetes_code/zuul-api-gateway/zull-api.yaml b/micro-service-starter/kubernetes_code/zuul-api-gateway/zull-api.yaml index 4bf9c25..f7ba573 100644 --- a/micro-service-starter/kubernetes_code/zuul-api-gateway/zull-api.yaml +++ b/micro-service-starter/kubernetes_code/zuul-api-gateway/zull-api.yaml @@ -22,8 +22,7 @@ spec: spec: affinity: podAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - - labelSelector: + requiredDuringSchedulingIgnoredDuringExecution matchExpressions: - key: kubernetes.io/hostname operator: In From b0fdbf50b275c8b543a50106ffcea7b9627fbc8a Mon Sep 17 00:00:00 2001 From: umeshravi0595 <107918224+umeshravi0595@users.noreply.github.com> Date: Mon, 8 May 2023 21:43:03 +0530 Subject: [PATCH 08/12] Update zull-api.yaml --- .../kubernetes_code/zuul-api-gateway/zull-api.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/micro-service-starter/kubernetes_code/zuul-api-gateway/zull-api.yaml b/micro-service-starter/kubernetes_code/zuul-api-gateway/zull-api.yaml index f7ba573..a22c417 100644 --- a/micro-service-starter/kubernetes_code/zuul-api-gateway/zull-api.yaml +++ b/micro-service-starter/kubernetes_code/zuul-api-gateway/zull-api.yaml @@ -23,7 +23,7 @@ spec: affinity: podAffinity: requiredDuringSchedulingIgnoredDuringExecution - matchExpressions: + - matchExpressions: - key: kubernetes.io/hostname operator: In values: From a2e4b6d2a2ee03d39c701dbf5222fff016bc610f Mon Sep 17 00:00:00 2001 From: umeshravi0595 <107918224+umeshravi0595@users.noreply.github.com> Date: Mon, 8 May 2023 21:46:09 +0530 Subject: [PATCH 09/12] Update zull-api.yaml --- .../kubernetes_code/zuul-api-gateway/zull-api.yaml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/micro-service-starter/kubernetes_code/zuul-api-gateway/zull-api.yaml b/micro-service-starter/kubernetes_code/zuul-api-gateway/zull-api.yaml index a22c417..ca1c447 100644 --- a/micro-service-starter/kubernetes_code/zuul-api-gateway/zull-api.yaml +++ b/micro-service-starter/kubernetes_code/zuul-api-gateway/zull-api.yaml @@ -22,13 +22,14 @@ spec: spec: affinity: podAffinity: - requiredDuringSchedulingIgnoredDuringExecution - - matchExpressions: - - key: kubernetes.io/hostname + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchExpressions: + - key: app operator: In values: - ui-web-app - + topologyKey: "kubernetes.io/hostname" containers: - name: zuul-api-gateway image: umeshron05/zuul-api:latest From 4e1416eabe3ead0864950ff7d1b6a08d0326b6bc Mon Sep 17 00:00:00 2001 From: umeshravi0595 <107918224+umeshravi0595@users.noreply.github.com> Date: Mon, 8 May 2023 23:11:36 +0530 Subject: [PATCH 10/12] Create shoes.yaml --- .../shoes-microservice-spring-boot/shoes.yaml | 49 +++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 micro-service-starter/kubernetes_code/shoes-microservice-spring-boot/shoes.yaml diff --git a/micro-service-starter/kubernetes_code/shoes-microservice-spring-boot/shoes.yaml b/micro-service-starter/kubernetes_code/shoes-microservice-spring-boot/shoes.yaml new file mode 100644 index 0000000..6a6ecdc --- /dev/null +++ b/micro-service-starter/kubernetes_code/shoes-microservice-spring-boot/shoes.yaml @@ -0,0 +1,49 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: shoes + namespace: ui-web-app + labels: + app: shoes + +spec: + selector: + matchLabels: + app: shoes + replicas: 1 + strategy: + rollingUpdate: + maxSurge: 25% + maxUnavailable: 25% + type: RollingUpdate + template: + metadata: + labels: + app: shoes + spec: + containers: + - name: shoes + image: umeshron05/shoes:latest + imagePullPolicy: IfNotPresent + ports: + - containerPort: 1002 + name: shoes + + +--- + +apiVersion: v1 +kind: Service +metadata: + name: shoes + namespace: shoes +spec: + selector: + app: shoes + type: ClusterIP + ports: + - name: shoes + protocol: TCP + port: 1002 + targetPort: 1002 + From 716dee0d40f77ebe31feee54548121eb17e9baac Mon Sep 17 00:00:00 2001 From: umeshravi0595 <107918224+umeshravi0595@users.noreply.github.com> Date: Mon, 8 May 2023 23:16:49 +0530 Subject: [PATCH 11/12] Update shoes.yaml --- .../kubernetes_code/shoes-microservice-spring-boot/shoes.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/micro-service-starter/kubernetes_code/shoes-microservice-spring-boot/shoes.yaml b/micro-service-starter/kubernetes_code/shoes-microservice-spring-boot/shoes.yaml index 6a6ecdc..708607d 100644 --- a/micro-service-starter/kubernetes_code/shoes-microservice-spring-boot/shoes.yaml +++ b/micro-service-starter/kubernetes_code/shoes-microservice-spring-boot/shoes.yaml @@ -27,7 +27,7 @@ spec: imagePullPolicy: IfNotPresent ports: - containerPort: 1002 - name: shoes + name: shoes-micro --- From cb896c7662ca1c9eee999765facee4a925603d8e Mon Sep 17 00:00:00 2001 From: umeshravi0595 <107918224+umeshravi0595@users.noreply.github.com> Date: Mon, 8 May 2023 23:17:58 +0530 Subject: [PATCH 12/12] Update shoes.yaml --- .../kubernetes_code/shoes-microservice-spring-boot/shoes.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/micro-service-starter/kubernetes_code/shoes-microservice-spring-boot/shoes.yaml b/micro-service-starter/kubernetes_code/shoes-microservice-spring-boot/shoes.yaml index 708607d..2e32f58 100644 --- a/micro-service-starter/kubernetes_code/shoes-microservice-spring-boot/shoes.yaml +++ b/micro-service-starter/kubernetes_code/shoes-microservice-spring-boot/shoes.yaml @@ -27,7 +27,7 @@ spec: imagePullPolicy: IfNotPresent ports: - containerPort: 1002 - name: shoes-micro + name: shoes --- @@ -36,7 +36,7 @@ apiVersion: v1 kind: Service metadata: name: shoes - namespace: shoes + namespace: ui-web-app spec: selector: app: shoes