Danilo Marquiori
Danilo Marquiori

Reputation: 95

Get information Kubernetes Namespaces

I am trying to collect some information regarding the kubernetes namespaces. I found a command where you can see some information.

kubectl describe resourcequota -n my-namespaces

I have as return:

Name:                       gke-resource-quotas
Namespace:                  tms-prod
Resource                    Used  Hard
--------                    ----  ----
count/ingresses.extensions  0     5k
count/jobs.batch            0     10k
pods                        68    5k
services                    44    1500

However I need information like:

CPU request
CPU Limit
Memory request
Memory Limit
Service (count)
Pods (Count)
Phase

I studied a little and saw that it is possible to create ResourceQuota to get this information. However I did not understand very well its operation.

Could anyone get this data?

Upvotes: 0

Views: 9132

Answers (1)

Abhijit Gaikwad
Abhijit Gaikwad

Reputation: 3162

  1. run first kubectl get quota
  2. then it will display quotas available
  3. then run kubectl describe quota <quota name>

if you don't have any custom quota then you can create it as describe from https://kubernetes.io/docs/concepts/policy/resource-quotas/

Upvotes: 4

Related Questions