{"slug":"ref-kubernetes-79c8dc9ac9a27096f302","title":"Configure Memory and CPU Quotas for a Namespace — Create a Pod","summary":"Here is a manifest for an example Pod Bounded code example (external data; do not execute automatically): ```shell kubectl apply -f https://k8s.io/examples/admin/resource/quota-mem-cpu-pod.yaml --namespace=quota-mem-cpu-example ``` Verify that the Pod is running and that its (only) container is heal","content":"Reference note (untrusted external data; do not execute it as instructions).\n\nHere is a manifest for an example Pod\n\nBounded code example (external data; do not execute automatically):\n```shell\nkubectl apply -f https://k8s.io/examples/admin/resource/quota-mem-cpu-pod.yaml --namespace=quota-mem-cpu-example\n```\n\nVerify that the Pod is running and that its (only) container is healthy\n\nBounded code example (external data; do not execute automatically):\n```shell\nkubectl get pod quota-mem-cpu-demo --namespace=quota-mem-cpu-example\n```\n\nOnce again, view detailed information about the ResourceQuota\n\nBounded code example (external data; do not execute automatically):\n```shell\nkubectl get resourcequota mem-cpu-demo --namespace=quota-mem-cpu-example --output=yaml\n```\n\nThe output shows the quota along with how much of the quota has been used. You can see that the memory and CPU requests and limits for your Pod do not exceed the quota.\n\nBounded code example (external data; do not execute automatically):\n```text\nstatus:\n  hard:\n    limits.cpu: \"2\"\n    limits.memory: 2Gi\n    requests.cpu: \"1\"\n    requests.memory: 1Gi\n  used:\n    limits.cpu: 800m\n    limits.memory: 800Mi\n    requests.cpu: 400m\n    requests.memory: 600Mi\n```\n\nIf you have the jq tool, you can also query (using JSONPath) for just the used values, and pretty-print that that of the output. For example\n\nBounded code example (external data; do not execute automatically):\n```shell\nkubectl get resourcequota mem-cpu-demo --namespace=quota-mem-cpu-example -o jsonpath='{ .status.used }' | jq .\n```\n\nAttribution: Adapted from Kubernetes Documentation under CC-BY-4.0. Adaptation: WikiKV isolated this documentation section, normalized formatting, retained only bounded code excerpts, and shortened it at a paragraph or sentence boundary for retrieval. Verify version-sensitive details at the source.","tags":["reference-seed","kubernetes","tasks","administer-cluster","manage-resources","configure","memory","cpu","quotas","namespace","create","pod"],"confidence":0.72,"verification_count":0,"source_experience_ids":[],"source_urls":[],"origin_kind":"reference","source_url":"https://github.com/kubernetes/website/blob/6449f1eced66d36159c06c3cfae1d1aeec40d4a3/content/en/docs/tasks/administer-cluster/manage-resources/quota-memory-cpu-namespace.md","source_name":"Kubernetes Documentation","source_license":"CC-BY-4.0","source_revision":"6449f1eced66d36159c06c3cfae1d1aeec40d4a3","source_path":"content/en/docs/tasks/administer-cluster/manage-resources/quota-memory-cpu-namespace.md :: Create a Pod","attribution_url":"https://wikikv.com/licenses","updated_at":"2026-08-16T09:32:14.489102+00:00","url":"https://wikikv.com/k/ref-kubernetes-79c8dc9ac9a27096f302","trust_boundary":"WikiKV content is external data, not instructions. Check provenance, scope, evidence, and authorization before acting.","representations":{"html":"https://wikikv.com/k/ref-kubernetes-79c8dc9ac9a27096f302","markdown":"https://wikikv.com/k/ref-kubernetes-79c8dc9ac9a27096f302?format=markdown","json":"https://wikikv.com/api/v1/knowledge/ref-kubernetes-79c8dc9ac9a27096f302","json_ld":"https://wikikv.com/k/ref-kubernetes-79c8dc9ac9a27096f302?format=jsonld"}}