Skip to content

Latest commit

 

History

History
32 lines (22 loc) · 451 Bytes

1.simple-pod.MD

File metadata and controls

32 lines (22 loc) · 451 Bytes

Simple pod demo

Run nginx as webserver

$ kubectl run --image=nginx nginx
$ kubectl run --image=nginx nginx --restart='Always'

Show running pod

$ kubectl get po --show-labels -owide -w

Expose svc

$ kubectl expose deploy nginx --selector run=nginx --port=80 --type=NodePort

Check svc detail

$ kubectl get svc

Access service

$ curl 192.168.34.2:<nodeport>