Nginx Deployment

$ kubectl run nginx --image=nginx

Output

deployment.apps/nginx created

Verify the Pods running

$ kubectl get pods

Output

NAME                     READY   STATUS    RESTARTS   AGE
nginx-7cdbd8cdc9-9xsms   1/1     Running   0          27s

Here we can see that the Pod name is not like the usual one.

Lets delete the Pod and see what will happen.

$ kubectl delete pod nginx-7cdbd8cdc9-9xsms

Output

pod "nginx-7cdbd8cdc9-9xsms" deleted

Verify Pod status

$ kubectl get pods

Output

NAME                     READY   STATUS    RESTARTS   AGE
nginx-7cdbd8cdc9-vfbn8   1/1     Running   0          81s

A new Pod has been created again !!!