病案医生描述了以下内容:
若要为本机配置DNS,请从建立网络中获取外部IP或CNAME,并按照以下方式配置它
# Here knative.example.com is the domain suffix for your cluster
*.knative.example.com == A 35.233.41.212# Here knative.example.com is the domain suffix for your cluster
*.knative.example.com == CNAME a317a278525d111e89f272a164fd35fb-1510370581.eu-central-1.elb.amazonaws.com但是,我的环境没有外部负载均衡器,因此没有外部IP:
$ kubectl --namespace istio-system get service istio-ingressgateway
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
istio-ingressgateway NodePort 10.110.132.172 <none> 15021:31278/TCP,80:32725/TCP,443:30557/TCP,15443:32309/TCP 8h我确实配置了一个ingresgateway:
$ kubectl get po -l istio=ingressgateway -n istio-system \
-o jsonpath='{.items[*].status.hostIP}'
10.1.0.193 10.1.0.132 10.1.0.174我可以简单地按以下方式设置DNS吗?
*.knative.example.com [some TTL] IN A 10.1.0.193
*.knative.example.com [some TTL] IN A 10.1.0.132
*.knative.example.com [some TTL] IN A 10.1.0.174发布于 2021-06-08 03:30:04
看起来这里使用的是hostPort网络;如果是这样的话,Kubernetes将将主机IP地址的端口80和443映射到Istio的特使端口。本周,只要您的ingressgateway荚保持在同一台计算机上(例如,如果您使用守护进程并在集群中有3个节点,则将所有三个节点IP放在DNS中)即可工作。这里有几个地方会出现故障,Kubernetes LoadBalancer服务会运行得更好:
如果可能的话,您可以将MetalLB视为上述任何一个问题的谎言成本软件负载均衡器。如果上述任何问题都不是主要问题,nodePort服务就会比LoadBalancer服务简单一些。
发布于 2021-05-31 18:53:29
按照以下方式设置DNS,到目前为止,对我来说还可以:
*.knative.example.com [some TTL] IN A 10.1.0.193
*.knative.example.com [some TTL] IN A 10.1.0.132
*.knative.example.com [some TTL] IN A 10.1.0.174https://stackoverflow.com/questions/67766104
复制相似问题