Database and Cloud World

Live the life you love. Love the life you live

Kubernetes PODS creation


A note about creating pods using kubectl run.

You can create pods from the command line using any of the below two ways:

Create an NGINX Pod (using –generator)
kubectl run –generator=run-pod/v1 nginx –image=nginx

  1. Create an NGINX Pod (using –restart=Never)

kubectl run nginx –image=nginx –restart=Never

If you run the kubectl run command without the –restart=Never OR the –generator=run-pod/v1, the command will create a deployment instead (as of version 1.16).

Note that this way of creating a deployment is deprecated and should not be used.

Instead, use kubectl create command to create a deployment

kubectl create deployment nginx –image=nginx

Kubernetes Concepts – https://kubernetes.io/docs/concepts/

Pod Overview- https://kubernetes.io/docs/concepts/workloads/pods/pod-overview/

May 14, 2020 - Posted by | Kubernetes

No comments yet.

Leave a comment