【问题标题】:RouteController failed to create a route on GKERouteController 未能在 GKE 上创建路由
【发布时间】:2019-06-25 23:12:09
【问题描述】:

我在 GKE 上有一个集群,当我想使用该集群时我会创建它的节点池,并在我用完它时删除它。

这是一个两节点集群,主节点位于europe-west2-a,其节点区域为europe-west2-aeurope-west2-b

最近的创建导致区域 B 中的节点失败并显示 NetworkUnavailable,因为 RouteController failed to create a route。原因是因为Could not create route xxx 10.244.1.0/24 for node xxx after 342.263706ms: instance not found

为什么会突然发生这种情况,我该怎么做才能解决它?!

【问题讨论】:

    标签: kubernetes google-cloud-platform google-kubernetes-engine


    【解决方案1】:

    您没有提及您使用的是哪个版本的 GKE,所以只是为了澄清:

    access scopes 的变化 从 Kubernetes 版本 1.10 开始,gcloud 和 GCP Console 不再默认授予新集群和新节点池的 compute-rw 访问范围。此外,如果在 gcloud container create 中指定了 --scopes,gcloud 将不再静默添加 compute-rw 或 storage-ro。

    在任何情况下,您仍然可以恢复到旧的访问范围,但这不是推荐的方法。

    希望对您有所帮助。

    【讨论】:

      【解决方案2】:

      在 gke 1.13.6-gke.13 中,更改了一些默认范围,包括删除了 compute-rw 范围。我认为由于集群的年龄,这个范围对于在节点池中的节点之间正确创建路由是必要的。

      最后,我的 gcloud 创建命令具有以下范围:

      --scopes https://www.googleapis.com/auth/projecthosting,storage-rw,monitoring,trace,compute-rw

      【讨论】:

      • 嗨,我刚刚创建了 1.13.6-gke.13 集群,其节点位于不同的区域。我不确定您对这些陈述是否正确:根据文档:Route ControllerFor setting up routes in the underlying cloud infrastructure。请提供您为创建集群而执行的完整命令,以及我们如何重新创建此问题的更多详细信息。
      • 我使用的命令是:gcloud container node-pools create preemptible-pool --cluster staging --zone europe-west2-a --num-nodes 1 --machine-type "n1-standard-4" --preemptible --image-type=COS_CONTAINERD --scopes="https://www.googleapis.com/auth/projecthosting,storage-rw,monitoring,trace"
      • 那么它目前正在工作还是我们还需要关注您的问题?
      • 现在都整理好了 :) 谢谢!
      猜你喜欢
      • 1970-01-01
      • 2019-11-21
      • 2020-04-23
      • 2021-03-11
      • 1970-01-01
      • 1970-01-01
      • 2022-08-20
      • 2018-02-20
      • 2015-10-28
      相关资源
      最近更新 更多