Pre-requisites
Preparing Pre-requisites
We will be deploying OCP cluster using IPI method once the following pre-requisites are met. Be sure to make sure all pre-requisites are prepared.
Preparing your HPOC cluster
We have planned enough resources in Nutanix cluster for you to deploy OCP cluster and workloads as well.
For latest OCP resource requirements refer to OpenShift portal here.
At the time of writing this document the following resources are created by OCP IPI installer.
| OCP Role | Operating System | vCPU | RAM | Storage |
|---|---|---|---|---|
| Master x 3 | RHCOS | 8 | 16 GB | 120 GB |
| Worker x 2 | RHCOS, RHEL 7.9, or RHEL 8.4 | 4 | 16 GB | 120 GB |
Additional space for bootstrap vms (deleted after install) and RHCOS image files are also accounted for.
AHV Networking
We will first find two IPs for OCP api and apps ingress endpoints in our network and add it to the Primary IPAM network blacklist.
Find the CIDR range for your Primary IPAM network either from RX or from your instrutor
Logon to your
UserXX-LinuxToolsVMTerminal in the browser usingcode-serverthat you installed in the previous sectionFind two unused static IP addresses
- Template Command
- Example Command
nmap -v -sn 10.x.x.x/x # use Nutanix Cluster's IPAM CIDRnmap -v -sn 10.38.18.192/26 # use Nutanix Cluster's IPAM CIDRSample output - choose the first two consecutive IPsNmap scan report for 10.38.18.219 [host down]
Nmap scan report for 10.38.18.220 [host down]
Nmap scan report for 10.38.18.221
Host is up (-0.098s latency).Logon to any CVM in your cluster and execute the following to add chosen static IPs to the Primary IPAM network
- Username: nutanix
- Password: your cluster password # Use Lookup Tool to find your CVM/PE Cluster password
- Template Command
- Example Command
acli net.add_to_ip_blacklist <your-ipam-ahv-network> ip_list=10.38.18.219,10.38.18.220Sample commandacli net.add_to_ip_blacklist Primary ip_list=10.38.18.219,10.38.18.220
Add DNS Records
In this section we will add PC, API and APPS Ingress DNS records for lookup by OCP IPI installer.
Your OCP cluster's name becomes a subdomain in your DNS zone ntnxlab.local. All OCP cluster related lookups are located within subdomain.
- Main domain -
ntnxlab.local(this gets created with your HPOC reservation)- Sub domain -
ocpuserXX.ntnxlab.local(e.g. ocpuser01, ocpuser02, etc, is your OCP cluster's name)
- Sub domain -
Logon to the
AutoADwindows VMUsername: administrator
Password: default # Use lookup tool to find the password
We will add the following entries to DNS server using the two consecutive IPs you found in the previous section
Use your assigned HPOC cluster's IP AddressesThe IP addresses in the following commands are used as an example. You should use IP address details that belong to your HPOC cluster.
For information on locating your cluster IP see Lookup website.
Open PowerShell ISE as Administrator and create the two A records
cautionCreate entry for Prism Central (pc) only if it is not present
- Template commands
- Sample commands
Add the API A record - use your own subdomainAdd-DnsServerResourceRecordA -Name api.<ocpuserXX> -IPv4Address <your API IP> -ZoneName ntnxlab.local -ZoneScope ntnxlab.localAdd the apps Ingress A record - use your own subdomainAdd-DnsServerResourceRecordA -Name *.apps.<ocpuserXX> -IPv4Address <your Ingress IP> -ZoneName ntnxlab.local -ZoneScope ntnxlab.localOptional - Add the Prism Central A record - if not presentAdd-DnsServerResourceRecordA -Name pc -IPv4Address <your PC IP> -ZoneName ntnxlab.local -ZoneScope ntnxlab.localOptional - Add the Prism Central A record - if not presentAdd-DnsServerResourceRecordA -Name pc -IPv4Address 10.38.18.201 -ZoneName ntnxlab.local -ZoneScope ntnxlab.localTest name resolution for added entries from
AutoADVMnslookup api.ocpuser01.ntnxlab.local
Server: dc.ntnxlab.local
Address: 10.38.18.203
Name: api.ocpuser01.ntnxlab.local
Address: 10.38.18.219nslookup myapp.apps.ocpuser01.ntnxlab.local
Server: dc.ntnxlab.local
Address: 10.38.18.203
Name: myapp.apps.ocpuser01.ntnxlab.local
Address: 10.38.18.220nslookup pc.ntnxlab.local
Server: dc.ntnxlab.local
Address: 10.38.18.203
Name: pc.ntnxlab.local
Address: 10.38.3.201Test name resolution for added entries from
UserXX-LinuxToolsVM
Downloading OCP Tools
We will need to the OCP tools mentioned in the pre-requisites section to prepare our environment
You can get the URLs to download the tools and pull secret from RedHat Console:
Openshift > Clusters > Create Clusters > Datacenter > Nutanix AOS
In this section please using the download links provided is also ok.
Logon to
UserXX-LinuxToolsVMGo to Terminal in
VSCodeon the browserCreate a folder under your user name from cluster lookup site (if you are in a lab environment)
Use your user number - for example ocpuser01cd $HOME
mkdir ocpuserXX # e.g. `mkdir ocpuser01` / mkdir ocpuser01
cd ocpuserXX # e.g. cd ocpuser01
curl -O https://mirror.openshift.com/pub/openshift-v4/x86_64/clients/ocp/latest/openshift-client-linux.tar.gz
curl -O https://mirror.openshift.com/pub/openshift-v4/x86_64/clients/ocp/latest/openshift-install-linux.tar.gzExtract the binaries and copy them to
/usr/local/binfor pathless accesstar xvf openshift-install-linux.tar.gz
tar xvf openshift-client-linux.tar.gzAdding to pathsudo cp kubectl /usr/local/bin
sudo cp oc /usr/local/bin
sudo cp openshift-install /usr/local/binGo to the IPI Installer Web Console and click on Copy pull secret button
Now that the pull secret value is in your clipboard, paste the contents string to a pull secret file in the same directory
vi pull_secret.jsonMake sure all the files are in the ocpuserXX directory
ls -lDirectory listing-rwxr-xr-x 2 root root 123877776 Aug 29 16:30 kubectl
-rwxr-xr-x 2 root root 123877776 Aug 29 16:30 oc
drwxr-x--- 2 root root 4096 Sep 22 06:56 openshift
-rwxr-xr-x 1 root root 481972224 Sep 1 16:07 openshift-install
-rw-r--r-- 1 root root 2819 Sep 22 05:27 pull_secret.json
Creating and Installing SSL Certificate on Prism Central
Only one person needs to do this section for generate and install SSL certificates for Prism Central.
If you are sharing a HPOC for multiple users, then you need to do this section only once. Decide with other participants sharing your cluster before proceeding.
In this section we will do the following:
- Create a Root CA on your
UserXX-LinuxToolsVM - Create a Certificate Signing Request (CSR) for Prism Central
- Sign the CSR using Root CA's private key
All this will be done on the UserXX-LinuxToolsVM.
In
VSCodeterminalInstall
mkcertcommandsudo apt install -y libnss3-tools
sudo apt install -y mkcertCreate the Root CA certificates
mkcert --installThis command would install CA on the
UserXX-LinuxToolsVMand add therootCA.pempublic certificate to system trust storeCopy the contents of
rootCA.pempublic certificate to your present working directorycp /home/ubuntu/.local/share/mkcert/rootCA.pem $HOME/ocpuserXX/Create public and private key certificates for
pc.ntnxlab.localmkcert pc.ntnxlab.localCommand outputmkcert pc.ntnxlab.local
#
Created a new certificate valid for the following names 📜
- "pc.ntnxlab.local"
The certificate is at "./pc.ntnxlab.local.pem" and the key at "./pc.ntnxlab.local-key.pem" ✅
It will expire on 30 August 2027List the contents of the directory to make sure all the certificates are present
ls -l *.pem | awk '{print $9}'Outputpc.ntnxlab.local.pem ## Prism Central's public certificate signed by Root CA
pc.ntnxlab.local-key.pem ## Prism Central's private key
rootCA.pem ## Root CA's public certificatecatout the contents of certificate files and copy them to your Mac/PC workstation in separate filesCreate these files on Mac/PC
- On a Mac, use
viin Terminal orVSCode(if you already have it installed) - On Windows PC, use
NotepadorVSCode
Sharing a Nutanix Cluster?If you are the certificate admin, share only the
rootCA.pempublic certificate with the other users so they can use this to create OCP cluster on the same Nutanix Cluster.- On a Mac, use
Create a hosts file entry on your Mac/PC for Prism Central's IP with the following content:
- Mac Command
- PC Command
sudo vi /etc/hostsnotepad C:\Windows\System32\drivers\etc\hostsHosts file content10.x.x.x pc.ntnxlab.localClear Mac/PC DNS Cache
- Mac Command
- PC Command
sudo dscacheutil -flushcache
sudo killall -HUP mDNSResponderipconfig /flushdnsLogon to Prism Central Web GUI on the Mac/PC using Chrome browser
https://pc.ntnxlab.local/Go to Settings > SSL Certificate
Click on Replace Certificate
Select Import Key and Certificate
Click Next
Choose the following:
Private Key Type - RSA 2048 bit
Private Key -
pc.ntnxlab.local-key.pemPublic Certificate -
pc.ntnxlab.local.pemCA Certificate/Chain -
rootCA.pemClick on Import Files
Prism Central GUI will accept the certificate and restart for the changes to take effect.

You have now successfully installed SSL certificate on Prism Central.
cautionDo not proceed to the next steps until Prism Central Certificate is installed without errors.
Contact your lab instructors if you need help with troubleshooting SSL certificate issues.
Setting up Cloud Credential Operator Utility (CCOCTL)
Setting up of is necessary for Nutanix cluster credentials to be used with OCP cluster.
Refer to Cloud Credential Operator CCO for more information.
In the
UserXX-LinuxToolsVM, download and setupccoctlusing the following commandscd $HOME/ocpuserXX # e.g. cd $HOME/ocpuser01RELEASE_IMAGE=$(openshift-install version | awk '/release image/ {print $3}')CCO_IMAGE=$(oc adm release info --image-for='cloud-credential-operator' $RELEASE_IMAGE)oc image extract $CCO_IMAGE --file="/usr/bin/ccoctl" -a pull_secret.jsonchmod u+x ccoctlMake sure the ccoctl file is present
ls -lh ccoctlOutput-rwxr----- 1 ubuntu ubuntu Apr 19 00:41 ccoctlCreate a Prism Central credentials file in
credsdirectorymkdir creds
##
cat << EOF > creds/pc_credentials.yaml
credentials:
- type: basic_auth
data:
prismCentral:
username: "admin"
password: "PC-PASSWORD"
EOFEdit the
pc_credentials.yamlfile to change your Prism Central passwordvi creds/pc_credentials.yamlExtract the CredentialsRequests objects for Nutanix Prism Central and store in a
credreqsdirectoryoc adm release extract --credentials-requests --cloud=nutanix --to=credreqs -a pull_secret.json $RELEASE_IMAGEUse the ccoctl tool to process the CredentialsRequests objects and generate secret manifest files. These manifests file will be used during OCP cluster Certification
./ccoctl nutanix create-shared-secrets --credentials-requests-dir=credreqs --output-dir=. --credentials-source-filepath=creds/pc_credentials.yamlCheck the
openshift-machine-api-nutanix-credentials-credentials.yamlfile to make sure the contents are good usingcatcat manifests/openshift-machine-api-nutanix-credentials-credentials.yaml
Now that we have all pre-requisites completed, let us move on to creating the OCP cluster IPI installation manifest