Deploy Openshift Container Platform (OCP) v3.11 to Amazon Web Services (AWS) via Terraform
- Creates a basic OCP v3.11 cluster with a single master node, single compute node, and a bastion.
- (Optional) Copy/rename
terraform.tfvars.example
toterraform.tfvars
and fill in the information (otherwise these will be prompted on apply):mv terraform.tfvars.example terraform.tfvars
- Initialize and apply the Terraform configuration. Provide verification to deploy OCP v3.11 (add
-auto-approve
to apply without user verification):terraform init && terraform apply
- The Terraform output provides access credentials for the cluster.
(NOTE: You can administer the cluster directly by SSH-ing to the Bastion and then SSH-ing to the Master, where
oc
is already configured and logged in with the default Cluster Administrator,system:admin
):- To see all output:
terraform output
- To see only one output (handy for copy/paste or scripts):
terraform output <variable>
- Example: SSH directly to Master node through Bastion
$(terraform output bastion_ssh) -A -t ssh $(terraform output private_dns_master)
- To see all output:
- To destroy the cluster and its resources:
terraform destroy