Error executing the kubectl command to obtain deployments

Hello, I’m new here on the forum I’m starting to study kubernetes by myself and I came across this error when executing the deployment of nginx in my lab.

I have problems with other commands too.
I am using #37-Ubuntu SMP Thu May 21 12:53:59 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

No resources found in default namespace.

What command you proceed can i know?
Actually “No resources found in default namespace” that means kubernetes gave you default namespace. Where you can create,deploy etc things on behalf of resources. So at present there is nothing available to show you. But when you do kubectl get pod -n kube-system that is k8s environment to manage cluster.

Thanks for your help.
I performed the installation of nginx in a cluster lab using the command:
kubectl run nginx - image nginx
he returned me
pod / nginx created
but because it didn’t show
deployment instead of pod?
Then I ran the command
kubectl get deployments
he returned me
No resources found in default namespace.

In version k8s v1.18+ later, when you run kubectl run nginx --image=nginx it will create pod instead of deployment. You have to create deployment by imperative command kubectl create deployment <deploy-name> .