Unattended Setup of Single Node OpenShift Cluster
--
Single node OpenShift cluster is ideal for edge computing or POC projects due to the scaled down resource requirement. Additionally, provision a cluster in a fully automated unattended way is the first important step towards a successful POC. In this paper, let’s explore the unattended approach to setup a single node OpenShift cluster.
Bastion Node
I am using KVM to provision VMs for the OCP cluster.
The bastion node to access the cluster is required. I am using a Ubuntu node for the bastion node.
As we have one single node cluster, the LB to route the traffic for the cluster API or the application services is not required.
The DNS to serve the A record and PTR record for the cluster during the bootup and runtime later is still required.
We will setup the DNS server on the bastion node.
Install the dnsmasq package with the apt command, then configure the dnsmasq with the following configuration files under /etc/dnsmasq.d
common.conf
# forward, use original DNS server
server=10.0.xxx.yyy
server=10.0.aaa.bbb
ocp413–1node.conf
address=/ocp413-1node-bastion.ocp413-1node.ibmcloud.io.cpak/192.168.10.209
ptr-record=209.10.168.192.in-addr.arpa,ocp413-1node-bastion.ocp413-1node.ibmcloud.io.cpak
address=/ocp413-1node-node.ocp413-1node.ibmcloud.io.cpak/192.168.10.201
ptr-record=201.10.168.192.in-addr.arpa,ocp413-1node-node.ocp413-1node.ibmcloud.io.cpak
address=/api.ocp413-1node.ibmcloud.io.cpak/192.168.10.201
address=/api-int.ocp413-1node.ibmcloud.io.cpak/192.168.10.201
address=/.apps.ocp413-1node.ibmcloud.io.cpak/192.168.10.201
The conf file above defines both the A record and the PTR record for the master node. It also define the api and api-int for the cluster API and the wildcard domain name for the applications.
Update the systemd-resolve service configuration, /etc/systemd/resolved.conf
[Resolve]
DNS=127.0.0.1
DNSStubListener=no
Restart the systemd-resolve and the dnsmsq service. Now we have the cluster DNS service available at the bastion node.