apiVersion: apps/v1
kind: Deployment # 이게 중요
metadata: 
	name: myapp-deployment
	labels:
		app: myapp
		type: front-end
spec:
	template:
		metadata:
			name: myapp-pod
			lables:
				app: myapp
				type: front-end
		spec:
			containers:
			- name: nginx-container
			  image: nginx
replicas: 3
selector:
	matchLables:
		type: front-end
$ kubectl get deployments
NAME             DESIRED CURRENT UP-TO-DATE AVAILABLE AGE
myapp-deployment 3       3        3         3         21s

# 자동으로 replica set 이 만들어짐. 
$ kubectl get replicaset
NAME                    DESIRED CURRENT READY AGE
myapp-deployment-432dsf 3       3       3     21s
$ kubectl get pods
NAME                      READY  STATUS  RESTARTS AGE
myapp-deployment-432dsf-1 1/1    RUNNING 0       21s
myapp-deployment-432dsf-2 1/1    RUNNING 0       21s
myapp-deployment-432dsf-3 1/1    RUNNING 0       21s
$ kubectl get all 
NAME             DESIRED CURRENT UP-TO-DATE AVAILABLE AGE
myapp-deployment 3       3        3         3         21s

NAME                    DESIRED CURRENT READY AGE
myapp-deployment-432dsf 3       3       3     21s

NAME                      READY  STATUS  RESTARTS AGE
myapp-deployment-432dsf-1 1/1    RUNNING 0       21s
myapp-deployment-432dsf-2 1/1    RUNNING 0       21s
myapp-deployment-432dsf-3 1/1    RUNNING 0       21s