01-22 00:42
Recent Posts
Recent Comments
Tags
- ๋ฐ์ดํฐ๋ฒ ์ด์ค
- ict๊ณต๋ชจ์
- TSQL
- DB
- JOBํ๊ณ
- API๋ง์ผํ๋ ์ด์ค
- SQL
- ํ์ด์ฌ
- ์๋์ด๋ ธ
- python
- Naver Cloud
- ์กํ๊ณ
- ์คํฝ์ค๋น
- ํ์ด์๊ณต๋ชจ์
- ICT
- ์๋ฐ
- Spring
- API MarketPlace ๊ธ๋ก๋ฒ ์ํฌํฐ์ฆ
- ์ด๋ธ์
- Java
- linux
- ํ์ด์
- ICT๋ฉํ ๋ง
- DATABASE
- mysql
- ํ๋ก๋ณด๋ ธ
- appetizer
- RaspberryPi
- ์คํฝ๋ ํ
- ์จ์ผ๋ํ
- Today
- Total
miinsun
[์ค์ต] ์ฟ ๋ฒ๋คํฐ์ค Ingress ๋ณธ๋ฌธ
๐ ingress-nginx ์ค์น
kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v1.8.0/deploy/static/provider/baremetal/deploy.yaml
https://kubernetes.github.io/ingress-nginx/deploy/#bare-metal-clusters
- ingress controlelr ๋์ ํ์ธ
๐ ๋ฌด์ค๋จ ๋ฐฐํฌ ์ค์ต
- ๋ฌด์ค๋จ ๋ฐฐํฌ์ ์ฌ์ฉํ deployment ์ค์
ing-test-deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: websample
spec:
selector:
matchLabels:
run: websample
strategy:
# ๋ํด๋ก์ด๋จผํธ๋ฅผ ์
๋ฐ์ดํธํ๋ ๋์ ๊ธฐ๋ณธ ํ๋ ๊ฐ์์ 25% ํ๋๋ฅผ ์ถ๊ฐํ๊ณ #
# ์
๋ฐ์ดํธ ์ค์๋ ์ต์ 25% ํ๋๋ ๋ณด์ฅํ๋ค.
rollingUpdate:
maxSurge: 25%
maxUnavailable: 25%
type: RollingUpdate
template:
metadata:
labels:
run: websample
spec:
containers:
- image: acadx0/190713:v1
imagePullPolicy: Always
name: websample
ports:
- containerPort: 5000
protocol: TCP
# HTTP GET์์ฒญ์ ๋ณด๋ด ์ปจํ
์ด๋ ์ํ๋ฅผ ์ง๋จ
livenessProbe:
httpGet:
path: /liveness
port: 5000
readinessProbe:
httpGet:
path: /readiness
port: 5000
lifecycle:
preStop:
httpGet:
path: /prestop
port: 5000
terminationGracePeriodSeconds: 30
- ๋ฌด์ค๋จ ๋ฐฐํฌ์ ์ฌ์ฉํ ingress ์ค์
ing-test-ingress.yaml
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: websample-ing
spec:
rules:
# xip.io๋ ๋ชจ๋ ip ์ฃผ์์ ์์ผ๋์นด๋ DNS๋ฅผ ์ ๊ณต
- host: 127.0.0.1.xip.io
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: websample
port:
number: 5000
- ๋ํ๋ก์ด๋จผํธ, ์๋น์ค, ์ธ๊ทธ๋ ์ค๋ฅผ ์์ฑ
$ kubectl apply -f ing-test-deployment.yaml
$ kubectl expose deployment websample
$ kubectl apply -f ing-test-ingress.yaml
- ๋ฒ ๊ฒํ(๋ถํํ ์คํธ ๋๊ตฌ ์ค์น)
https://github.com/tsenart/vegeta
# ๋ฒ ๊ฒํ ์ต์ ๋ฆด๋ฆฌ์ฆ ๋ฒ์ ๋ค์ด
$ curl -Lo vegeta.tar.gz "https://github.com/tsenart/vegeta/releases/download/v12.8.4/vegeta_12.8.4_linux_amd64.tar.gz"
$ mkdir vegeta-temp
$ tar xf vegeta.tar.gz -C vegeta-temp
$ sudo mv vegeta-temp/vegeta /usr/local/bin
$ rm -rf vegeta.tar.gz
$ rm -rf vegeta-temp
'Infra > Kubernetes' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
[์ด๋ก ] ์ฟ ๋ฒ๋คํฐ์ค ์ปจํผ๊ทธ๋งต(ConfigMap)๊ณผ ์ํฌ๋ฆฟ(Secret) (0) | 2023.06.14 |
---|---|
[์ด๋ก ] ์ฟ ๋ฒ๋คํฐ์ค ๋ ์ด๋ธ๊ณผ ์ ๋ํ ์ด์ (0) | 2023.06.14 |
[์ด๋ก ] ์ฟ ๋ฒ๋คํฐ์ค Ingress (0) | 2023.06.13 |
[์ค์ต] minikube๋ก ์ฑ ์ธ๋ถ๋ก ๋ ธ์ถํ๊ธฐ (0) | 2023.06.09 |
[์ธํ ] minikube๋ก ์ฟ ๋ฒ๋คํฐ์ค ํด๋ฌ์คํฐ ๊ตฌ์ถํ๊ธฐ (0) | 2023.06.09 |
Comments