OC-ADM-TOP-POD(1)
π OC ADM TOP POD β bestie edition β¨
okay so this is the oc adm top manual, specifically for the pod subcommand β it lives in the OpenShift CLI User Manuals, and honestly? iconic. it's from June 2016, ported from the Kubernetes man-doc generator, and we're gonna get into all of it. no cap.
πΈ NAME πΈ
oc adm top pod β display resource (CPU/memory) usage of pods. that's the whole vibe. we're checking how much CPU and memory your pods are eating, and it's giving observability main character energy. π
π¦ SYNOPSIS π¦
oc adm top pod [OPTIONS]
literally just that. add flags as needed, bestie. β¨
π DESCRIPTION π
okay so oc adm top pod shows you the resource (CPU/memory) usage of pods. that's it, that's the pitch.
the top pod command is your bestie for seeing the resource consumption of pods. it's like a vibe check for your cluster, but for CPU and memory instead of outfits. π₯
β οΈ important heads-up: due to the metrics pipeline delay, metrics may be unavailable for a few minutes since pod creation. so if you just made a pod and top is acting brand new and showing nothing? that's why. give it a minute, it's not ghosting you, it's just buffering. π
β¨ OPTIONS β¨
-A,--all-namespaces=falseβ if present, list the requested object(s) across all namespaces. the namespace in current context is ignored even if you specified it with--namespace. so basically: flag goes on, namespace filter gets left on read. π--containers=falseβ if present, print usage of containers within a pod. the pod-level usage is cute, but this is the behind-the-scenes tea for each container. π«Ά--field-selector=""β selector (field query) to filter on, supports=,==, and!=. (e.g.--field-selector key1=value1,key2=value2). just know the server only supports a limited number of field queries per type, so don't go wild. π--no-headers=falseβ if present, print output without headers. minimalism slay. no column titles, just the data. π-l,--selector=""β selector (label query) to filter on, supports=,==,!=,in,notin. (e.g.-l key1=value1,key2=value2,key3 in (value3)). matching objects must satisfy all of the specified label constraints β it's giving "all conditions must be met" energy. π―--show-swap=falseβ print pod resources related to swap memory. lowkey niche but if swap is your thing, this is your moment. π--sort-by=""β if non-empty, sort pods list using specified field. the field can be eithercpuormemory. so you can sort by who's the hungriest. π₯--sum=falseβ print the sum of the resource usage. one big total instead of the whole list. math girlies rise. β--use-protocol-buffers=trueβ enables using protocol-buffers to access Metrics API. defaults totrue, and it's giving efficient communication energy. β¨
π§ OPTIONS INHERITED FROM PARENT COMMANDS π§
these are the flags that came from the parent commands, and yes, we're covering every single one because bestie deserves the full picture. π«Ά
--as=""β username to impersonate for the operation. user could be a regular user or a service account in a namespace. very undercover, very sneaky. π--as-group=[]β group to impersonate for the operation. this flag can be repeated to specify multiple groups. stack 'em. π--as-uid=""β UID to impersonate for the operation. for when you need to be that specific user. π--as-user-extra=[]β user extras to impersonate for the operation. this flag can be repeated to specify multiple values for the same key. yes, repeatable. yes, extra. obviously. π--cache-dir="/homeless-shelter/.kube/cache"β default cache directory. that's the path, character for character. don't ask why it's calledhomeless-shelter, that's just where the build lived. π--certificate-authority=""β path to a cert file for the certificate authority. TLS security said "let me verify." π--client-certificate=""β path to a client certificate file for TLS. another cert, another vibe. π--client-key=""β path to a client key file for TLS. keep it safe, bestie. ποΈ--cluster=""β the name of the kubeconfig cluster to use. pick your cluster like you pick your playlist. π--context=""β the name of the kubeconfig context to use. same energy, different setting. β¨--disable-compression=falseβ if true, opt-out of response compression for all requests to the server. sometimes you just want the raw data, no zip. π«Ά--insecure-skip-tls-verify=falseβ if true, the server's certificate will not be checked for validity. β οΈ this will make your HTTPS connections insecure. like, actually dangerous. do not do this casually, bestie, this is not a "slay" moment, this is a "security risk" moment. π--kubeconfig=""β path to the kubeconfig file to use for CLI requests. point the CLI at your config and let it cook. π--kuberc=""β path to the kuberc file to use for preferences. this can be disabled by exportingKUBECTL_KUBERC=falsefeature gate or turning off the featureKUBERC=off. your RC file, your rules. π--match-server-version=falseβ require server version to match client version. strict vibes only. π-n,--namespace=""β if present, the namespace scope for this CLI request. scope your request like you scope your feed. πΈ--profile="none"β name of profile to capture. one of(none|cpu|heap|goroutine|threadcreate|block|mutex). that's the full list, don't invent new ones, bestie. π§--profile-output="profile.pprof"β name of the file to write the profile to. default isprofile.pprof, literally. π--request-timeout="0"β the length of time to wait before giving up on a single server request. non-zero values should contain a corresponding time unit (e.g.1s,2m,3h). a value of zero means don't timeout requests. zero = patience of a saint. π-s,--server=""β the address and port of the Kubernetes API server. where the magic happens. β¨--tls-server-name=""β server name to use for server certificate validation. if it is not provided, the hostname used to contact the server is used. default behavior is right there, no need to overthink. π«Ά--token=""β bearer token for authentication to the API server. keep it secret, keep it safe. π€«--user=""β the name of the kubeconfig user to use. who are you today? main character, obviously. π--warnings-as-errors=falseβ treat warnings received from the server as errors and exit with a non-zero exit code. zero tolerance policy activated. π₯
π EXAMPLE π
bestie, here are the examples β they're literally in the manual and we're keeping them exactly as they are. periodt. π
# Show metrics for all pods in the default namespace
oc adm top pod
# Show metrics for all pods in the given namespace
oc adm top pod --namespace=NAMESPACE
# Show metrics for a given pod and its containers
oc adm top pod POD_NAME --containers
# Show metrics for the pods defined by label name=myLabel
oc adm top pod -l name=myLabel
π SEE ALSO π
that's the one reference, and yes, we're keeping the trailing comma because that's what the original does. character for character, no fixing. π
π HISTORY π
June 2016 β ported from the Kubernetes man-doc generator. a whole era. the manual was born and it ate. β¨
okay so that's the whole page. this OpenShift CLI User Manuals entry is from June 2016, ported from the Kubernetes man-doc generator, and it's giving vintage-but-still-relevant energy. go check your pods' CPU and memory usage, bestie. slay. π β¨π¦
π¦ where this page comes from
- nixpkgs unstable: openshift 4.22.0-202605222050
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms