← All recipes
Moderne licensed

Find Kubernetes resources

Recipe IDorg.openrewrite.kubernetes.search.FindKubernetesResourcesArtifactorg.openrewrite.recipe:rewrite-kubernetes

An inventory of every Kubernetes resource in a repository, one row per YAML document. The pod spec path column reports where each kind keeps its containers, so the workloads this module cannot reach are counted rather than quietly skipped.

Single recipeProprietary

Usage

This recipe has no required configuration options. You’ll need the Moderne CLI configured before running the command below.

mod run . --recipe org.openrewrite.kubernetes.search.FindKubernetesResources

If the recipe isn’t available locally, install it with:

mod config recipes jar install org.openrewrite.recipe:rewrite-kubernetes:RELEASE

Options

NameTypeDescription
apiVersionStringOnly inventory resources on this API version. This is a glob expression, so apps/* takes a whole group. When omitted, every resource is inventoried.
e.g. apps/v1
kindStringOnly inventory resources of this kind. This is a glob expression. When omitted, every resource is inventoried.
e.g. Deployment
fileMatcherStringMatching files will be searched. This is a glob expression.
e.g. **/*.yml

Data tables

Structured output this recipe can produce.

  • Kubernetes resourcesEvery Kubernetes resource declared in the repository, one row per YAML document.org.openrewrite.kubernetes.table.KubernetesResources
  • Source files that had resultsSource files that were modified by the recipe run.org.openrewrite.table.SourcesFileResults
  • Source files that had search resultsSearch results that were found during the recipe run.org.openrewrite.table.SearchResults
  • Source files that errored on a recipeThe details of all errors produced by a recipe run.org.openrewrite.table.SourcesFileErrors
  • Recipe performanceStatistics used in analyzing the performance of recipes.org.openrewrite.table.RecipeRunStats