Basic deployments also not executed

While I’m creating basic deployment I’m facing below error

"Error from server (NotFound) : the server could not find the requested resource
I have used below command:
kubectl create deployment test --image=nginx -n ns --dry-run=client -o yaml > demo.yaml
and edited demo.yaml attaching code for reference.

after edited code I have executed below command
kubectl create -f demo.yaml


I have executed basic deployment file in all existing environment I m failing.
Please let me know problem from code end or environment.
I m unable to proceed basic kubernetes playground . please help me ASAP

Hi @venumadhav.hari ,
Please share the below command output.

kubectl create -f demo.yaml -v 8 

Regards,