使用helm create hbkchart,命令执行后会在当前目录生成hbkchart目录。
我们进入hbkchart,可以看到helm为我们生成了常用的模板
[root@k8s-master docker_study]# helm create hbkchart
Creating hbkchart
[root@k8s-master docker_study]# cd hbkchart/
[root@k8s-master hbkchart]# ls
charts Chart.yaml templates values.yaml
[root@k8s-master hbkchart]# cd templates/
[root@k8s-master templates]# ls
deployment.yaml _helpers.tpl ingress.yaml NOTES.txt serviceaccount.yaml service.yaml tests
我们把templates目录下的所有文件删除,我们自己生成配置文件
[root@k8s-master templates]# kubectl create deployment webtest --image=nginx --dry-run=client -o yaml > deployment.yaml