A tool that converts Kubernetes YAML manifests into Terraform HCL configuration for use with the Terraform Kubernetes provider.
k2tf is a Kubernetes YAML to Terraform HCL converter that transforms Kubernetes API objects defined in YAML into Terraform configuration language. It solves the problem of migrating existing Kubernetes manifests or integrating Kubernetes resources into Terraform-based infrastructure-as-code pipelines. The generated .tf files are compatible with the Terraform Kubernetes provider.
DevOps engineers, platform engineers, and infrastructure developers who use Terraform to manage Kubernetes clusters and want to incorporate existing YAML-based resources into their Terraform state.
Developers choose k2tf because it provides a reliable, automated way to convert Kubernetes YAML to Terraform HCL without manual rewriting, saving time and reducing errors. Its compatibility with the Terraform Kubernetes provider ensures the generated configurations work seamlessly in Terraform workflows.
Kubernetes YAML to Terraform HCL converter
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Offers pre-built binaries, Homebrew, and asdf plugin installation, making it accessible across different platforms without complex setup.
Accepts input from YAML files, directories, or directly from kubectl output, as shown in the example usage for versatile conversion workflows.
Generates configurations specifically for the Terraform Kubernetes provider, ensuring the output works seamlessly in Terraform plans and applies.
Converts Kubernetes YAML to Terraform HCL with a simple command-line interface, aligning with its single-purpose philosophy for quick adoption.
Focuses on standard Kubernetes API objects; may not fully support all Custom Resource Definitions (CRDs) or advanced Kubernetes features, requiring manual intervention.
Only converts YAML to HCL; doesn't handle Terraform state migration or integration, leaving users to manage state separately which can be error-prone.
As a conversion tool, there might be edge cases where YAML nuances like multi-document files or complex annotations aren't perfectly translated, needing post-conversion tweaks.