helm create mychart创建一个命名为mychart的chart
[root@k8s-master helmdemo]# tree demodemo├── charts├── Chart.yaml├── templates│ ├── deployment.yaml│ ├── _helpers.tpl│ ├── ingress.yaml│ ├── NOTES.txt│ ├── service.yaml│ └── tests│ └── test-connection.yaml└── values.yaml3 directories, 8 files
删掉templates下所有文件,创建一个mychart/templates/configmap.yaml:
apiVersion: v1kind: ConfigMapmetadata:name: {{.Release.Name}}-configmapdata:myvalue: "Hello World"drink: {{.Values.favoriate}}
在这个configmap.yaml文件中可以看到.Release
