-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
init apply web application yaml
- Loading branch information
Showing
32 changed files
with
504 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
env.yaml | ||
env.yaml | ||
**docker-compose.yml | ||
**ingress.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,64 @@ | ||
# jeontongju.infra | ||
# K8S Command | ||
|
||
## Namespace 적용 (default) | ||
|
||
``` | ||
kubectl ns default | ||
``` | ||
|
||
## EFS 마운트 확인 | ||
|
||
``` | ||
df -hT --type nfs4 | ||
``` | ||
|
||
## Metric server 설치 | ||
|
||
``` | ||
kubectl apply -f https://github.com/kubernetes-sigs/metrics-server/releases/latest/download/components.yaml | ||
``` | ||
|
||
## kubectl apply 환경 변수 적용 | ||
|
||
``` | ||
REPOSITORY_URI=<your repository uri> | ||
REPOSITORY_URI=$REPOSITORY_URI envsubst < deployment.yaml | kubectl apply -f - | ||
``` | ||
|
||
## AWS Load Balancer Controller 설치 | ||
|
||
``` | ||
helm repo add eks https://aws.github.io/eks-charts | ||
helm repo update | ||
helm install aws-load-balancer-controller eks/aws-load-balancer-controller -n kube-system --set clusterName=$CLUSTER_NAME \ | ||
--set serviceAccount.create=false \ | ||
--set serviceAccount.name=aws-load-balancer-controller | ||
``` | ||
|
||
## ExternalDNS 설치 | ||
|
||
``` | ||
MyDomain=<your domain> | ||
// HostedZone 여러 개일 경우 맞춰서 선택 | ||
MyDnsHostedZoneId=$(aws route53 list-hosted-zones-by-name --dns-name "${MyDomain}." --query "HostedZones[0].Id" --output text) | ||
echo $MyDomain, $MyDnsHostedZoneId | ||
curl -s -O https://raw.githubusercontent.com/cloudneta/cnaeblab/master/_data/externaldns.yaml | ||
MyDomain=$MyDomain MyDnsHostedZoneId=$MyDnsHostedZoneId envsubst < externaldns.yaml | kubectl apply -f - | ||
``` | ||
|
||
## AWS Cert Manager 인증서 확인 | ||
|
||
``` | ||
// ACM 인증서 확인 | ||
aws acm list-certificates | ||
// ACM 인증서 변수 선언 | ||
// 여러 개일 경우 맞춰서 선택 | ||
CERT_ARN=`aws acm list-certificates --query 'CertificateSummaryList[].CertificateArn[]' --output text`; echo $CERT_ARN | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: authentication-deployment | ||
namespace: prod | ||
labels: | ||
app: authentication-service | ||
spec: | ||
selector: | ||
matchLabels: | ||
app: authentication-service | ||
replicas: 1 | ||
template: | ||
metadata: | ||
name: authentication-pod | ||
labels: | ||
app: authentication-service | ||
spec: | ||
containers: | ||
- name: authentication-service | ||
image: ${REPOSITORY_URI}/jeontongju-authentication-service | ||
ports: | ||
- containerPort: 8080 | ||
imagePullPolicy: Always |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: authentication-service | ||
namespace: prod | ||
spec: | ||
ports: | ||
- protocol: TCP | ||
port: 8080 | ||
targetPort: 8080 | ||
selector: | ||
app: authentication-service |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: consumer-deployment | ||
namespace: prod | ||
labels: | ||
app: consumer-service | ||
spec: | ||
selector: | ||
matchLabels: | ||
app: consumer-service | ||
replicas: 1 | ||
template: | ||
metadata: | ||
name: consumer-pod | ||
labels: | ||
app: consumer-service | ||
spec: | ||
containers: | ||
- name: consumer-service | ||
image: ${REPOSITORY_URI}/jeontongju-consumer-service | ||
ports: | ||
- containerPort: 8080 | ||
imagePullPolicy: Always |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: consumer-service | ||
namespace: prod | ||
spec: | ||
ports: | ||
- protocol: TCP | ||
port: 8080 | ||
targetPort: 8080 | ||
selector: | ||
app: consumer-service |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: coupon-deployment | ||
namespace: prod | ||
labels: | ||
app: coupon-service | ||
spec: | ||
selector: | ||
matchLabels: | ||
app: coupon-service | ||
replicas: 1 | ||
template: | ||
metadata: | ||
name: coupon-pod | ||
labels: | ||
app: coupon-service | ||
spec: | ||
containers: | ||
- name: coupon-service | ||
image: ${REPOSITORY_URI}/jeontongju-coupon-service | ||
ports: | ||
- containerPort: 8080 | ||
imagePullPolicy: Always |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: coupon-service | ||
namespace: prod | ||
spec: | ||
ports: | ||
- protocol: TCP | ||
port: 8080 | ||
targetPort: 8080 | ||
selector: | ||
app: coupon-service |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: notification-deployment | ||
namespace: prod | ||
labels: | ||
app: notification-service | ||
spec: | ||
selector: | ||
matchLabels: | ||
app: notification-service | ||
replicas: 1 | ||
template: | ||
metadata: | ||
name: notification-pod | ||
labels: | ||
app: notification-service | ||
spec: | ||
containers: | ||
- name: notification-service | ||
image: ${REPOSITORY_URI}/jeontongju-notification-service | ||
ports: | ||
- containerPort: 8080 | ||
imagePullPolicy: Always |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: notification-service | ||
namespace: prod | ||
spec: | ||
ports: | ||
- protocol: TCP | ||
port: 8080 | ||
targetPort: 8080 | ||
selector: | ||
app: notification-service |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: order-deployment | ||
namespace: prod | ||
labels: | ||
app: order-service | ||
spec: | ||
selector: | ||
matchLabels: | ||
app: order-service | ||
replicas: 1 | ||
template: | ||
metadata: | ||
name: order-pod | ||
labels: | ||
app: order-service | ||
spec: | ||
containers: | ||
- name: order-service | ||
image: ${REPOSITORY_URI}/jeontongju-order-service | ||
ports: | ||
- containerPort: 8080 | ||
imagePullPolicy: Always |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: order-service | ||
namespace: prod | ||
spec: | ||
ports: | ||
- protocol: TCP | ||
port: 8080 | ||
targetPort: 8080 | ||
selector: | ||
app: order-service |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: payment-deployment | ||
namespace: prod | ||
labels: | ||
app: payment-service | ||
spec: | ||
selector: | ||
matchLabels: | ||
app: payment-service | ||
replicas: 1 | ||
template: | ||
metadata: | ||
name: payment-pod | ||
labels: | ||
app: payment-service | ||
spec: | ||
containers: | ||
- name: payment-service | ||
image: ${REPOSITORY_URI}/jeontongju-payment-service | ||
ports: | ||
- containerPort: 8080 | ||
imagePullPolicy: Always |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: payment-service | ||
namespace: prod | ||
spec: | ||
ports: | ||
- protocol: TCP | ||
port: 8080 | ||
targetPort: 8080 | ||
selector: | ||
app: payment-service |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: product-deployment | ||
namespace: prod | ||
labels: | ||
app: product-service | ||
spec: | ||
selector: | ||
matchLabels: | ||
app: product-service | ||
replicas: 1 | ||
template: | ||
metadata: | ||
name: product-pod | ||
labels: | ||
app: product-service | ||
spec: | ||
containers: | ||
- name: product-service | ||
image: ${REPOSITORY_URI}/jeontongju-product-service | ||
ports: | ||
- containerPort: 8080 | ||
imagePullPolicy: Always |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: product-service | ||
namespace: prod | ||
spec: | ||
ports: | ||
- protocol: TCP | ||
port: 8080 | ||
targetPort: 8080 | ||
selector: | ||
app: product-service |
Oops, something went wrong.