我司现在使用的自动化扩展工具是ASG , 他可以做到自动根据cluster的一些指标进行增加或者删除node, 一般以分钟为计时单位,几分钟可以创建出一个node Karpenter是一个新的自动扩缩容工具,不经过ASG,直接和ec2进行交互,可以做到秒级新增node 原理和其他的operator类似,需要在我们的eks中部署一个pod作……
分类目录:运维
ReplicationController and ReplicaSet in Kubernetes
public key fingerprint
Index brackets must contain either a literal number or a literal string. terraform taint
aws eks 中 的权限 AWS IAM 权限挂钩的
asyncio python 协程
python 中的协程其实就是一种高效的任务切换模式: 遇到需要等待的(例如io等待), 直接跳到其他任务去执行,不会傻傻的等到io结束才向下执行 先看一个如果没有异步的例子:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
import asyncio import time def func1(): print("this is func1 ") time.sleep(2) print("this is end of func1") def func2(): print("this is func2 ") time.sleep(2) print("this is end of func2") if __name__ == '__main__': func1() func2() |
运行结果:
1 2 3 4 5 |
this is func1 this is end of func1 this is func2 this is end of func2 python asyntest.py 0.06s user 0.02s system 1% cpu 4.105 total |
也就是说,我们如果……