【问题标题】:kops update cluster failed with `error doing DNS lookup for NS records` `no such host`kops 更新集群失败,“错误为 NS 记录进行 DNS 查找”“没有这样的主机”
【发布时间】:2021-03-07 21:50:25
【问题描述】:

环境

$ kops version
Version 1.18.2 (git-84495481e4)

Kubernetes Cluster Version: 1.18.10

我想做什么

我想在我的域 xway.me 创建一个 Kubernetes 集群。

我找到this article 并尝试一下。

我创建了一个集群并尝试将 terraform 文件打印为输出,但失败了。

$ kops update cluster \
  --out=. \
  --target=terraform \
  --state s3://xway.me-kops \
  --name xway.me

error doing DNS lookup for NS records for "xway.me": lookup xway.me on 127.0.0.53:53: no such host

我尝试了什么

Error doing DNS lookup for NS records when using a Private DNS zone #781

我添加了--dns private

但我得到了unknown flag: --dns

Installing Kubernetes on AWS with kops

现在我的 resolv.conf 在这里

# This file is managed by man:systemd-resolved(8). Do not edit.
#
# This is a dynamic resolv.conf file for connecting local clients to the
# internal DNS stub resolver of systemd-resolved. This file lists all
# configured search domains.
#
# Run "systemd-resolve --status" to see details about the uplink DNS servers
# currently in use.
#
# Third party programs must not access this file directly, but only through the
# symlink at /etc/resolv.conf. To manage man:resolv.conf(5) in a different way,
# replace this symlink by a static file or a different symlink.
#
# See man:systemd-resolved.service(8) for details about the supported modes of
# operation for /etc/resolv.conf.

nameserver 127.0.0.53
options edns0
search ad.oit.ac.jp

我将此代码添加到 /etc/resolv.conf 中。

search xway.me

然后我得到了这个错误。

error doing DNS lookup for NS records for "xway.me": lookup xway.me on 127.0.0.53:53: server misbehaving

添加nameserver 8.8.8.8 也失败了

error doing DNS lookup for NS records for "xway.me": lookup xway.me on 127.0.0.53:53: no such host

使用 kops 创建:

$ kops create cluster --name xway.me --state s3://xway.me-kops

cluster "xway.me" already exists; use 'kops update cluster' to apply changes

我想知道

我怎样才能成功运行kops update cluster

【问题讨论】:

    标签: amazon-web-services kubernetes kops


    【解决方案1】:

    当您使用私有 DNS 记录时,它们通常不会在本地解析。您需要托管在启用了私有 route53 记录的 VPC 中的 DNS 转发器。

    kOps 记录不会暴露任何特别敏感的内容,但如果您不想使用公共记录,可以选择使用Gossip cluster

    虽然有一个known issue with combining gossip with terraform

    【讨论】:

      猜你喜欢
      • 2018-10-26
      • 2018-09-19
      • 2018-08-02
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-11-08
      • 2020-10-15
      • 2019-11-09
      相关资源
      最近更新 更多