
aws-eks-asg-rolling-update-handler是一款用于AWS EKS集群中自动扩展组(ASG)滚动更新的工具。它通过识别并替换配置过时的节点(即节点当前配置与ASG的启动模板版本或启动配置不匹配的节点),实现ASG的滚动升级。该工具受aws-asg-roller启发,专注于优雅缩容过时节点,不控制节点总数,而是依赖cluster-autoscaler进行后续节点数量调整。与其他解决方案相比,它基于资源需求确定扩容节点数量,尤其适用于实例类型变更等场景,确保更新过程中的高可用性。
| 环境变量 | 描述 | 是否必填 | 默认值 |
|---|---|---|---|
| CLUSTER_NAME | EKS集群名称,用于替代AUTO_SCALING_GROUP_NAMES。会检查ASG上是否有k8s.io/cluster-autoscaler/<CLUSTER_NAME>: owned和k8s.io/cluster-autoscaler/enabled: true标签 | 是 | "" |
| AUTO_SCALING_GROUP_NAMES | 逗号分隔的ASG名称列表,CLUSTER_NAME优先级更高 | 是 | "" |
| IGNORE_DAEMON_SETS | 排空节点时是否忽略DaemonSets | 否 | true |
| DELETE_LOCAL_DATA | 排空节点时是否删除本地数据 | 否 | true |
| AWS_REGION | AWS区域 | 否 | us-west-2 |
| ENVIRONMENT | 若设为dev,使用本地kubeconfig创建Kubernetes客户端;其他值使用集群内配置 | 否 | "" |
应用需具备以下AWS权限以正常工作:
yamlapiVersion: core/v1 kind: ServiceAccount metadata: name: aws-eks-asg-rolling-update-handler namespace: kube-system labels: k8s-app: aws-eks-asg-rolling-update-handler --- apiVersion: rbac.authorization.k8s.io/v1beta1 kind: ClusterRole metadata: name: aws-eks-asg-rolling-update-handler labels: k8s-app: aws-eks-asg-rolling-update-handler rules: - apiGroups: - "*" resources: - "*" verbs: - get - list - watch - apiGroups: - "*" resources: - nodes verbs: - get - list - watch - update - patch - apiGroups: - "*" resources: - pods/eviction verbs: - get - list - create - apiGroups: - "*" resources: - pods verbs: - get - list --- apiVersion: rbac.authorization.k8s.io/v1beta1 kind: ClusterRoleBinding metadata: name: aws-eks-asg-rolling-update-handler labels: k8s-app: aws-eks-asg-rolling-update-handler roleRef: kind: ClusterRole name: aws-eks-asg-rolling-update-handler apiGroup: rbac.authorization.k8s.io subjects: - kind: ServiceAccount name: aws-eks-asg-rolling-update-handler namespace: kube-system --- apiVersion: apps/v1 kind: Deployment metadata: name: aws-eks-asg-rolling-update-handler namespace: kube-system labels: k8s-app: aws-eks-asg-rolling-update-handler spec: replicas: 1 template: metadata: labels: k8s-app: aws-eks-asg-rolling-update-handler spec: automountServiceAccountToken: true serviceAccountName: aws-eks-asg-rolling-update-handler restartPolicy: Always dnsPolicy: Default containers: - name: aws-eks-asg-rolling-update-handler image: twinproduction/aws-eks-asg-rolling-update-handler imagePullPolicy: Always env: - name: AUTO_SCALING_GROUP_NAMES value: "asg-1,asg-2,asg-3" # 替换为实际的ASG名称列表
通过Helm chart部署:
shhelm repo add twinproduction https://twinproduction.github.io/helm-charts helm repo update helm install aws-eks-asg-rolling-update-handler twinproduction/aws-eks-asg-rolling-update-handler
本地运行时需:
ENVIRONMENT=dev和AUTO_SCALING_GROUP_NAMES(逗号分隔的ASG名称列表)。您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。




探索更多轩辕镜像的使用方法,找到最适合您系统的配置方式
通过 Docker 登录认证访问私有仓库
无需登录使用专属域名
Kubernetes 集群配置 Containerd
K3s 轻量级 Kubernetes 镜像加速
VS Code Dev Containers 配置
Podman 容器引擎配置
HPC 科学计算容器配置
ghcr、Quay、nvcr 等镜像仓库
Harbor Proxy Repository 对接专属域名
Portainer Registries 加速拉取
Nexus3 Docker Proxy 内网缓存
需要其他帮助?请查看我们的 常见问题Docker 镜像访问常见问题解答 或 提交工单
docker search 限制
站内搜不到镜像
离线 save/load
插件要用 plugin install
WSL 拉取慢
安全与 digest
新手拉取配置
镜像合规机制
manifest unknown
no matching manifest(架构)
invalid tar header(解压)
TLS 证书失败
DNS 超时
域名连通性排查
410 Gone 排查
402 与流量用尽
401 认证失败
429 限流
D-Bus 凭证提示
413 与超大单层
来自真实用户的反馈,见证轩辕镜像的优质服务