Mozilla Public License 2.0

项目介绍

sl1pm4t/k2tf 是一个托管在 GitHub 上的开源项目,主要使用 Go 编写,采用 Mozilla Public License 2.0 许可证,目前获得 1.2k 个 Star、105 次 Fork。

仓库全名
sl1pm4t/k2tf
开源许可证
Mozilla Public License 2.0
Star 数
1.2k
Fork 数
105
未关闭 Issue
19

README 摘要

k2tf - Kubernetes YAML to Terraform HCL converter A tool for converting Kubernetes API Objects (in YAML format) into HashiCorp's Terraform configuration language. The converted .tf files are suitable for use with the Terraform Kubernetes Provider Installation Pre-built Binaries Download Binary from GitHub releases page. Build from source See below Homebrew asdf Use the asdf-k2tf plugin. Example Usage Convert a…

完整内容见 GitHub 原始 README 或本页 。

常见问题

k2tf 用什么语言开发?

主要使用 Go 编写,采用 Mozilla Public License 2.0 许可证,目前有 1.2k 个 Star。

k2tf 可以免费商用吗?

仓库标注的许可证为 Mozilla Public License 2.0,商用前请先阅读仓库 LICENSE 文件确认授权范围。

如何获取 k2tf 的源码?

可以直接克隆仓库:git clone https://github.com/sl1pm4t/k2tf.git,默认分支为 main;安装与运行步骤见仓库 README。

k2tf 最近还在维护吗?

仓库最近一次更新为 2025年12月12日,当前有 19 个未关闭 Issue;Star 数为 1.2k,可作为社区活跃度的参考。

简要分析

热度分
1457
价值分
771
活跃状态
活跃

语言占比

Go
Makefile
Shell

Release

README

k2tf - Kubernetes YAML to Terraform HCL converter

Build Status Go Report Card Release

A tool for converting Kubernetes API Objects (in YAML format) into HashiCorp’s Terraform configuration language.

The converted .tf files are suitable for use with the Terraform Kubernetes Provider

asciicast

Installation

Pre-built Binaries

Download Binary from GitHub releases page.

Build from source

See below

Homebrew

$ brew install k2tf

asdf

Use the asdf-k2tf plugin.

Example Usage

Convert a single YAML file and write generated Terraform config to Stdout

$ k2tf -f test-fixtures/service.yaml

Convert a single YAML file and write output to file

$ k2tf -f test-fixtures/service.yaml -o service.tf

Convert a directory of Kubernetes YAML files

$ k2tf -f test-fixtures/

Read & convert Kubernetes objects directly from a cluster

$ kubectl get deployments -o yaml | ./k2tf -o deployments.tf

Building

NOTE Requires a working Golang build environment.

This project uses Golang modules for dependency management, so it can be cloned outside of the $GOPATH.

Clone the repository

$ git clone https://github.com/sl1pm4t/k2tf.git

Build

$ cd k2tf
$ make build

Run Tests

$ make test

Downloads

评论

暂无评论