Skip to content

文档,https://github.com/arttor/helmify

1. Helmify简介

Helmify 是一种命令行工具,可以将 Kubernetes YAML 文件转换为 Helm chart。它专为 operator helm chart 设计,跨平台安装(win,linux,mac)。

Supports Helm >=v3.6.0

2. Helmify部署

  • win环境下

https://github.com/arttor/helmify/releases/download/v0.4.13/helmify_Windows_x86_64.zip

#此文件是二进制,所以直接解压下直接使用
#此文件是二进制,所以直接解压下直接使用

3.Helmify案例

3.1 nginx案例

创建yaml文件

yaml
# 创建manifest.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  creationTimestamp: null
  labels:
    app: nginxdeploy
  name: nginxdeploy
spec:
  replicas: 1
  selector:
    matchLabels:
      app: nginxdeploy
  strategy: {}
  template:
    metadata:
      creationTimestamp: null
      labels:
        app: nginxdeploy
    spec:
      containers:
      - image: nginx:latest
        name: nginx
        resources: {}
status: {}
# 创建manifest.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  creationTimestamp: null
  labels:
    app: nginxdeploy
  name: nginxdeploy
spec:
  replicas: 1
  selector:
    matchLabels:
      app: nginxdeploy
  strategy: {}
  template:
    metadata:
      creationTimestamp: null
      labels:
        app: nginxdeploy
    spec:
      containers:
      - image: nginx:latest
        name: nginx
        resources: {}
status: {}

输出chart

bash
cat mainfest.yaml | helmify.exe nginx
cat mainfest.yaml | helmify.exe nginx
  • 查看
tree nginx
tree nginx

image-20240722104944184