【问题标题】:How to solve "network is not ready: runtime network not ready: NetworkReady=false reason:NetworkPluginNotReady" on GKE?如何解决 GKE 上的“网络未就绪:运行时网络未就绪:NetworkReady=false 原因:NetworkPluginNotReady”?
【发布时间】:2020-04-25 23:04:08
【问题描述】:

这种情况每周发生一次或两次,无需应用任何命令。我刚刚收到许多 pod 已关闭的警报。

至少 40 天前创建的集群设置:

gcloud container \
  clusters create "yourclustername" \
  --project "yourprojectname" \
  --zone "yourregion-zone" \
  --no-enable-basic-auth \
  --release-channel "regular" \
  --machine-type "e2-standard-2" \
  --image-type "COS" \
  --disk-type "pd-ssd" \
  --disk-size "20" \
  --metadata disable-legacy-endpoints=true \
  --scopes "https://www.googleapis.com/auth/devstorage.read_only","https://www.googleapis.com/auth/logging.write","https://www.googleapis.com/auth/monitoring","https://www.googleapis.com/auth/servicecontrol","https://www.googleapis.com/auth/service.management.readonly","https://www.googleapis.com/auth/trace.append" \
  --num-nodes "2" \
  --enable-stackdriver-kubernetes \
  --enable-ip-alias \
  --network "projects/yourprojectname/global/networks/yournetwork" \
  --subnetwork "projects/yourprojectname/regions/yourregion/subnetworks/yournetwork" \
  --default-max-pods-per-node "110" \
  --enable-autoscaling \
  --min-nodes "2" \
  --max-nodes "4" \
  --no-enable-master-authorized-networks \
  --addons HorizontalPodAutoscaling,HttpLoadBalancing,NodeLocalDNS,ApplicationManager \
  --enable-autoupgrade \
  --enable-autorepair \
  --max-surge-upgrade 1 \
  --max-unavailable-upgrade 0 \
  --enable-shielded-nodes

节点条件:

我删除了出现此错误的 pod,GKE 创建了另一个,当然这不是解决方案,至少需要 4 分钟的停机时间。如何解决这个问题?即使在 GKE 上,我也需要像印花布或法兰绒这样的东西吗?

【问题讨论】:

标签: docker kubernetes google-kubernetes-engine


【解决方案1】:

已解决,I enabled Calico 它的 CNI 插件解决了这个问题。 GKE 内置了对它的支持,启用它的步骤可以在这里找到:https://cloud.google.com/kubernetes-engine/docs/how-to/network-policy

【讨论】:

    猜你喜欢
    • 2020-04-17
    • 1970-01-01
    • 2021-07-10
    • 1970-01-01
    • 2022-12-03
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-12-26
    相关资源
    最近更新 更多