04A. Nginx ๋ํ๋ก์ด๋จผํธ
Less than 1 minute
04A. Nginx ๋ํ๋ก์ด๋จผํธ ๊ด๋ จ
๋ชฉ์ฐจ
์ธ์ ๋ ์ต์ Kubernetes
Unit 4. Nginx YAML ์ค์ ํ์ผ ์์ฑํ๊ธฐ
์ธ์ ๋ ์ต์ Kubernetes
๋ค์ ๋ด์ฉ์ deployment.yaml
ํ์ผ๋ก ์ ์ฅํฉ๋๋ค.
jHLsKubernetes/Unit04/deployment.yaml at main ยท pyrasis/jHLsKubernetes
...
deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: hello-nginx
spec:
replicas: 1
selector:
matchLabels:
app: hello-nginx
template:
metadata:
labels:
app: hello-nginx
spec:
containers:
- name: hello-nginx
image: nginx:latest
ports:
- containerPort: 80
๋ค์ ๋ช
๋ น์ ์คํํ์ฌ deployment.yaml
ํ์ผ๋ก ๋ํ๋ก์ด๋จผํธ๋ฅผ ์์ฑํฉ๋๋ค.
kubectl create -f deployment.yaml
#
# deployment.apps/hello-nginx created