use*_*dev 8 amazon-web-services amazon-ecs aws-fargate
我正在通过 AWS Fargate 部署容器,但我遇到了"No Space left on device". 有没有办法可以在 task_definitions 中指定卷大小:
task_size:
mem_limit: 2GB
cpu_limit: 256
Run Code Online (Sandbox Code Playgroud)
自2020 年 4 月发布的Fargate平台 1.4 起,临时存储现在为 20 GB,而不是 10 GB。此外,您现在可以在Fargate任务中挂载持久性EFS存储卷。
例如:
{
"containerDefinitions": [
{
"name": "container-using-efs",
"image": "amazonlinux:2",
"entryPoint": [
"sh",
"-c"
],
"command": [
"ls -la /mount/efs"
],
"mountPoints": [
{
"sourceVolume": "myEfsVolume",
"containerPath": "/mount/efs",
"readOnly": true
}
]
}
],
"volumes": [
{
"name": "myEfsVolume",
"efsVolumeConfiguration": {
"fileSystemId": "fs-1234",
"rootDirectory": "/path/to/my/data",
"transitEncryption": "ENABLED",
"transitEncryptionPort": integer,
"authorizationConfig": {
"accessPointId": "fsap-1234",
"iam": "ENABLED"
}
}
}
]
}
Run Code Online (Sandbox Code Playgroud)
您现在可以在任务定义中将 Fargate 临时存储增加到 200GB。因此,除非您需要大于 200GB 的存储空间,否则无需附加卷。
"ephemeralStorage": {
"sizeInGiB": 200
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
3127 次 |
| 最近记录: |