在 Google 容器引擎上访问 SkyDNS etcd API 以添加自定义记录

Access SkyDNS etcd API on Google Container Engine to Add Custom Records

我是 运行 GKE 上的一个 kubernetes 集群,我想从服务 pod 发现和访问 etcd API。我想这样做的原因是将密钥添加到 SkyDNS 层次结构。

有没有办法从应用程序 pods 发现(或 create/expose)GKE 集群上的 etcd 服务 API 端点并与之交互?

我们有物联网网关节点,通过 SSL VPN 连接到我们的云服务,以简化管理和通信。当设备连接到 VPN 时,我想用设备的主机名和 VPN IP 地址更新 SkyDNS 中的条目。

旋转另一个集群 DNS 设置没有意义,因为 SkyDNS 对此非常有用,集群中的所有 pods 已经自动配置为首先查询它。

I'm running a kubernetes cluster on GKE and I would like to discover and access the etcd API from a service pod. The reason I want to do this is to add keys to the SkyDNS hierarchy.

听起来您想直接访问支持 DNS 服务的 etcd 实例(而不是支持 Kubernetes apiserver 的 etcd 实例,它是独立的)。

Is there a way to discover (or create/expose) and interact with the etcd service API endpoint on a GKE cluster from application pods?

DNS 服务的 etcd 实例是 DNS 服务的内部实现细节,并非设计为直接访问。事实上,它只是 kube2sky 二进制文件和 skydns 二进制文件之间的一种方便的通信机制,这样 skydns 就不需要知道它是 Kubernetes 中的 运行簇。我不建议尝试直接访问它。

此外,这个 etcd 实例甚至不会存在于 Kubernetes 1.3 安装中,因为 skydns 正在被新的 DNS 二进制文件 kubedns 取代。

We have IoT gateway nodes that connect to our cloud services via an SSL VPN to ease management and comms. When a device connects to the VPN I want to update an entry in SkyDNS with the hostname and VPN IP address of the device.

如果您创建一个新服务,这将导致集群 DNS 创建一个新条目,将服务名称映射到支持该服务的端点。如果您在每次新的 IoT 设备注册时以编程方式添加服务而不是尝试直接配置 DNS,会怎样?