【问题标题】:Where are the volumes located when using ECS and Fargate?使用 ECS 和 Fargate 时卷位于何处?
【发布时间】:2018-06-18 08:51:30
【问题描述】:

我有以下设置(我已经去掉了不重要的字段):

{
    "ECSTask": {
      "Type": "AWS::ECS::TaskDefinition",
      "Properties": {
        "ContainerDefinitions": [
          {
            "Name": "mysql",
            "Image": "mysql",
            "MountPoints": [{"SourceVolume": "mysql", "ContainerPath": "/var/lib/mysql"}]
          }
        ],
        "RequiresCompatibilities": ["FARGATE"],
        "Volumes": [{"Name": "mysql"}]
      }
    }
}

它似乎可以工作(容器确实可以正常启动),但我不太确定这个卷被保存在哪里。我以为这将是一个 EBS 卷,但我没有在那里看到它。我想这是我的任务内部的 - 但在这种情况下 - 我如何访问它?如何控制其限制(最小/最大尺寸等)?如何为此卷创建备份?

谢谢。

【问题讨论】:

    标签: amazon-web-services containers amazon-ecs


    【解决方案1】:

    Fargate 不支持持久卷。任何附加到 fargate 任务的卷都是短暂的,不能从外部源初始化或备份,遗憾的是。

    https://docs.aws.amazon.com/AmazonECS/latest/developerguide/using_data_volumes.html

    【讨论】:

      猜你喜欢
      • 2021-02-02
      • 1970-01-01
      • 2019-04-10
      • 2021-10-12
      • 2022-01-21
      • 1970-01-01
      • 2020-07-19
      • 2020-09-05
      • 1970-01-01
      相关资源
      最近更新 更多