$ kubectl create namespace myspace
namespace/myspace created

$ kubectl create quota test --hard=count/deployments.apps=2,count/replicasets.apps=4,count/pods=3,count/secrets=4 --namespace=myspace
resourcequota/test created

$ kubectl describe quota --namespace=myspace
Name:                   test
Namespace:              myspace
Resource                Used  Hard
--------                ----  ----
count/deployments.apps  0     2
count/pods              0     3
count/replicasets.apps  0     4
count/secrets           0     4

$ kubectl create deployment nginx --image=nginx --namespace=myspace --replicas=2
deployment.apps/nginx created

$ kubectl describe quota --namespace=myspace
Name:                   test
Namespace:              myspace
Resource                Used  Hard
--------                ----  ----
count/deployments.apps  1     2
count/pods              2     3
count/replicasets.apps  1     4
count/secrets           0     4

$ kubectl delete deploy nginx --namespace=myspace
deployment.apps "nginx" deleted

$ kubectl delete quota test --namespace=myspace
resourcequota "test" deleted

$ kubectl delete namespace myspace
namespace "myspace" deleted
