Install an OpenShift v4 cluster with Calico.
Augments the applicable steps in the OpenShift documentation to install Calico.
Before you begin
Ensure that your environment meets the Calico system requirements.
If installing on AWS, ensure that you have configured an AWS account appropriate for OpenShift v4, and have set up your AWS credentials. Note that the OpenShift installer supports a subset of AWS regions.
Ensure that you have a RedHat account. A RedHat account is required to obtain the pull secret necessary to provision an OpenShift cluster.
Ensure that you have installed the OpenShift installer v4.2 or later and OpenShift command line interface from cloud.redhat.com.
Ensure that you have generated a local SSH private key and have added it to your ssh-agent
Create a configuration file for the OpenShift installer
First, create a staging directory for the installation. This directory will contain the configuration file, along with cluster state files, that OpenShift installer will create:
mkdir openshift-tigera-install && cd openshift-tigera-install
Now run OpenShift installer to create a default configuration file:
openshift-install create install-config
Note: Refer to the OpenShift installer documentation found on https://cloud.redhat.com/openshift/install for more information about the installer and any configuration changes required for your platform.
Once the installer has finished, your staging directory will contain the configuration file
Update the configuration file to use Calico
Override the OpenShift networking to use Calico and update the AWS instance types to meet the system requirements:
sed -i 's/OpenShiftSDN/Calico/' install-config.yaml
Generate the install manifests
Now generate the Kubernetes manifests using your configuration file:
openshift-install create manifests
Download the Calico manifests for OpenShift and add them to the generated manifests directory:
curl https://docs.projectcalico.org/manifests/ocp/crds/01-crd-installation.yaml -o manifests/01-crd-installation.yaml curl https://docs.projectcalico.org/manifests/ocp/crds/01-crd-tigerastatus.yaml -o manifests/01-crd-tigerastatus.yaml curl https://docs.projectcalico.org/manifests/ocp/tigera-operator/00-namespace-tigera-operator.yaml -o manifests/00-namespace-tigera-operator.yaml curl https://docs.projectcalico.org/manifests/ocp/tigera-operator/02-rolebinding-tigera-operator.yaml -o manifests/02-rolebinding-tigera-operator.yaml curl https://docs.projectcalico.org/manifests/ocp/tigera-operator/02-role-tigera-operator.yaml -o manifests/02-role-tigera-operator.yaml curl https://docs.projectcalico.org/manifests/ocp/tigera-operator/02-serviceaccount-tigera-operator.yaml -o manifests/02-serviceaccount-tigera-operator.yaml curl https://docs.projectcalico.org/manifests/ocp/tigera-operator/02-tigera-operator.yaml -o manifests/02-tigera-operator.yaml curl https://docs.projectcalico.org/manifests/ocp/01-cr-installation.yaml -o manifests/01-cr-installation.yaml
Create the cluster
Start the cluster creation with the following command and wait for it to complete.
openshift-install create cluster
Once the above command is complete, you can verify Calico is installed by verifying the components are available with the following command.
oc get tigerastatus
Note: To get more information, add
-o yamlto the above command.