我在从另一人访问K8服务时遇到问题。
核心DNS配置图
# Please edit the object below. Lines beginning with a '#' will be ignored,
# and an empty file will abort the edit. If an error occurs while saving this file will be
# reopened with the relevant failures.
#
apiVersion: v1
data:
Corefile: |
.:53 {
errors
health {
lameduck 5s
}
ready
kubernetes cluster.local in-addr.arpa ip6.arpa {
pods insecure
fallthrough in-addr.arpa ip6.arpa
ttl 30
}
prometheus :9153
forward . /etc/resolv.conf
cache 30
loop
reload
loadbalance
}
kind: ConfigMap
metadata:
creationTimestamp: "2020-02-19T19:48:57Z"
name: coredns
namespace: kube-system
resourceVersion: "207"
selfLink: /api/v1/namespaces/kube-system/configmaps/coredns
uid: 6ccfa9bf-da03-4916-ae8c-e49d432a90e4
运行源服务的节点上的TCP转储
20:31:06.339312 IP 192.168.190.8.41456 > 10.96.0.10.domain: 8043+ A? spin-redis-bootstrap.spinnaker.spinnaker.svc.cluster.local. (76)
20:31:06.339504 IP 192.168.190.8.41456 > 10.96.0.10.domain: 8755+ AAAA? spin-redis-bootstrap.spinnaker.spinnaker.svc.cluster.local. (76)
即使不允许我ping诸如google.com之类的外部URL,但我也可以使用其IP对其进行ping操作。