Skip to content

Commit a193024

Browse files
🚀 [add] fargate-app-deploy
1 parent c0742ea commit a193024

File tree

17 files changed

+69
-165
lines changed

17 files changed

+69
-165
lines changed

07-pomodoroapp-fargate-deployment/eks-fargate.yaml renamed to 07-fargate-app-deployment/eks-fargate.yaml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,16 @@ metadata:
66
region: us-east-1
77

88
vpc:
9-
id: "vpc-00ce64af6d567e2c3"
9+
id: "vpc-09cda2c938e687f27"
1010
cidr: "10.0.0.0/16"
1111
subnets:
1212
private:
13-
us-east-1a: { id: subnet-07805ecd496e4cb44 }
14-
us-east-1b: { id: subnet-07d94a7e57a67a596 }
13+
us-east-1a: { id: subnet-045d0562c6a1d8233 }
14+
us-east-1b: { id: subnet-06dd483abe9150717 }
15+
16+
clusterEndpoints:
17+
publicAccess: false
18+
privateAccess: true
1519

1620
iam:
1721
withOIDC: true
@@ -21,4 +25,3 @@ fargateProfiles:
2125
selectors:
2226
- namespace: default
2327
- namespace: kube-system
24-
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
apiVersion: eksctl.io/v1alpha5
2+
kind: ClusterConfig
3+
4+
metadata:
5+
name: pomodoroapp-fargate
6+
region: us-east-1
7+
8+
fargateProfiles:
9+
- name: fp-game
10+
selectors:
11+
- namespace: game-ns
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
apiVersion: v2
2+
name: 2048-game
3+
description: A Helm chart to deploy the 2048 game
4+
version: 0.1.0
5+
appVersion: "1.0"
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
apiVersion: apps/v1
2+
kind: Deployment
3+
metadata:
4+
namespace: {{ .Values.namespace }}
5+
name: deployment-2048
6+
spec:
7+
selector:
8+
matchLabels:
9+
app.kubernetes.io/name: app-2048
10+
replicas: {{ .Values.replicas }}
11+
template:
12+
metadata:
13+
labels:
14+
app.kubernetes.io/name: app-2048
15+
spec:
16+
containers:
17+
- image: {{ .Values.image.repository }}:{{ .Values.image.tag }}
18+
imagePullPolicy: Always
19+
name: app-2048
20+
ports:
21+
- containerPort: 80
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
apiVersion: v1
2+
kind: Service
3+
metadata:
4+
namespace: {{ .Values.namespace }}
5+
name: service-2048
6+
annotations:
7+
service.beta.kubernetes.io/aws-load-balancer-nlb-target-type: "ip"
8+
service.beta.kubernetes.io/aws-load-balancer-type: external
9+
service.beta.kubernetes.io/aws-load-balancer-scheme: internet-facing
10+
spec:
11+
ports:
12+
- port: {{ .Values.service.port }}
13+
targetPort: 80
14+
protocol: TCP
15+
type: {{ .Values.service.type }}
16+
selector:
17+
app.kubernetes.io/name: app-2048
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
replicas: 3
2+
image:
3+
repository: public.ecr.aws/l6m2t8p7/docker-2048
4+
tag: latest
5+
service:
6+
port: 80
7+
type: LoadBalancer

07-pomodoroapp-fargate-deployment/tf-vpc/main.tf renamed to 07-fargate-app-deployment/tf-vpc/main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ resource "aws_subnet" "private_subnet" {
7070
tags = {
7171
Name = "${var.environment}-${element(var.availability_zones, count.index)}-private-subnet"
7272
Environment = "${var.environment}"
73+
"kubernetes.io/role/elb" = "1"
7374
}
7475
}
7576

0 commit comments

Comments
 (0)