在下面有以下设置。Flannel 处于 VXLAN 模式。名称解析不适用于 Windows 节点。验证以下工作:
- Windows POD -> 外部 DNS 服务器解析
- Windows POD -> 到 kubernetes API 服务 IP 的 HTTPS 连接
- 主服务器上的 Linux POD -> 针对 DNS 服务的名称解析
以下不起作用:
- Windows POD -> 针对 DNS 服务的 DNS 查询
- Windows POD -> 针对 DNS pod 的 IP 的 DNS 查询
gregory@master1:~$ k get nodes
NAME STATUS ROLES AGE VERSION
master1 Ready master 22h v1.18.1
winworker1 Ready <none> 15h v1.18.1
winworker2 Ready <none> 169m v1.18.1
DNS 复制
PS C:\> Test-NetConnection 10.96.0.10 -port 53
WARNING: TCP connect to (10.96.0.10 : 53) failed
ComputerName : 10.96.0.10
RemoteAddress : 10.96.0.10
RemotePort : 53
InterfaceAlias : vEthernet (62a92abe4497c380bae9dfdee71ae5069cd0bd1b66208f58016345b7a6d9fabe_flannel.4096)
SourceAddress : 10.244.1.4
PingSucceeded : False
PingReplyDetails (RTT) : 0 ms
TcpTestSucceeded : False
PS C:\> Test-NetConnection 10.96.0.1 -port 443
ComputerName : 10.96.0.1
RemoteAddress : 10.96.0.1
RemotePort : 443
InterfaceAlias : vEthernet (62a92abe4497c380bae9dfdee71ae5069cd0bd1b66208f58016345b7a6d9fabe_flannel.4096)
SourceAddress : 10.244.1.4
TcpTestSucceeded : True
PS C:\> Resolve-dnsname www.google.com -server 8.8.8.8
Name Type TTL Section IPAddress
---- ---- --- ------- ---------
www.google.com AAAA 299 Answer 2607:f8b0:4004:811::2004
www.google.com A 299 Answer 172.217.15.100
PS C:\> Resolve-dnsname www.google.com -server 10.96.0.10
Resolve-dnsname : www.google.com : This operation returned because the timeout period expired