# sl1pm4t/k2tf

Kubernetes YAML to Terraform HCL converter

Repository: https://github.com/sl1pm4t/k2tf
Canonical: https://ross.abutalabs.com/products/k2tf
Language: Go
License: MPL-2.0
License Family: copyleft
Topics: terraform, kubernetes, yaml, hcl, tool, utility, command-line-tool, converter, hashicorp, hashicorp-terraform
Last push: 2025-12-12T14:11:18+00:00

## Health v2 (maintenance only)
Score: 48/100 (v2, computed 2026-09-03T02:39:23.370411+00:00)
- activity 56, release rhythm 8, longevity 100
- inputs: {"age_days": 2748, "days_push": 264, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1233, forks 107 (observed 2026-08-28T04:04:04.653678+00:00)

## What it is
k2tf is a command-line tool that converts Kubernetes API objects from YAML manifests into Terraform HCL configuration. The generated .tf files are intended for use with the Terraform Kubernetes Provider.

## Use cases
- convert kubernetes yaml manifests to terraform hcl
- migrate kubernetes manifests to terraform kubernetes provider config
- convert a directory of k8s yaml files to terraform files
- generate terraform config from kubectl get output
- import existing kubernetes deployments into terraform

## When to choose
- you are adopting terraform for kubernetes resources and have existing YAML manifests
- you want to convert manifests directly from a live cluster via kubectl
- you need a simple one-shot CLI conversion without a server

## When to avoid
- you want continuous drift detection or import tooling like terraform import or kubectl tfstate helpers
- you need conversion to other IaC formats like Pulumi or CDK
- you require fully hand-tuned HCL with modules and variables

## Facets
- artifact type: cli-tool
- maturity: active
- function: developer-tools, configuration-management, infrastructure-as-code
- domain: infrastructure-as-code, developer-tools
- platform: cli, windows, cross-platform
- tags: terraform, kubernetes, yaml, hcl, converter, hashicorp, devops, containers, linux, macos

## Member repositories
- sl1pm4t/k2tf (main) score 48

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:04.653678+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T08:22:17.983665+00:00, confidence not recorded.
  - readme: https://github.com/sl1pm4t/k2tf (fetched 2026-08-28T04:04:04.653678+00:00, sha 143156263396)
- Data as of 2026-08-30T08:39:29.467469+00:00.
