Creating the Red Hat OpenShift cluster on Azure
Procedure
- Generate an SSH private key and add it to the
agent:
- Create or use an SSH key that is configured for authentication without a password.
For example, on a computer that uses a Linux® operating system, run this command to create this type of SSH key:
# ssh-keygen -t ed25519 -N '' -f <path>/<file_name>
- Start the
ssh-agent
process as a background task:# eval "$(ssh-agent -s)"
The following example shows a successful output:
Agent pid 31874
- Add your SSH private key to the
ssh-agent
:# ssh-add <path>/<file_name>
- Create or use an SSH key that is configured for authentication without a password.
- Obtain the installation program:
- Access the Red Hat OpenShift Cluster Manager.
- Obtain a pull secret.
- Download the OpenShift installation program for your operating system and place the file in the directory where you store the installation configuration files.
- Open the OpenShift installer
tar file by running this command:
# tar xvf openshift-install-linux.tar.gz
- From the Pull Secret page, download your installation pull secret as a .txt file.
- Create the install-config.yaml
file.
# ./openshift-install create install-config --dir=<Directory>
When you create the file, use these parameters:
Parameter Value SSH Public Key Select an SSH key to use to access your cluster machines. Platform AZURE Azure Subscription ID 297d75cf-…….. Azure Tenant ID 32bfacf3-8eb1-…… Azure Service Principal Client ID 12ea9986-….. Azure Service Principal Client Secret Enter the password that was specified when you created the service principal output. Region eastus Public Zone Name gi.priv.test (this name is the pseudo-DNS zone name) Cluster Name gi3120 Pull Secret Paste the pull secret that you obtained in this step. - Edit the file (issue the
cat install-config.yaml
command) according to the System requirements and prerequisites and Hardware cluster requirements.Tip: The install-config.yaml file is consumed during the installation process, so create a backup of the file so that it can be used to install multiple clusters. - Deploy the
cluster:
$ ./openshift-install create cluster --dir=<installation_directory> \ --log-level=info
The following example shows a successful output:
~]# ./openshift-install create cluster --dir gi3100-on-azure --log-level=info INFO Credentials loaded from file "/root/.azure/osServicePrincipal.json" INFO Consuming Install Config from target directory INFO Creating infrastructure resources... INFO Waiting up to 20m0s for the Kubernetes API at https://api.gi3100.gi.priv.test:6443... INFO API v1.20.0+bbbc079 up INFO Waiting up to 30m0s for bootstrapping to complete... INFO Destroying the bootstrap resources... INFO Waiting up to 40m0s for the cluster at https://api.gi3100.gi.priv.test:6443 to initialize... INFO Waiting up to 10m0s for the openshift-console route to be created... INFO Install complete! INFO To access the cluster as the system:admin user when using 'oc', run 'export KUBECONFIG=/root/gi3100-on-azure/auth/kubeconfig' INFO Access the OpenShift web-console here: https://console-openshift-console.apps.gi3100.gi.priv.test INFO Login to the console with user: "kubeadmin", and password: "2cVbo-4xsEq-s5Frc-tsxZN" INFO Time elapsed: 36m49s