Can any one explain me please, In Mock2 answer how kubectl run resulted with deployment, while in Mock2 test resulted with pod
The behaviour of
kubectl run has changed between versions of Kubernetes. In older versions a deployment was created whereas in the current (and recent versions) a pod is created. If you want to create a deployment in the current version of Kubernetes you need to use
kubectl create deployment. The various labs and tests in the course seem to be using different versions of Kubernetes. On the one hand this could be annoying for the exam as it is always using the newest or almost newest version of Kubernetes. However, it is also useful to have experience of dealing with different versions of Kubernetes as this will likely happen in the real world.