helm create mychart创建一个命名为mychart的chart

    1. [root@k8s-master helmdemo]# tree demo
    2. demo
    3. ├── charts
    4. ├── Chart.yaml
    5. ├── templates
    6. ├── deployment.yaml
    7. ├── _helpers.tpl
    8. ├── ingress.yaml
    9. ├── NOTES.txt
    10. ├── service.yaml
    11. └── tests
    12. └── test-connection.yaml
    13. └── values.yaml
    14. 3 directories, 8 files

    删掉templates下所有文件,创建一个mychart/templates/configmap.yaml:

    1. apiVersion: v1
    2. kind: ConfigMap
    3. metadata:
    4. name: {{.Release.Name}}-configmap
    5. data:
    6. myvalue: "Hello World"
    7. drink: {{.Values.favoriate}}

    在这个configmap.yaml文件中可以看到.Release