# Install k2tf with Homebrew, MacPorts, Nix, scoop

Kubernetes YAML to Terraform HCL converter. Version 0.8.0 via Homebrew; verified from local package data.

## Install

```sh
sudo av install brew:k2tf
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install k2tf
```

  Evidence: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install k2tf
```

  Evidence: MacPorts ports tree: sysutils/k2tf/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- Nix (92%):

```sh
nix profile install nixpkgs#k2tf
```

  Evidence: nixpkgs package indexes: pkgs/by-name/k2/k2tf/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

### Windows

- Scoop (92%):

```sh
scoop install main/k2tf
```

  Evidence: Scoop official bucket manifest trees: bucket/k2tf.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1

## Package facts

- **Package key:** brew:k2tf
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/k2tf>
- **Version:** 0.8.0
- **Source summary:** Kubernetes YAML to Terraform HCL converter
- **Homepage:** <https://github.com/sl1pm4t/k2tf>
- **Repository:** <https://github.com/sl1pm4t/k2tf>
- **Upstream docs:** <https://github.com/sl1pm4t/k2tf#readme>
- **License:** MPL-2.0
- **Source archive:** <https://github.com/sl1pm4t/k2tf/archive/refs/tags/v0.8.0.tar.gz>
- **Generated:** 2026-07-08T18:08:21+00:00

## Executables

- k2tf (cli)
- k2tf (alias)

## Build dependencies

- go

## Install behavior

- Post-install hook: not defined
- Bottle: available on arm64_linux, arm64_monterey, arm64_sequoia, arm64_sonoma, arm64_tahoe, arm64_ventura, monterey, sonoma, ventura, x86_64_linux

## Freshness

- Page generated: 2026-07-08
- Package-manager version: 0.8.0
- Local data: ok
- Upstream repository: https://github.com/sl1pm4t/k2tf
- Upstream latest detected: v0.8.0 (current)
- info: No package-manager update timestamp was available.
## Project history and usage

k2tf is a focused converter that turns Kubernetes API objects written as YAML into Terraform HCL suitable for the Terraform Kubernetes provider.

### Project history

The project started publishing releases in February 2019. Its README defines a narrow purpose: convert Kubernetes YAML into Terraform configuration rather than manage clusters or replace Terraform itself.

### Adoption history

k2tf fits teams that already have Kubernetes manifests but want Terraform-managed resources. Its adoption is niche because the need is specific, but package-manager presence in Homebrew, MacPorts, Nix, and Scoop shows enough CLI demand to keep it distributed.

### How it is used

Users feed Kubernetes YAML files or directories to `k2tf` and receive `.tf` output compatible with the Terraform Kubernetes provider. It is most useful during migrations from manifest-based workflows to Terraform-managed Kubernetes resources.

### Why package nerds care

k2tf is a small but very package-nerdy bridge tool: it exists because two declarative ecosystems, Kubernetes YAML and Terraform HCL, overlap without sharing a native file format.

### Timeline

- 2019: k2tf v0.1.0 was released in February.
- 2021: v0.6.0 updated the Terraform Kubernetes provider dependency and noted Homebrew core migration documentation.
- 2024: v0.8.0 was published.

### Related projects

- k2tf is related to the Terraform Kubernetes provider, Kubernetes manifests, and sibling conversion tools such as tfk8s.

### Sources

- <https://github.com/jrhouston/tfk8s>
- <https://github.com/sl1pm4t/k2tf>
- <https://github.com/sl1pm4t/k2tf/releases/tag/v0.1.0>
- <https://github.com/sl1pm4t/k2tf/releases/tag/v0.6.0>
- <https://registry.terraform.io/providers/hashicorp/kubernetes/latest/docs>


## Security Notes

infrastructure mutation or orchestration signal.

- **Geiger risk:** orange / medium
- infrastructure mutation or orchestration signal

## Source Database Details

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** k2tf
- **Version Scheme:** 0
- **Revision:** 0
- **Head Version:** HEAD
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** head, stable

## Other Package-Manager Records

- Nix - k2tf: normalized package name match | nixpkgs package indexes: pkgs/by-name/k2/k2tf/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- MacPorts - k2tf: normalized package name match | MacPorts ports tree: sysutils/k2tf/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1
- Scoop - main/k2tf: normalized package name match | Scoop official bucket manifest trees: bucket/k2tf.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1


## Related links

- [Cloud CLI packages](https://www.automicvault.com/pkg/cloud-clis/) - Belongs to a cloud or infrastructure command family.
- [Source-control packages](https://www.automicvault.com/pkg/source-control-tools/) - Belongs to a source-control command family.
- [Secret-risk packages](https://www.automicvault.com/pkg/secret-risk-packages/) - Has protected-tool coverage, approval-gate, or non-low Geiger security signals.
- [Terminal utility packages](https://www.automicvault.com/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [go](https://www.automicvault.com/pkg/brew/go/) - Build dependency declared by Homebrew.
- [iam-policy-json-to-terraform](https://www.automicvault.com/pkg/brew/iam-policy-json-to-terraform/) - Shares av.db curated category or tags: cli, converter, developer-tools, infrastructure-as-code, terraform.
- [tfk8s](https://www.automicvault.com/pkg/brew/tfk8s/) - Shares av.db curated category or tags: cli, converter, developer-tools, hcl, kubernetes.
- [terraform-inventory](https://www.automicvault.com/pkg/brew/terraform-inventory/) - Shares av.db curated category or tags: cli, developer-tools, infrastructure-as-code, terraform.
- [terraform-module-versions](https://www.automicvault.com/pkg/brew/terraform-module-versions/) - Shares av.db curated category or tags: cli, developer-tools, infrastructure-as-code, terraform.
- [terraform_landscape](https://www.automicvault.com/pkg/brew/terraform-landscape/) - Shares av.db curated category or tags: cli, developer-tools, infrastructure-as-code, terraform.
- [terragrunt](https://www.automicvault.com/pkg/brew/terragrunt/) - Shares av.db curated category or tags: cli, developer-tools, infrastructure-as-code, terraform.
- [terrahash](https://www.automicvault.com/pkg/brew/terrahash/) - Shares av.db curated category or tags: cli, developer-tools, infrastructure-as-code, terraform.
- [terrahelp](https://www.automicvault.com/pkg/brew/terrahelp/) - Shares av.db curated category or tags: cli, developer-tools, infrastructure-as-code, terraform.

## Combined YAML source

View the package source record on GitHub. [combined/k2tf.yml](https://github.com/automic-vault/db/blob/main/combined/k2tf.yml)


## Sources

- Nucleus package database
- Geiger risk classifier
- package-page enrichment
- curated package history
- package version freshness
- av.db category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
