# Red Hat OpenShift Container Platform Cluster deployment
This section describes the process to deploy Red Hat OpenShift Container Platform 4.
Pre-requisites
Bootstrap node should be up.
Master nodes should be up and ready.
# Deploying an OpenShift cluster
This section covers the steps to deploy a Red Hat OpenShift Container Platform 4 cluster with master nodes and worker nodes running RHCOS. After the operating system is installed on the nodes, verify the installation and then perform the following steps:
Login to the installer VM as non-root user.
Execute the following command to bootstrap the nodes.
> $BASE_DIR/installer/library/openshift_components/openshift-install wait-for bootstrap-complete --log-level=debug
RESULT
DEBUG OpenShift Installer v4.6 DEBUG Built from commit 425e4ff0037487e32571258640b39f56d5ee5572 INFO Waiting up to 30m0s for the Kubernetes API at https://api.ocp.pxelocal.local:6443... INFO API v1.14.6+76aeb0c up INFO Waiting up to 30m0s for bootstrapping to complete... DEBUG Bootstrap status: complete INFO It is now safe to remove the bootstrap resources
NOTE
You can shut down or remove the bootstrap node after the completion of step 1 and step 2.
Run the following command to append the kubeconfig path to environment variables.
> export KUBECONFIG=$BASE_DIR/installer/ignitions/auth/kubeconfig
Run the following command to append the oc utility path to environment variables.
> export PATH=$PATH:$BASE_DIR/installer/library/openshift_components
Provide the PV storage for the registry. Execute the following command to set the image registry storage to an empty directory.
> oc patch configs.imageregistry.operator.openshift.io cluster --type merge --patch '{"spec":{"storage":{"emptyDir":{}}}}'
Execute the following command to complete the RedHat OpenShift Container Platform 4 cluster installation.
> $BASE_DIR/installer/library/openshift_components/openshift-install wait-for install-complete --log-level=debug
The result should appear like what appears below.
DEBUG OpenShift Installer v4.6 DEBUG Built from commit 6ed04f65b0f6a1e11f10afe658465ba8195ac459 INFO Waiting up to 30m0s for the cluster at https://api.rrocp.pxelocal.local:6443 to initialize... DEBUG Still waiting for the cluster to initialize: Working towards 4.5: 99% complete DEBUG Still waiting for the cluster to initialize: Working towards 4.5: 99% complete, waiting on authentication, console,image-registry DEBUG Still waiting for the cluster to initialize: Working towards 4.5: 99% complete DEBUG Still waiting for the cluster to initialize: Working towards 4.5: 100% complete, waiting on image-registry DEBUG Still waiting for the cluster to initialize: Cluster operator image-registry is still updating DEBUG Still waiting for the cluster to initialize: Cluster operator image-registry is still updating DEBUG Cluster is initialized INFO Waiting up to 10m0s for the openshift-console route to be created... DEBUG Route found in openshift-console namespace: console DEBUG Route found in openshift-console namespace: downloads DEBUG OpenShift console route is created INFO Install complete! INFO To access the cluster as the system:admin user when using 'oc', run 'export KUBECONFIG=/opt/hpe/solutions/ocp/hpe-solutions-openshift/DL/scalable/installer/library/ignitions/auth/kubeconfig' INFO Access the OpenShift web-console here: https://console-openshift-console.apps.ocp.pxelocal.local INFO Login to the console with user: kubeadmin, password: a6hKv-okLUA-Q9p3q-UXLc3
NOTE
Make a note of the cluster URL and the username for future access.
If the password is lost or forgotten, view the file kubeadmin-password located in the installer machine at $BASE_DIR/installer/library/ignitions/auth/.
Figure 9 shows the OpenShift Container Platform console view upon successful deployment.
Figure 9. OpenShift Web Console login screen