OS Manuals

/usr/bin/kor

A Golang Tool to discover unused Kubernetes Resources

From kor 0.6.8-r5 (os), captured 2026-11-05 by running kor --help (exit 0). permalink

Also provided by 1 other package version
kor is a CLI to discover unused Kubernetes resources
	kor can currently discover unused configmaps and secrets

Usage:
  kor [flags]
  kor [command]

Available Commands:
  all                      Gets unused resources
  clusterrole              Gets unused cluster roles
  clusterrolebinding       Gets unused cluster role bindings
  completion               Generate the autocompletion script for the specified shell
  configmap                Gets unused configmaps
  customresourcedefinition Gets unused crds
  daemonset                Gets unused daemonSets
  deployment               Gets unused deployments
  exporter                 start prometheus exporter
  finalizer                Gets resources waiting for finalizers to delete
  help                     Help about any command
  horizontalpodautoscaler  Gets unused hpas
  ingress                  Gets unused ingresses
  job                      Gets unused jobs
  networkpolicy            Gets unused networkpolicies
  persistentvolume         Gets unused pvs
  persistentvolumeclaim    Gets unused pvcs
  pod                      Gets unused pods
  poddisruptionbudget      Gets unused pdbs
  priorityclass            Gets unused priorityClasses
  replicaset               Gets unused replicaSets
  role                     Gets unused roles
  rolebinding              Gets unused role bindings
  secret                   Gets unused secrets
  service                  Gets unused services
  serviceaccount           Gets unused service accounts
  statefulset              Gets unused statefulSets
  storageclass             Gets unused storageClasses
  version                  Print kor version information
  volumeattachment         Gets unused volumeattachments

Flags:
      --cluster-name string          Override the cluster name shown in CLI output and Slack notifications
      --delete                       Delete unused resources
  -l, --exclude-labels strings       Selector to filter out, Example: --exclude-labels key1=value1,key2=value2. If --include-labels is set, --exclude-labels will be ignored
  -e, --exclude-namespaces strings   Namespaces to be excluded, split by commas. Example: --exclude-namespaces ns1,ns2,ns3. If --include-namespaces is set, --exclude-namespaces will be ignored
      --group-by string              Group output by (namespace, resource) (default "namespace")
  -h, --help                         help for kor
      --ignore-owner-references      Skip resources that have ownerReferences set (for all resource types)
      --include-labels string        Selector to filter in, Example: --include-labels key1=value1 (currently supports one label)
  -n, --include-namespaces strings   Namespaces to run on, split by commas. Example: --include-namespaces ns1,ns2,ns3. If set, non-namespaced resources will be ignored
  -k, --kubeconfig string            Path to kubeconfig file (optional)
      --newer-than string            The maximum age of the resources to be considered unused. This flag cannot be used together with older-than flag. Example: --newer-than=1h2m
      --no-interactive               Do not prompt for confirmation when deleting resources. Be careful when using this flag!
      --older-than string            The minimum age of the resources to be considered unused. This flag cannot be used together with newer-than flag. Example: --older-than=1h2m
  -o, --output string                Output format (table, json or yaml) (default "table")
      --show-reason                  Print reason resource is considered unused
      --slack-auth-token string      Slack auth token to send notifications to, requires --slack-channel to be set
      --slack-channel string         Slack channel to send notifications to, requires --slack-auth-token to be set
      --slack-webhook-url string     Slack webhook URL to send notifications to
  -v, --verbose                      Verbose output (print empty namespaces)

Use "kor [command] --help" for more information about a command.
Options (19)
OptionDescriptionSource
--cluster-name stringOverride the cluster name shown in CLI output and Slack notificationshelp
--deleteDelete unused resourceshelp
-l, --exclude-labels stringsSelector to filter out, Example: --exclude-labels key1=value1,key2=value2.help
-e, --exclude-namespaces stringsNamespaces to be excluded, split by commas.help
--group-by stringGroup output by (namespace, resource) (default "namespace")help
-h, --helphelp for korhelp
--ignore-owner-referencesSkip resources that have ownerReferences set (for all resource types)help
--include-labels stringSelector to filter in, Example: --include-labels key1=value1 (currently supports one label)help
-n, --include-namespaces stringsNamespaces to run on, split by commas.help
-k, --kubeconfig stringPath to kubeconfig file (optional)help
--newer-than stringThe maximum age of the resources to be considered unused.help
--no-interactiveDo not prompt for confirmation when deleting resources.help
--older-than stringThe minimum age of the resources to be considered unused.help
-o, --output stringOutput format (table, json or yaml) (default "table")help
--show-reasonPrint reason resource is considered unusedhelp
--slack-auth-token stringSlack auth token to send notifications to, requires --slack-channel to be sethelp
--slack-channel stringSlack channel to send notifications to, requires --slack-auth-token to be sethelp
--slack-webhook-url stringSlack webhook URL to send notifications tohelp
-v, --verboseVerbose output (print empty namespaces)help

Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.