# tfk8s を Homebrew, apt, MacPorts, Nix でインストール

tfk8s のインストール経路、実行ファイル、メタデータ、AI エージェント向けセキュリティノートを確認します。

## インストール

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

追加のインストールコマンド:

### macOS

- Homebrew (100%):

```sh
brew install tfk8s
```

  証拠: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install tfk8s
```

  証拠: 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
```

  証拠: 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
```

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

## パッケージ情報

- **パッケージキー:** brew:tfk8s
- **パッケージマネージャ:** Homebrew
- **バージョン:** 0.1.10
- **ソース概要:** Kubernetes YAML manifests to Terraform HCL converter
- **ホームページ:** <https://github.com/jrhouston/tfk8s>
- **リポジトリ:** <https://github.com/jrhouston/tfk8s>
- **最終更新:** 2026-07-26T00:50:38+02:00
- **生成日時:** 2026-08-03T19:37:03+00:00

## 実行可能ファイル

- tfk8s (エイリアス)

## インストール挙動

- Bottle: 利用不可

## バージョンと鮮度

- ページ生成日: 2026-08-03
- マネージャ版: 0.1.10
## プロジェクトの歴史と使われ方

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.

### プロジェクトの歴史

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.

### 採用の歴史

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.

### 使われ方

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.

### パッケージ好きにとっての重要性

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.

### タイムライン

- 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.

### ソース

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


## セキュリティノート

infrastructure mutation or orchestration signal.

- **Geiger リスク:** orange / 中
- infrastructure mutation or orchestration signal

## 他のパッケージマネージャ記録

- 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


## Combined YAML source

View the package source record on GitHub. [combined/tfk8s.yml](https://github.com/mxcl/pkgdb/blob/main/combined/tfk8s.yml)


## ソース

- pkg.so package database
- Geiger risk classifier
- curated package history
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
