Spinning up a Single-Node OpenShift (SNO) cluster on AWS for training or lab environments doesn't always require heavy Terraform or CloudFormation scaffolding. With User-Provisioned Infrastructure (UPI), you stay close to the actual mechanics and see every stage of the cluster coming up.
Because AWS AMIs do not support "Bootstrap-in-Place" installations, you briefly start with a temporary bootstrap instance before the master node takes over.
What You Need
-
Temporary Bootstrap Node: EC2
m6i.xlarge(4 vCPUs, 16 GB RAM) with 100 GBgp3storage. -
Master Node (SNO): EC2
m6i.2xlarge(8 vCPUs, 32 GB RAM) with 120 GBgp3storage and an Elastic IP. -
Management Station / Web Server: An external host with
ocandopenshift-install, SSH access, and an Nginx web server to serve the Ignition configs. -
Prerequisites: Your own DNS domain, a cluster name (e.g.,
ocp), a Red Hat pull secret, and an SSH public key.
Key Steps at a Glance
1. Fresh Directory & install-config.yaml
Always run the installer in a clean, empty directory—leftover hidden state files from earlier attempts can cause certificate or SNI mismatches. Also back up your install-config.yaml, as the installer removes it during setup:
apiVersion: v1
baseDomain: x68k.de
metadata:
name: ocp
compute:
- name: worker
replicas: 0
controlPlane:
name: master
replicas: 1
platform: {}
platform:
none: {}
fips: false
pullSecret: '{"auths":{...}}'
sshKey: 'ssh-ed25519 AAAAC3...'
(Add your Red Hat pull secret and SSH public key in the final two lines.)
2. Schedulable Master & Ignition Pointers
To allow the ingress router and image registry to run on the single node, set mastersSchedulable to true before generating the Ignition files:
openshift-install create manifests --dir=.
sed -i 's/mastersSchedulable: false/mastersSchedulable: true/' manifests/cluster-scheduler-02-config.yml
openshift-install create ignition-configs --dir=.
Because AWS EC2 User-Data is limited to 16 KB and the generated .ign files are larger, host bootstrap.ign and master.ign on your Nginx web server and pass small JSON pointer configs into EC2 User-Data:
{"ignition": {"version": "3.2.0","config": {"replace": {"source": "https://mgmt.mydoma.in/ignition/bootstrap.ign"}}}}
3. Launch, DNS, and Cutover
- Resize the
gp3root volumes directly in the EC2 launch wizard—RHCOS expands the root partition automatically on first boot. - Configure your DNS records (
api.<cluster>.<domain>,api-int.<cluster>.<domain>, and*.apps.<cluster>.<domain>) with a low TTL (60s) so updates propagate quickly. - Once the master takes over the control plane, point the API DNS records to the master and terminate the bootstrap node after
openshift-install wait-for bootstrap-completesucceeds.
4. Common Pitfalls & Recovery Anchors
-
Pending CSRs: Unapproved Certificate Signing Requests can leave network and workload pods stuck in
ContainerCreating. -
Local Kubeconfig on the Master: If the external API isn't reachable yet over SSH, inspect the cluster via
/etc/kubernetes/static-pod-resources/kube-apiserver-certs/secrets/node-kubeconfigs/localhost.kubeconfig. -
etcd Quorum: If
etcdloses quorum during handoff, runsudo -E /usr/local/bin/quorum-restore.sh(stopping runningetcdcontainers first if needed).
5. Cleanup & Storage
Once the cluster is up, tighten your security group rules, remove the Ignition files from the web server (as they contain sensitive data), and raise the DNS TTL back up. For dynamic PVC provisioning, install Red Hat LVM Storage (LVMS) via a Subscription in the openshift-storage namespace.
Wrap-Up
For workshops and lab environments, the UPI route on AWS is great when you want visibility into bootstrap, cutover, and storage without hiding behind black-box automation.
For the full step-by-step walkthrough, check out the detailed guide in the repository: openshift_single_node_aws_upi_installation_guide.md.
Top comments (0)