How to manage deployment configs(yaml files) for kubernetes service deployment

你。 提交于 2019-12-12 09:55:58

问题


Secondly , For deploying container images to kubernetes , we generally made deployment config(yaml files) ..

Now, these may different for staging and development environments . and with some new feature there may come some system environment variable , which needs to be present in yaml .

My question here is .

1. How yaml are managed , for example , manual efforts required if these is some change in yaml .
2. How it can be made automated . 

回答1:


use helm, k8s package manager. helm will let you define a separated set of values for your environments (thanks @xun for pointing that out)- development, canary, production etc, and use them in a single yml chart, which will be generated into a kubernetes regular .yml file.

helm will also let you share and use deployment-ready charts from the helm hub and the chart museums.




回答2:


I would try to explore https://kustomize.io/ instead of helm because of the server client architecture that does not allow for a secure RBAC cluster. Using helm essentially gives root to helm on your cluster. Although there are efforts in Helm 3.0 to change this architecture we are not there yet. Kustomize allows you to convert helm charts to kustomize format and it even has built-in functionality in kubectl in K8S 1.14.0



来源:https://stackoverflow.com/questions/57143448/how-to-manage-deployment-configsyaml-files-for-kubernetes-service-deployment

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!