我司现在使用的自动化扩展工具是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 |
也就是说,我们如果……
如何快速分析我们存储在s3中的文件(日志)
Route53 Routing policy
aws 启用mfa以后,如何使用cli 命令行
限制读取s3的某个文件夹下文件的权限
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
{ "Statement": [ { "Action": [ "s3:ListBucket" ], "Condition": { "StringLike": { "s3:prefix": [ "folder/2020/04/*" ] } }, "Effect": "Allow", "Resource": [ "arn:aws:s3:::my-s3" ] }, { "Action": [ "s3:GetObject*" ], "Effect": "Allow", "Resource": [ "arn:aws:s3:::my-s3/folder/2020/04/*" ] } ], "Version": "2012-10-17" } |
例如我们只想开放给某个role 我们s3中特定的一个文件夹下的东西 我的s3 叫my-s3 GetObject 是说如果你知道路径了,直接下载没问题,但是如果你想使用一些
1 |
--recursive |
这种下……