【发布时间】:2018-10-03 17:02:39
【问题描述】:
我使用的是 google kubernetes 引擎,我需要运行找到的 filebeat daemonset (https://www.elastic.co/guide/en/beats/filebeat/master/running-on-kubernetes.html)。我创建集群:
gcloud container clusters create test_cluster \
--cluster-version "1.9.6-gke.1" \
--node-version "1.9.6-gke.1" \
--zone "us-east1-c" \
--machine-type n1-standard-4 \
--scopes "https://www.googleapis.com/auth/compute","https://www.googleapis.com/auth/devstorage.full_control","https://www.googleapis.com/auth/sqlservice.admin","https://www.googleapis.com/auth/log ging.write","https://www.googleapis.com/auth/pubsub","https://www.googleapis.com/auth/servicecontrol","https://www.googleapis.com/auth/service.management.readonly","https://www.googleapis.com/auth/tra ce.append" \
--num-nodes "1" \
--network "main-network" \
--subnetwork "main-subnetwork" \
--no-enable-cloud-monitoring \
--no-enable-cloud-logging \
--no-enable-legacy-authorization \
--disk-size "50"
当我将 --cluster-version 和 --node-version 设置为 1.8.8-gke.0 时,它可以工作,但是当我将其更改为 1.9.6-gke.1 时,filebeat pod 无法访问我正在运行 logstash 的 GCE 实例。
集群和 GCE 实例都在同一个网络上运行,我确信这不是谷歌云的防火墙问题,因为如果我 gcloud compute ssh 进入 GKE 实例并执行 nc -vz -w 5 10.0.0.18 5044 它连接正常。
当我让集群运行 1.8.8-gke.0 时,filebeat pod 连接到 logstash 并且运行 traceroute 10.0.0.18 显示它连接正常。当我使用1.9.6-gke.1 创建集群时,traceroute 10.0.0.18 显示以下内容:
[root@filebeat-56wtj filebeat]# traceroute 10.0.0.18
traceroute to 10.0.0.18 (10.0.0.18), 30 hops max, 60 byte packets
1 gateway (10.52.0.1) 0.063 ms 0.016 ms 0.012 ms
2 * * *
3 * * *
4 * * *
5 * * *
6 * * *
编辑:请注意,这不是特定于 filebeat 容器的,我用另一个容器尝试过,它也无法访问 GCE 实例。
【问题讨论】:
标签: kubernetes google-compute-engine google-kubernetes-engine filebeat gke-networking