Aanavi Gupta:
What is the difference between kubectl run and create command? Why won’t this command work:
kubectl create pod ngnix --image=nginx
Aanavi Gupta:
This gave me a invalid image flag error. Task was to create a new pod.
Nitish Patni:
For pod u cannot use create , for pod u need to use run only.
pod is independent identity and can be launched seperately unlike deployment , replicaset etc
deployment will create replicas and pods same goes for replicaset which next create pods
Pods is the last in the hirearchy.
deployment>>replicaset>>pods
hence for pods kubectl run is used and for others kubectl create because we have to follow the end to end hirarchey
Aanavi Gupta:
Oh okay, thank you for this, I understood now.