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