OC(1)

πŸ“¦
version 4.22.0 Β· 2 versions
, in nixpkgs unstable

🌸 OC(1) β€” the oc idle glow-up 🌸

okay bestie, so this is the manual for oc idle, which is part of the OpenShift CLI user manuals, and it's giving "let's put your scalable resources to sleep so they can wake up later when someone actually needs them." lowkey iconic. it's from June 2016 and was ported from the Kubernetes man-doc generator, so it's got history, periodt. 🫢


✨ NAME ✨

oc idle β€” idle scalable resources. literally just letting your stuff chill until traffic shows up. πŸ’€


πŸ¦‹ SYNOPSIS πŸ¦‹

oc idle [OPTIONS]

πŸŽ€ DESCRIPTION πŸŽ€

Okay so here's the tea: oc idle idles scalable resources. simple as that. πŸ’…

Idling works by discovering the scalable resources (think deployment configs and replication controllers) that are associated with a series of services. it does this by examining the endpoints of the service β€” yes, it's doing detective work, main character energy. πŸ”

Each service is then marked as idled, the associated resources are recorded, and the resources are scaled down to zero replicas. zero. nada. they're napping. 😴

But here's the cute part: upon receiving network traffic, the services (and any associated routes) will "wake up" the associated resources by scaling them back up to their previous scale. it's giving sleepover and then everyone wakes up for breakfast. 🌈✨


πŸ’– OPTIONS πŸ’–

  • --all=false β€” if true, select all services in the namespace. like, all of them. every single one. no cap. πŸ‘‘
  • -A, --all-namespaces=false β€” if true, select services across all namespaces. not just your little corner of the cluster, bestie. 🌍
  • --dry-run=false β€” If true, only print the annotations that would be written, without annotating or idling the relevant objects. it's a preview era. nothing actually happens. πŸ™ˆ
  • --resource-names-file="" β€” file containing list of services whose scalable resources to idle. yes, a whole file. organized queen behavior. πŸ“„
  • -l, --selector="" β€” Selector (label query) to use to select services. use your labels to pick the chosen ones. 🎯

🌟 OPTIONS INHERITED FROM PARENT COMMANDS 🌟

these are the flags that come from the parent command, and they're lowkey important, so don't skip them. fr fr.

  • --as="" β€” Username to impersonate for the operation. User could be a regular user or a service account in a namespace. basically cosplay, but for auth. 🎭
  • --as-group=[] β€” Group to impersonate for the operation, this flag can be repeated to specify multiple groups. stack 'em up. 🫢
  • --as-uid="" β€” UID to impersonate for the operation. yes, you can pick the UID too. πŸ’…
  • --as-user-extra=[] β€” User extras to impersonate for the operation, this flag can be repeated to specify multiple values for the same key. extra extra, read all about it. πŸ“°
  • --cache-dir="/homeless-shelter/.kube/cache" β€” Default cache directory. that path is literally what it is. don't @ me. πŸ—‚οΈ
  • --certificate-authority="" β€” Path to a cert file for the certificate authority. trust issues? solved. πŸ”
  • --client-certificate="" β€” Path to a client certificate file for TLS. it's giving secure. πŸ›‘οΈ
  • --client-key="" β€” Path to a client key file for TLS. keep it secret, keep it safe. 🀫
  • --cluster="" β€” The name of the kubeconfig cluster to use. pick your cluster, bestie. ☁️
  • --context="" β€” The name of the kubeconfig context to use. context is everything. πŸ’β€β™€οΈ
  • --disable-compression=false β€” If true, opt-out of response compression for all requests to the server. no compression, no problem. πŸ“¦
  • --insecure-skip-tls-verify=false β€” If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure. ⚠️ okay so this one is a big yikes β€” it literally makes your HTTPS insecure. use with caution, bestie. 🚨
  • --kubeconfig="" β€” Path to the kubeconfig file to use for CLI requests. your config, your rules. πŸ“
  • --kuberc="" β€” Path to the kuberc file to use for preferences. This can be disabled by exporting KUBECTL_KUBERC=false feature gate or turning off the feature KUBERC=off. preferences era. βš™οΈ
  • --match-server-version=false β€” Require server version to match client version. matchy matchy. 🧦
  • -n, --namespace="" β€” If present, the namespace scope for this CLI request. stay in your lane, but make it a namespace. 🚧
  • --profile="none" β€” Name of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex). pick your profile, queen. πŸ“Š
  • --profile-output="profile.pprof" β€” Name of the file to write the profile to. default is literally profile.pprof. πŸ’Ύ
  • --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. it's giving "we'll figure it out." πŸ€·β€β™€οΈ
  • --token="" β€” Bearer token for authentication to the API server. your VIP pass. 🎟️
  • --user="" β€” The name of the kubeconfig user to use. who are you today? πŸ’ƒ
  • --warnings-as-errors=false β€” Treat warnings received from the server as errors and exit with a non-zero exit code. no warnings allowed, only drama. πŸ’€

πŸ”₯ EXAMPLE πŸ”₯

# Idle the scalable controllers associated with the services listed in to-idle.txt
$ oc idle --resource-names-file to-idle.txt

see? simple. put your service names in a file, run the command, and let the idling begin. ✨


πŸ‘€ SEE ALSO πŸ‘€

oc(1), β€” go check out the main character, oc. πŸ‘‘


πŸ“œ HISTORY πŸ“œ

June 2016, Ported from the Kubernetes man-doc generator. a classic. 🧚


Openshift CLI User Manuals β€” and that's the vibe. this page is from Openshift, dated June 2016, and it's all about OC(1). slay. πŸ’…βœ¨

πŸ“¦ where this page comes from