티스토리 뷰
안녕하세요. AWS EKS Hands On 내용을 공유하기 위해 작성한 글입니다.
참고 : https://www.eksworkshop.com/
PREREQUISITES
https://www.eksworkshop.com/020_prerequisites/
https://www.eksworkshop.com/030_eksctl/
Beginner
DEPLOY THE EXAMPLE MICROSERVICES
DEPLOY OUR SAMPLE APPLICATIONS
apiVersion: apps/v1
kind: Deployment
metadata:
name: ecsdemo-nodejs
labels:
app: ecsdemo-nodejs
namespace: default
spec:
replicas: 1
selector:
matchLabels:
app: ecsdemo-nodejs
strategy:
rollingUpdate:
maxSurge: 25%
maxUnavailable: 25%
type: RollingUpdate
template:
metadata:
labels:
app: ecsdemo-nodejs
spec:
containers:
- image: brentley/ecsdemo-nodejs:latest
imagePullPolicy: Always
name: ecsdemo-nodejs
ports:
- containerPort: 3000
protocol: TCP
HEALTH CHECKS
- liveness probe : The kubelet uses liveness probes to know when to restart a container. Liveness probes are used in Kubernetes to know when a pod is alive or dead.
apiVersion: v1
kind: Pod
metadata:
labels:
test: liveness
name: liveness-exec
spec:
containers:
- name: liveness
image: registry.k8s.io/busybox
args:
- /bin/sh
- -c
- touch /tmp/healthy; sleep 30; rm -f /tmp/healthy; sleep 600
livenessProbe:
exec:
command:
- cat
- /tmp/healthy
initialDelaySeconds: 5
periodSeconds: 5
- readness probe : The kubelet uses readiness probes to know when a container is ready to start accepting traffic.
apiVersion: v1
kind: Pod
metadata:
labels:
test: liveness
name: liveness-exec
spec:
containers:
- name: liveness
image: registry.k8s.io/busybox
args:
- /bin/sh
- -c
- touch /tmp/healthy; sleep 30; rm -f /tmp/healthy; sleep 600
readinessProbe:
exec:
command:
- cat
- /tmp/healthy
initialDelaySeconds: 5
periodSeconds: 5
SECURING YOUR CLUSTER WITH NETWORK POLICIES
kind: NetworkPolicy
apiVersion: networking.k8s.io/v1 #EKS 1.22부터는 v1 업데이트!
metadata:
namespace: stars
name: backend-policy
spec:
podSelector:
matchLabels:
role: backend
ingress:
- from:
- podSelector:
matchLabels:
role: frontend
ports:
- protocol: TCP
port: 6379
blog migration project
written in 2022.10.4
https://medium.com/techblog-hayleyshim/aws-eks-hands-on-8874acf26a3c
'IT > Infra&Cloud' 카테고리의 다른 글
[aws] EKS Hands On — Blueprints (0) | 2023.10.29 |
---|---|
[aws] EKS Hands On — Security (0) | 2023.10.29 |
[aws] GuardDuty, Macie, Inspector (0) | 2023.10.29 |
[aws] CloudWatch,CloudTrail,Config (0) | 2023.10.29 |
[aws] ELB, Cloudfront, WAF (0) | 2023.10.29 |
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
TAG
- handson
- operator
- terraform
- 혼공챌린지
- 혼공파
- cni
- 혼공단
- cloud
- IaC
- k8s calico
- AI
- NW
- gcp serverless
- GKE
- S3
- AWS
- security
- NFT
- 국제 개발 협력
- k8s
- 파이썬
- controltower
- EKS
- PYTHON
- 도서
- k8s cni
- OS
- SDWAN
- GCP
- VPN
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
글 보관함