# We can create deployment by 'run' option before k8s v1.18
$ kubectl run --image=nginx nginx
$ kubectl run --image=nginx nginx --restart='Always'
# We should create deployment by 'create deployment' option after k8s v1.18
$ kubectl create deployment nginx --image=nginx --port=80
$ kubectl get po --show-labels -owide -w
# When we create deployment by 'run' option, we use selector 'run=nginx'
$ kubectl expose deploy nginx --selector run=nginx --port=80 --type=NodePort
# When we create deployment by 'create deployment' option, we use selector 'app=nginx'
$ kubectl expose deploy nginx --selector app=nginx --port=80 --type=NodePort
$ curl 192.168.34.2:<nodeport>