【问题标题】:GCLOUD Kubernetes in f1-micro results in (Node pools of f1-micro machines are not supported due to insufficient memory)f1-micro 中的 GCLOUD Kubernetes 导致(f1-micro 机器的节点池由于内存不足不支持)
【发布时间】:2020-08-05 00:10:15
【问题描述】:

我尝试使用 Google 的 UI 在集群中启动一个新的 f1-micro 节点,但它静默失败。所以我决定使用 gcloud 运行它,看看它是否提供更多详细信息

所以我跑了以下

gcloud container node-pools create my-f1-pool --image-type ubuntu --machine-type=f1-micro --cluster bcomm-sg-cluster --disk-size=10GB --enable-autoscaling --min-nodes=2 --max-nodes=6 --zone=asia-southeast1-a --enable-autorepair

这是我得到的结果

WARNING: Modifications on the boot disks of node VMs do not persist across node recreations. Nodes are recreated during manual-upgrade, auto-upgrade, auto-repair, and auto-scaling. To preserve modifications across node recreation, use a DaemonSet.
WARNING: Newly created clusters and node-pools will have node auto-upgrade enabled by default. This can be disabled using the `--no-enable-autoupgrade` flag.
WARNING: Starting in 1.12, new node pools will be created with their legacy Compute Engine instance metadata APIs disabled by default. To create a node pool with legacy instance metadata endpoints disabled, run `node-pools create` with the flag `--metadata disable-legacy-endpoints=true`.
This will enable the autorepair feature for nodes. Please see https://cloud.google.com/kubernetes-engine/docs/node-auto-repair for more information on node autorepairs.
ERROR: (gcloud.container.node-pools.create) ResponseError: code=400, message=Node pools of f1-micro machines are not supported due to insufficient memory.

“内存不足,不支持 f1-micro 机器的节点池”是什么意思。如果不允许,那么为什么存在该选项?之前我开始玩 GCP 时,我创建的第一个代码池是 3 f1-micro,然后我添加了一个 N1。但现在我无法添加 f1-micro 并得到此错误

【问题讨论】:

    标签: google-cloud-platform microservices devops gcloud kubernetes-cluster


    【解决方案1】:

    GKE documentation 表示机器类型表的结尾:

    注意:不支持 f1-micro 机器,因为它们没有 足够的内存来运行 GKE。

    回答为什么可以创建一个 f1-micro 节点池的问题,如果你用 1.12.0 版本创建你的 GKE,有一个说明是这样的:

    注意:在 1.12.0 之前,内存小于 1GB 的机器是 免于内存保留。

    实际上,如果您使用更高版本,对于内存小于 1 GB 的机器,预留内存为 255 MiB 内存。

    f1-micro 机器只有 0.60 GB 内存。

    因此,如果您使用 0.60GB 的机器,它无法处理操作系统和 Kubernetes 的要求,并且为 pod 提供了可分配内存。

    【讨论】:

    • 啊,这就是为什么...我认为这应该在其关于创建 kubernetes 集群的指南的顶部记录为警告。无论如何谢谢
    猜你喜欢
    • 1970-01-01
    • 2016-09-18
    • 2019-04-23
    • 2019-05-23
    • 2019-05-17
    • 2019-03-26
    • 2015-12-10
    • 2019-12-29
    相关资源
    最近更新 更多