OC-ADM-INSPECT(1)
OC ADM(1) (oc adm inspect) π
Okay bestie, so this page is from the OC ADM manual, and it's literally all about oc adm inspect. Let's get into it! π«Ά
β¨ NAME β¨
oc adm inspect: collect debugging data for a given resource. That's the whole vibe. π
π οΈ SYNOPSIS π οΈ
oc adm inspect [OPTIONS]
That's the whole command line, no cap.
πΈ DESCRIPTION πΈ
So like, this command gathers debugging information for a resource.
It downloads the specified resource and any related resources, all for the purpose of gathering debugging information. It's giving detective energy, honestly. π
β¨ OPTIONS β¨
-A,--all-namespaces=falseβ if you include this, it lists the requested object(s) across all namespaces. The namespace in the current context is ignored even if you specify it with--namespace. So like, it's the "all the namespaces" button, periodt. π--as=""β username to impersonate for the operation. The user could be a regular user or a service account in a namespace. Like, you're cosplaying as someone else, lowkey. π--as-group=[]β group to impersonate for the operation. This flag can be repeated to specify multiple groups. So you can stack 'em up, bestie. π--as-uid=""β UID to impersonate for the operation. It's giving "who am I really" energy. π--as-user-extra=[]β user extras to impersonate for the operation. This flag can be repeated to specify multiple values for the same key. So like, you can add all the extra bits, periodt. π--cache-dir="/homeless-shelter/.kube/cache"β default cache directory. Like, it's where stuff gets cached, you know? π--certificate-authority=""β path to a cert file for the certificate authority. So like, the CA cert goes here. π--client-certificate=""β path to a client certificate file for TLS. For when you need to prove who you are. πͺͺ--client-key=""β path to a client key file for TLS. The secret sauce to your client certificate. π--cluster=""β the name of the kubeconfig cluster to use. So like, which cluster are we talking to? π--context=""β the name of the kubeconfig context to use. It's the vibe of your kubeconfig, honestly. π―--dest-dir=""β root directory used for storing all gathered cluster operator data. It defaults to$(PWD)/inspect.local.<rand>. So like, if you don't specify, it makes a random folder in your current directory. π--disable-compression=falseβ if true, opt-out of response compression for all requests to the server. So like, no compression, no problem? π--events-file=""β a path to anevents.jsonfile to create a HTML page from. So like, you give it a JSON file and it makes a little HTML page. Cute! π¨--insecure-skip-tls-verify=falseβ if true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure. So like, only do this if you're feeling risky, bestie. π
This will make your HTTPS connections insecure, so like, be careful! π₯
--kubeconfig=""β path to the kubeconfig file to use for CLI requests. So like, where's your kubeconfig at? π-n,--namespace=""β if present, the namespace scope for this CLI request. So like, which namespace are we poking around in? π΅οΈ--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. So like, zero means wait forever, which is giving patient queen energy. π-s,--server=""β the address and port of the Kubernetes API server. So like, where's the server at? π--since=0β only return logs newer than a relative duration like5s,2m, or3h. It defaults to all logs. Only one ofsince-time/sincemay be used. So like, it's a time filter for logs. β°--since-time=""β only return logs after a specific date (RFC3339). It defaults to all logs. Only one ofsince-time/sincemay be used. So like, you can specify an exact date, but you can't use both. ποΈ--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. So like, it's the name on the certificate. π--token=""β bearer token for authentication to the API server. It's like your VIP pass. ποΈ--user=""β the name of the kubeconfig user to use. So like, which user are we? π€
π OPTIONS INHERITED FROM PARENT COMMANDS π
--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. So like, it's a preferences file, but you can turn it off if you want. π--match-server-version=falseβ require server version to match client version. So like, if you want them to be exactly the same, this is your flag. π―--profile="none"β name of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex). So like, you can profile all the things. π--profile-output="profile.pprof"β name of the file to write the profile to. So like, where does the profile go? π--warnings-as-errors=falseβ treat warnings received from the server as errors and exit with a non-zero exit code. So like, warnings become errors, periodt. π
π¦ EXAMPLE π¦
Here are some iconic examples, bestie:
# Collect debugging data for the "openshift-apiserver" clusteroperator
oc adm inspect clusteroperator/openshift-apiserver
# Collect debugging data for the "openshift-apiserver" and "kube-apiserver" clusteroperators
oc adm inspect clusteroperator/openshift-apiserver clusteroperator/kube-apiserver
# Collect debugging data for all clusteroperators
oc adm inspect clusteroperator
# Collect debugging data for all clusteroperators and clusterversions
oc adm inspect clusteroperators,clusterversions
π SEE ALSO π
oc-adm(1), that's the parent command, so go check it out if you want the full picture. π
π HISTORY π
June 2016, ported from the Kubernetes man-doc generator. So like, this page has been around for a minute, but it's still iconic. π
This page is from the Openshift CLI User Manuals, part of the OC ADM(1) family, and it was last updated in June 2016. Stay slay, bestie! πβ¨
π¦ 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