🍺 BREW Explorer

← all formulae

k2tf

brew install k2tf v0.8.0 MPL-2.0

Kubernetes YAML to Terraform HCL converter

21
30-day installs · #6647
54
90-day · #7110
349
365-day · #5961
1.2k
★ GitHub stars · updated 8mo ago

Build dependencies

go

GitHub topics

command-line-tool converter hashicorp hashicorp-terraform hcl kubernetes terraform tool utility yaml

Links

Raw metadata
{
  "aliases": [],
  "alternatives": [],
  "build_dependencies": [
    "go"
  ],
  "categories": [],
  "caveats": null,
  "conflicts_with": [],
  "dependencies": [],
  "deprecated": 0,
  "deprecation_reason": null,
  "desc": "Kubernetes YAML to Terraform HCL converter",
  "disable_reason": null,
  "disabled": 0,
  "enrichment_fetched_at": "2026-06-20T23:39:09+00:00",
  "first_seen": "2026-06-20T23:34:18+00:00",
  "full_name": "k2tf",
  "github_default_branch": "main",
  "github_last_commit_at": "2025-12-12T14:11:18Z",
  "github_readme_excerpt": "# k2tf - Kubernetes YAML to Terraform HCL converter\n\n[![Build Status](https://cloud.drone.io/api/badges/sl1pm4t/k2tf/status.svg)](https://cloud.drone.io/sl1pm4t/k2tf)\n[![Go Report Card](https://goreportcard.com/badge/github.com/sl1pm4t/k2tf?)](https://goreportcard.com/report/github.com/sl1pm4t/k2tf)\n[![Release](https://img.shields.io/github/release-pre/sl1pm4t/k2tf.svg)](https://github.com/sl1pm4t/k2tf/releases)\n\nA tool for converting Kubernetes API Objects (in YAML format) into HashiCorp\u0027s Terraform configuration language.\n\nThe converted `.tf` files are suitable for use with the [Terraform Kubernetes Provider](https://www.terraform.io/docs/providers/kubernetes/index.html)\n\n[![asciicast](https://asciinema.org/a/5LzAc7Eha7w7dwrktAxcMdpIc.svg)](https://asciinema.org/a/5LzAc7Eha7w7dwrktAxcMdpIc)\n\n## Installation\n\n**Pre-built Binaries**\n\nDownload Binary from GitHub [releases](https://github.com/sl1pm4t/k2tf/releases/latest) page.\n\n**Build from source**\n\n_See below_\n\n**Homebrew**\n\n```\n$ brew install k2tf\n```\n**asdf**\n\nUse the [asdf-k2tf](https://github.com/carlduevel/asdf-k2tf) plugin.\n\n\n## Example Usage\n\n**Convert a single YAML file and write generated Terraform config to Stdout**\n\n```\n$ k2tf -f test-fixtures/service.yaml\n```\n\n**Convert a single YAML file and write output to file**\n\n```\n$ k2tf -f test-fixtures/service.yaml -o service.tf\n```\n\n**Convert a directory of Kubernetes YAML files**\n\n```\n$ k2tf -f test-fixtures/\n```\n\n**Read \u0026 convert Kubernetes objects directly from a cluster**\n\n```\n$ kubectl get deployments -o yaml | ./k2tf -o deployments.tf\n```\n\n## Building\n\n\u003e **NOTE** Requires a working Golang build environment.\n\nThis project uses Golang modules for dependency management, so it can be cloned outside of the `$GOPATH`.\n\n**Clone the repository**\n\n```\n$ git clone https://github.com/sl1pm4t/k2tf.git\n```\n\n**Build**\n\n```\n$ cd k2tf\n$ make build\n```\n\n**Run Tests**\n\n```\n$ make test\n```\n\n---\n\n[![Downloads](https://img.shields.io/github/downloads/sl1pm4t/k2tf/total.svg)](",
  "github_repo": "sl1pm4t/k2tf",
  "github_stars": 1230,
  "github_topics": [
    "command-line-tool",
    "converter",
    "hashicorp",
    "hashicorp-terraform",
    "hcl",
    "kubernetes",
    "terraform",
    "tool",
    "utility",
    "yaml"
  ],
  "homepage": "https://github.com/sl1pm4t/k2tf",
  "homepage_og_description": null,
  "homepage_og_image": null,
  "homepage_title": null,
  "installs_30d": 21,
  "installs_365d": 349,
  "installs_90d": 54,
  "keg_only": 0,
  "keg_only_reason": null,
  "last_seen": "2026-06-20T23:34:18+00:00",
  "license": "MPL-2.0",
  "llm_generated_at": null,
  "llm_model": null,
  "name": "k2tf",
  "oldnames": [],
  "one_liner": null,
  "optional_dependencies": [],
  "rank_30d": 6647,
  "rank_365d": 5961,
  "rank_90d": 7110,
  "raw_hash": "c6a2d358ecc27b05",
  "recommended_dependencies": [],
  "revision": 0,
  "ruby_source_path": "Formula/k/k2tf.rb",
  "tap": "homebrew/core",
  "test_dependencies": [],
  "uses_from_macos": [],
  "version_head": "HEAD",
  "version_stable": "0.8.0",
  "versioned_formulae": [],
  "why_use_this": null
}