My understanding is that OpenShift is simply the RedHat flavor of managing a Kubernetes environment. I've skipped OpenShift and just set up a Kubernetes cluster with some external postgresql servers.
I've used 6 servers (these can be VMs or physical servers) to setup a kubernetes cluster, 3 will be used Kubernetes masters with ETCd running on them as well. The remaining 3 in the cluster will be the Kubernetes Minions(Worker Nodes). Those minions will host the pods that make up the AWX Instances. I'm using Weavenet for the container networking which isn't a requirement, but it was the easiest container networking solution to figure out and it didn't require any special network configuration like some of the other container networking solutions needed.
I've written an Ansible Playbook that I'll see if I can share that will take 3 brand new CentOS servers and installs/configures PostGres on them and sets up replication, creates the AWX database and user, and creates a VIP on an F5 with weighted priority groups and health checks so that connections are always sent to the primary unless the primary postgres server is unreachable on port 5432(the default port for postgresql) in which case connections are sent to the secondary instance. The 3 external postgres servers are setup as cascading slaves which means that the primary is running as the RW master, the second is a RO Slave of the Primary and the third is a slave of the Secondary so that if the primary fails for whatever reason the secondary still has redundancy.
I've got the Kubernetes Cluster setup manually for now since I was working through the initial design/implementation, but I will be working on a similar playbook to get the Kubernetes Cluster setup from fresh installs.
Once the Kubernetes Cluster and the Postgres Servers are setup, I reuse the inventory file that I originally used to setup the postgres servers along with the official AWX Installer playbook since I've seen more than a few places where someone was asking for help with an issue and if it was ever mentioned that you didn't use their official installation method they'd basically throw their hands up and tell you to go back to the author of the blog post, RPM, or whatever else you were able to find on the subject and ask them for help and I really didn't want to run into that myself.
Once AWX is installed on the Kubernetes Cluster, you should have a deployment, a replica set, a pod, the three necessary services, and an ingress on your Kubernetes Cluster.
In order to scale up to the three separate worker nodes (or more) you described you'd just log into the Kuberentes Dashboard and go to Deployments, then select the awx deployment and click scale and change it from one to three and the additional pods/instances will then spin up and be added to the necessary services/ingresses to allow the traffic to be sent to them as well. If you need to change the size of your cluster whether that's growing or shrinking you can always change that number later on down the line too. Each pod will be configured the same with just a different name and internal to the Kubernetes Cluster IP addresses and will contain:
- awx_web
- awx_task
- awx_rabbitmq
- memcached
Once that's all in place you should be able to go to
http://anyworkernode:XXXXX where XXXXX is equal to the port specified in the Service "awx-web-svc" and you should then be able to connect to one of the awx-web containers.
I've then taken the extra step of setting up a VIP on an F5 with SSL Termination and health checks so that cluster members can go offline without impacting user experience as the load balancer should just start sending them to the remaining healthy cluster members.. After that's setup users can go to
https://yourawxurl and it will accept the HTTPS connections on port 443 like any standard website would and then passes the traffic on to the cluster on the unique port that was specified in the "awx-web-svc"..
Sorry that this brief explanation is a bit long, but there's a lot to go over and it's been way more complicated to get going than I originally thought it would be since I had a basic knowledge of Docker, but no background in Kubernetes or OpenShift or really even postgresql and I have had to figure out how all the pieces fit together in addition to sifting through and trying a few different peoples proposed solutions which were close but I couldn't quite get them to work.
Let me know if you're still interested and I can try to throw together a doc that outlines how to set this whole thing up from the ground up. If you need clarification on something let me know and I'll do my best to answer your question(s).