在群集节点上设置vm.max_map_count [英] Set vm.max_map_count on cluster nodes

查看:1824
本文介绍了在群集节点上设置vm.max_map_count的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试在Google容器引擎的群集节点上安装ElasticSearch(最新版本),但是ElasticSearch需要变量:vm.max_map_count为> = 262144.

I try to install ElasticSearch (latest) on a cluster nodes on Google Container Engine but ElasticSearch needs the variable : vm.max_map_count to be >= 262144.

如果我对每个节点执行SSH操作,然后手动运行:

If I ssh to every nodes and I manually run :

sysctl -w vm.max_map_count=262144

然后一切正常,但是任何新节点将没有指定的配置.

All goes fine then, but any new node will not have the specified configuration.

所以我的问题是:

是否有一种在引导时在每个节点上加载系统配置的方法? Deamon Set并不是一个好的解决方案,因为在Docker容器中,系统变量是只读的.

Is there a way to load a system configuration on every nodes at boot time ? Deamon Set would not be the good solution because inside a docker container, the system variables are read-only.

我正在使用具有gci节点图像的新创建的群集.

I'm using a fresh created cluster with the gci node image.

推荐答案

您应该能够使用DaemonSet来模拟启动脚本的行为.如果脚本需要在节点上执行根级操作,则可以将DaemonSet容器配置为以特权模式运行.

You should be able to use a DaemonSet to emulate the behavior of a startup script. If the script needs to do root-level actions on the node, you can configure the DaemonSet pods to run in privileged mode.

有关如何执行此操作的示例,请参见 https://github .com/kubernetes/contrib/tree/master/startup-script

For an example of how to do this, see https://github.com/kubernetes/contrib/tree/master/startup-script

这篇关于在群集节点上设置vm.max_map_count的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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