From 8811ffdb3ee1c7061a474759a74dcd8f7e61f5ff Mon Sep 17 00:00:00 2001 From: SadiaMas <24april23@gmail.com> Date: Tue, 9 May 2023 14:10:21 +0000 Subject: [PATCH 1/4] added deploy code for vote and redis --- deploy/redis/deployment.yaml | 23 +++++++++++++++++++++++ deploy/redis/service.yaml | 16 ++++++++++++++++ deploy/vote/deployment.yaml | 23 +++++++++++++++++++++++ deploy/vote/service.yaml | 17 +++++++++++++++++ 4 files changed, 79 insertions(+) create mode 100644 deploy/redis/deployment.yaml create mode 100644 deploy/redis/service.yaml create mode 100644 deploy/vote/deployment.yaml create mode 100644 deploy/vote/service.yaml diff --git a/deploy/redis/deployment.yaml b/deploy/redis/deployment.yaml new file mode 100644 index 00000000..4fd18390 --- /dev/null +++ b/deploy/redis/deployment.yaml @@ -0,0 +1,23 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + creationTimestamp: null + labels: + app: redis + name: redis +spec: + replicas: 1 + selector: + matchLabels: + app: redis + strategy: {} + template: + metadata: + creationTimestamp: null + labels: + app: redis + spec: + containers: + - image: redis:alpine + name: redis + resources: {} diff --git a/deploy/redis/service.yaml b/deploy/redis/service.yaml new file mode 100644 index 00000000..5e5fbc99 --- /dev/null +++ b/deploy/redis/service.yaml @@ -0,0 +1,16 @@ +apiVersion: v1 +kind: Service +metadata: + creationTimestamp: null + labels: + app: redis + name: redis +spec: + ports: + - name: "6379" + port: 6379 + protocol: TCP + targetPort: 6379 + selector: + app: redis + type: ClusterIP diff --git a/deploy/vote/deployment.yaml b/deploy/vote/deployment.yaml new file mode 100644 index 00000000..0bdc7212 --- /dev/null +++ b/deploy/vote/deployment.yaml @@ -0,0 +1,23 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + creationTimestamp: null + labels: + app: vote + name: vote +spec: + replicas: 2 + selector: + matchLabels: + app: vote + strategy: {} + template: + metadata: + creationTimestamp: null + labels: + app: vote + spec: + containers: + - image: schoolofdevops/vote:v1 + name: vote + resources: {} diff --git a/deploy/vote/service.yaml b/deploy/vote/service.yaml new file mode 100644 index 00000000..4aefc158 --- /dev/null +++ b/deploy/vote/service.yaml @@ -0,0 +1,17 @@ +apiVersion: v1 +kind: Service +metadata: + creationTimestamp: null + labels: + app: vote + name: vote +spec: + ports: + - name: "80" + nodePort: 30000 + port: 80 + protocol: TCP + targetPort: 80 + selector: + app: vote + type: NodePort From ee80a02ddb03031c4af3d7f478da13d81430a868 Mon Sep 17 00:00:00 2001 From: SadiaMas <24april23@gmail.com> Date: Mon, 22 May 2023 10:02:42 +0000 Subject: [PATCH 2/4] added README for deploy. --- deploy/README.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 deploy/README.md diff --git a/deploy/README.md b/deploy/README.md new file mode 100644 index 00000000..b92a8731 --- /dev/null +++ b/deploy/README.md @@ -0,0 +1 @@ +This is a Deployment code for Kubernetes. From fd8f1d109fc7705f5d44eaedf9cf7b8a6b431f08 Mon Sep 17 00:00:00 2001 From: SadiaMas <24april23@gmail.com> Date: Mon, 22 May 2023 10:13:36 +0000 Subject: [PATCH 3/4] updated README --- deploy/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/deploy/README.md b/deploy/README.md index b92a8731..0fa70efd 100644 --- a/deploy/README.md +++ b/deploy/README.md @@ -1 +1,2 @@ This is a Deployment code for Kubernetes. +This code would be used by Flux to deploy to Kubernete environment. From bc7b926255ed27298d36487954235faf994871cc Mon Sep 17 00:00:00 2001 From: SadiaMas <24april23@gmail.com> Date: Mon, 22 May 2023 10:57:18 +0000 Subject: [PATCH 4/4] added a new label to vote app --- deploy/vote/deployment.yaml | 2 ++ deploy/vote/service.yaml | 1 + 2 files changed, 3 insertions(+) diff --git a/deploy/vote/deployment.yaml b/deploy/vote/deployment.yaml index 0bdc7212..9617fc38 100644 --- a/deploy/vote/deployment.yaml +++ b/deploy/vote/deployment.yaml @@ -4,6 +4,7 @@ metadata: creationTimestamp: null labels: app: vote + tier: front name: vote spec: replicas: 2 @@ -16,6 +17,7 @@ spec: creationTimestamp: null labels: app: vote + tier: front spec: containers: - image: schoolofdevops/vote:v1 diff --git a/deploy/vote/service.yaml b/deploy/vote/service.yaml index 4aefc158..ddd94891 100644 --- a/deploy/vote/service.yaml +++ b/deploy/vote/service.yaml @@ -4,6 +4,7 @@ metadata: creationTimestamp: null labels: app: vote + tier: front name: vote spec: ports: