# Install tfk8s with Homebrew, apt, MacPorts, Nix

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

## Install

```sh
sudo av install brew:tfk8s
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install tfk8s
```

  Evidence: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install tfk8s
```

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

### Linux

- Debian apt (92%):

```sh
sudo apt install tfk8s
```

  Evidence: Debian stable package indexes: tfk8s from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

- Nix (92%):

```sh
nix profile install nixpkgs#tfk8s
```

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

## Package facts

- **Package key:** brew:tfk8s
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/tfk8s>
- **Version:** 0.1.10
- **Source summary:** Kubernetes YAML manifests to Terraform HCL converter
- **Homepage:** <https://github.com/jrhouston/tfk8s>
- **Repository:** <https://github.com/jrhouston/tfk8s>
- **Upstream docs:** <https://github.com/jrhouston/tfk8s>
- **License:** MIT
- **Source archive:** <https://github.com/jrhouston/tfk8s/archive/refs/tags/v0.1.10.tar.gz>
- **Generated:** 2026-07-08T18:08:21+00:00

## Executables

- tfk8s (cli)
- tfk8s (alias)

## Build dependencies

- go

## Install behavior

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

## Freshness

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

tfk8s is a Go CLI for converting Kubernetes YAML manifests into Terraform HCL for the Terraform Kubernetes provider. Its README frames the tool around copying examples from Kubernetes documentation or migrating existing YAML manifests without hand-converting them to HCL.

### Project history

The project occupies the bridge between Kubernetes YAML workflows and Terraform-managed Kubernetes resources. The README focuses on practical conversions: YAML files to `.tf`, `kubectl get ... -o yaml` piped through tfk8s, Helm template output converted to Terraform, and recursive conversion of manifest trees.

The release history is compact but focused. GitHub lists v0.1.10 as the latest release, with v0.1.x releases adding fixes such as stripping generated fields, supporting `generateName`, handling heredoc strings, ignoring empty YAML documents, and removing a dependency on the Terraform project.

### Adoption history

The repository shows about a thousand GitHub stars and is packaged by Homebrew, Debian, Ubuntu, MacPorts, and Nix according to the input metadata. That is broad packaging for a narrow converter, suggesting sustained utility for users moving between Kubernetes-native and Terraform-native representations.

Its adoption niche is migration and copy-paste ergonomics: developers can bring Kubernetes examples, Helm output, or live-cluster YAML into Terraform code review without manually mapping every object into HCL.

### How it is used

The standard workflow is `tfk8s -f input.yaml -o output.tf` or piping YAML into stdin and redirecting HCL. Flags include input/output file selection, map-only output, provider alias population, stripping server-side fields, quote-stripping for map keys, and version display.

The README documents use with `kubectl`, Helm, and `find`, making it useful in shell pipelines rather than only as an interactive conversion tool.

### Why package nerds care

tfk8s is package-nerd interesting because it is a format converter with a very clear boundary: Kubernetes YAML in, Terraform HCL out. It reduces a boring migration chore and fits naturally as a small CLI installed from a system package manager.

Its presence in multiple package ecosystems makes it easier to use in CI and migration scripts without vendoring a custom converter into every repository.

### Timeline

- 2022: Repository page lists v0.1.10 as the latest release.
- 2022: v0.1.x release notes record support and cleanup for generated fields, `generateName`, heredoc strings, empty YAML documents, and Terraform dependency removal.

### Related projects

- Terraform Kubernetes Provider is the target provider named by the README.
- `kubectl` and Helm are documented input producers for tfk8s conversion workflows.

### Sources

- <https://github.com/jrhouston/tfk8s>
- <https://github.com/jrhouston/tfk8s/releases>
- source_facts.package-manager


## 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:** tfk8s
- **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

- Debian apt - tfk8s - 0.1.10-2+b10: normalized package name match | Debian stable package indexes: tfk8s from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Tool for converting Kubernetes YAML manifests to Terraform HCL | https://github.com/jrhouston/tfk8s
- Nix - tfk8s: normalized package name match | nixpkgs package indexes: pkgs/by-name/tf/tfk8s/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - tfk8s - 0.1.10-2: normalized package name match | Ubuntu 24.04 LTS package indexes: tfk8s from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Tool for converting Kubernetes YAML manifests to Terraform HCL | https://github.com/jrhouston/tfk8s
- MacPorts - tfk8s: normalized package name match | MacPorts ports tree: sysutils/tfk8s/Portfile from https://api.github.com/repos/macports/macports-ports/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.
- [k2tf](https://www.automicvault.com/pkg/brew/k2tf/) - Shares av.db curated category or tags: cli, converter, developer-tools, hcl, kubernetes.
- [html2markdown](https://www.automicvault.com/pkg/brew/html2markdown/) - Shares av.db curated category or tags: cli, conversion, converter, developer-tools.
- [html2text](https://www.automicvault.com/pkg/brew/html2text/) - Shares av.db curated category or tags: cli, conversion, converter, developer-tools.
- [htmldoc](https://www.automicvault.com/pkg/brew/htmldoc/) - Shares av.db curated category or tags: cli, conversion, converter, developer-tools.
- [tfenv](https://www.automicvault.com/pkg/brew/tfenv/) - Shares av.db curated category or tags: cli, developer-tools, infrastructure, terraform.
- [tfmcp](https://www.automicvault.com/pkg/brew/tfmcp/) - Shares av.db curated category or tags: cli, developer-tools, infrastructure, terraform.
- [tfmigrate](https://www.automicvault.com/pkg/brew/tfmigrate/) - Shares av.db curated category or tags: cli, developer-tools, infrastructure, terraform.
- [tfmv](https://www.automicvault.com/pkg/brew/tfmv/) - Shares av.db curated category or tags: cli, developer-tools, infrastructure, terraform.
- [dhall-yaml](https://www.automicvault.com/pkg/brew/dhall-yaml/) - Both packages work with overlapping file formats or content types. Shared terms: cli, conversion, converter, developer, developer-tools.
- [hcl2json](https://www.automicvault.com/pkg/brew/hcl2json/) - Local package facts share a topical domain. Shared terms: cli, conversion, developer, developer-tools, hcl.

## Combined YAML source

View the package source record on GitHub. [combined/tfk8s.yml](https://github.com/automic-vault/db/blob/main/combined/tfk8s.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
