有人可以向我解释头盔的一些用例吗? [英] Can someone explain me some use cases of helm?

查看:108
本文介绍了有人可以向我解释头盔的一些用例吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在使用kubernetes,遇到了掌舵人. 假设我不喜欢用与我的应用程序无关的过程来感染"我的kubernetes集群,但是如果它可以带来好处,我会很乐意接受.

I’m currently using kubernetes and I came across of helm. Let’s say I don’t like the idea of "infecting" my kubernetes cluster with a process that is not related to my applications but I would gladly accept it if it could be beneficial.

所以我做了一些研究,但是我仍然无法通过使用yaml描述符和kubectl找到我无法轻易完成的任何事情,所以目前为止,除了用于环保之外,我找不到其他用途.

So I made some researches but I still can’t find anything I can’t easily do by using my yaml descriptor and kubectl so for now I can’t find an use except,maybe, for the environizing.

例如(取自我阅读的指南:

For example (taking it from guides I read:

  1. 您可以轻松安装应用程序,例如. helm install nginx —>将nginx映像添加到我的部署描述符中,完成
  2. 存储库->我有docker存储库(我从中提取映像)
  3. 在发行失败的情况下,您可以轻松地掌控回滚->我只是在kubernetes描述符中将映像版本更改为上一个版本,很容易

困扰我的是,在命令级别上,我几乎做了同样的工作(应用helm update-> kubectl). 作为交换,我因为保持了目录结构的掌舵人而有很多样板,而且我感觉缺少使用普通部署描述符提供的控件...我缺少什么?

What bothers me is that, at level of commands, I do pretty much the same effort (helm update->kubectl apply). In exchange for that I have a lot of boilerplate because of keeping the directory structure helm wants and I feel like missing the control I have with plain deployment descriptors ...what am I missing?

推荐答案

以下是关于Helm有用的三个建议:

Here's three suggestions of ways Helm can be useful:

  1. 您的连续部署系统通常会例行生成新版本,并希望将其发送到Kubernetes集群.您可以使用模板来指定部署中的映像名称和标签,然后使用helm upgrade ... --set tag=201907211931来请求特定的标签.

您可能具有各种特定于服务的控件,例如日志级别或外部数据库主机名. Helm值机制提供了一种统一的方式来指定它们,而无需了解Kubernetes YAML文件的详细信息.

You might have various service-specific controls like the log level or external database hostnames. The Helm values mechanism gives a uniform way to specify them, without having to know the details of the Kubernetes YAML files.

预先打包的应用程序图表存储库,因此如果要复制具有集群内持久存储的PostgreSQL,已经为您构建,您可以依靠它,而不用自己弄清楚StatefulSets和PersistentVolumeClaims的正确组合.

There is a repository of pre-packaged application charts, so if you want replicated PostgreSQL with in-cluster persistent storage, that's already built for you and you can just depend on it, rather than figuring out the right combination of StatefulSets and PersistentVolumeClaims yourself.

您可以通过有趣(且可能很复杂)的方式将它们组合起来:例如,使用集群内数据库进行开发人员测试,而使用云托管和备份数据库进行生产,并根据以下信息计算数据库主机名:提供哪些设置组合.

You can combine these in interesting (and potentially complex) ways: use an in-cluster database for developer testing but use a cloud-hosted and backed-up database for production, for example, and compute the database host name based on what combination of settings are provided.

当然,还有其他方法可以完成所有这些事情. Kustomize 特别是可以相当直接地更改图像值,并且值得注意的是它已包含在从Kubernetes 1.14开始的kubectl工具(另请参见使用Kustomize声明式管理Kubernetes对象(在Kubernetes文档中). 操作员"模式提供了一条备用路径,用于在集群中安装软件,但即使与Helm相比,您更相信具有API访问权限的任意程序.

There are, of course, alternative ways to do all of these things. Kustomize in particular can change the image value fairly straightforwardly, and is notable for having been included in the kubectl tool since Kubernetes 1.14 (see also Declarative Management of Kubernetes Objects Using Kustomize in the Kubernetes documentation). The "operator" pattern gives an alternate path to install software in your cluster, but even more so than Helm you're trusting an arbitrary program with API access.

这篇关于有人可以向我解释头盔的一些用例吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆