通过Metadata获取实例类型
通过在实例内访问metadata服务获取当前实例的信息
阿里云
1 |
curl http://100.100.100.200/latest/meta-data/instance/instance-type |
腾讯云
1 |
curl http://metadata.tencentyun.com/latest/meta-data/instance/instance-type |
AWS
1 |
curl http://169.254.169.254/latest/meta-data/instance-type |
There are no comments yet