kubernetes - EKS - 如何注释 USERDATA 中的某些节点?

标签 kubernetes annotations nodes amazon-eks

为了防止 Cluster Auto Scaler 终止某些节点,我需要使用以下内容注释它们:

cluster-autoscaler.kubernetes.io/scale-down-disabled=true;

USERDATA 脚本中有没有办法做到这一点? 对于标记节点,没有问题,可以通过以下方式进行:

    --kubelet-extra-args \
        "--node-labels=

谢谢

最佳答案

不,这不可能。

引导脚本支持的参数列表:

--use-max-pods Sets --max-pods for the kubelet when true. (default: true)
--b64-cluster-ca The base64 encoded cluster CA content. Only valid when used with --apiserver-endpoint. Bypasses calling \"aws eks describe-cluster\"
--apiserver-endpoint The EKS cluster API Server endpoint. Only valid when used with --b64-cluster-ca. Bypasses calling \"aws eks describe-cluster\"
--kubelet-extra-args Extra arguments to add to the kubelet. Useful for adding labels or taints.
--enable-docker-bridge Restores the docker default bridge network. (default: false)
--aws-api-retry-attempts Number of retry attempts for AWS API call (DescribeCluster) (default: 3)
--docker-config-json The contents of the /etc/docker/daemon.json file. Useful if you want a custom config differing from the default one in the AMI

关于kubernetes - EKS - 如何注释 USERDATA 中的某些节点?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56992185/

相关文章:

kubernetes - Cloud Composer 实例节点和自动缩放

docker - 为什么我用Kubernetes在Ceph上收到 “Structure needs cleaning”消息?

Scala 反射,使用给定的注释查找和实例化所有类

javascript - Neo4j 仅当 where 子句始终为真时才返回 Node

c - 如何使用 void 修改链表节点?

nginx - 如何将 nginx 入口自定义端口列入白名单

networking - GKE:IP地址

java - Java 中的注解会导致编译时传递依赖吗?

scala - 使方法实际内联

javascript - 在同一个项目中混合 CommonJS 和 ES6 模块