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..2e32f58 --- /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: ui-web-app +spec: + selector: + app: shoes + type: ClusterIP + ports: + - name: shoes + protocol: TCP + port: 1002 + targetPort: 1002 + 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..ca1c447 --- /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: + affinity: + podAffinity: + 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 + imagePullPolicy: IfNotPresent + ports: + - containerPort: 9999 + name: zull-api + +--- + +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