OpenShift群集的DNS设置
如前所述,我正在尝试使用虚拟机设置OpenShift群集。这些虚拟机将托管在VirtualBox上。在这篇文章中,在DNS下,它说 群集中的所有主机都需要可以通过DNS解析。此外,如果使用控制节点作为ansible安装程序,它也应该能够解析集群中的所有主机OpenShift群集的DNS设置,dns,openshift,virtualbox,Dns,Openshift,Virtualbox,如前所述,我正在尝试使用虚拟机设置OpenShift群集。这些虚拟机将托管在VirtualBox上。在这篇文章中,在DNS下,它说 群集中的所有主机都需要可以通过DNS解析。此外,如果使用控制节点作为ansible安装程序,它也应该能够解析集群中的所有主机 我已经开始使用BIND9设置DNS服务器。我可以为集群应用BIND9安装说明吗?DNS服务器是否应设置在其中一个主节点上?对于OpenShift 3.X和4.X,应在单独的位置(VM、Raspberry Pi等)设置单独的VM?,并且应为所有
我已经开始使用BIND9设置DNS服务器。我可以为集群应用BIND9安装说明吗?DNS服务器是否应设置在其中一个主节点上?对于OpenShift 3.X和4.X,应在单独的位置(VM、Raspberry Pi等)设置单独的VM?,并且应为所有群集主机、公共api端点、专用api端点和HAProxy入口控制器设置A和PTR记录 注意:如果您正在部署Openshift 4.X,那么uncontained.io上的文档将有点过时,因为Red Hat consulting正在追赶他们的文档。OpenShift 3.X和4.X的安装和管理机制截然不同 如果您正在部署OpenShift 4.1,您还需要一个用于etcd的记录和SRV记录 可以找到OpenShift 4.1裸机DNS要求的文档 我使用的一个示例dnsmasq设置用于一个单主单工作OpenShift 4.1裸机集群,该集群的名称为:ocp4和
base\u域:example.com
,而一个用作DNS服务器、DHCP服务器、负载平衡器和PXE服务器的实用程序服务器可能如下所示:
no-hosts
domain=example.com,10.0.10.0/24,local
auth-zone=example.com,10.0.10.0/24
host-record=ocp4-utility.example.com,10.0.10.10
host-record=ocp4-master.example.com,10.0.10.11
host-record=ocp4-worker,10.0.10.12
host-record=ocp4-bootstrap,10.0.10.13
host-record=api.ocp4.example.com,10.0.10.10
host-record=api-int.ocp4.example.com,10.0.10.10
host-record=etcd-0.ocp4.example.com,10.0.10.11
srv-host=_etcd-server-ssl._tcp.ocp4.example.com,etcd-0.ocp4.example.com,2380,0,10
address=/apps.ocp4.example.com/10.0.10.10
以下是公用服务器上运行的“负载平衡器”的HAProxy配置:
global
log 127.0.0.1 local2
chroot /var/lib/haproxy
pidfile /var/run/haproxy.pid
maxconn 4000
user haproxy
group haproxy
daemon
defaults
mode tcp
log global
option tcplog
retries 3
timeout http-request 10s
timeout queue 1m
timeout connect 10s
timeout client 1m
timeout server 1m
timeout http-keep-alive 10s
timeout check 10s
maxconn 3000
listen stats
bind :9000
mode http
stats enable
stats hide-version
stats realm Haproxy\ Statistics
stats uri /haproxy_stats
stats auth admin:admin
frontend kubernetes_api
bind 0.0.0.0:6443
default_backend kubernetes_api
backend kubernetes_api
balance roundrobin
option ssl-hello-chk
server bootstrap 10.0.10.13:6443 check
server master 10.0.10.11:6443 check
frontend machine_config
bind 0.0.0.0:22623
default_backend machine_config
backend machine_config
balance roundrobin
option ssl-hello-chk
server bootstrap 10.0.10.13:22623 check
server master 10.0.10.11:22623 check
frontend router_https
bind 0.0.0.0:443
default_backend router_https
backend router_https
balance roundrobin
option ssl-hello-chk
server worker 10.0.10.12:443 check
frontend router_http
mode http
option httplog
bind 0.0.0.0:80
default_backend router_http
backend router_http
mode http
balance roundrobin
server worker 10.0.10.12:80 check
我将构建OpenShift 3.x集群,因为Ansible方法“更容易”。关于为OpenShift 3.x设置A和PTR记录有什么建议吗?