Continental Innovates with Rancher and Kubernetes
The following steps will quickly deploy a Rancher server on GCP in a single-node RKE Kubernetes cluster, with a single-node downstream Kubernetes cluster attached.
Note Deploying to Google GCP will incur charges.
Clone Rancher Quickstart to a folder using git clone https://github.com/rancher/quickstart.
git clone https://github.com/rancher/quickstart
Go into the GCP folder containing the terraform files by executing cd quickstart/gcp.
cd quickstart/gcp
Rename the terraform.tfvars.example file to terraform.tfvars.
terraform.tfvars.example
terraform.tfvars
Edit terraform.tfvars and customize the following variables:
gcp_account_json
rancher_server_admin_password
Optional: Modify optional variables within terraform.tfvars. See the Quickstart Readme and the GCP Quickstart Readme for more information. Suggestions include:
gcp_region
prefix
machine_type
n1-standard-1
n1-standard-2
n1-standard-4
ssh_key_file_name
~/.ssh/id_rsa
${ssh_key_file_name}.pub
Run terraform init.
terraform init
To initiate the creation of the environment, run terraform apply --auto-approve. Then wait for output similar to the following:
terraform apply --auto-approve
Apply complete! Resources: 16 added, 0 changed, 0 destroyed. Outputs: rancher_node_ip = xx.xx.xx.xx rancher_server_url = https://rancher.xx.xx.xx.xx.xip.io workload_node_ip = yy.yy.yy.yy
Paste the rancher_server_url from the output above into the browser. Log in when prompted (default username is admin, use the password set in rancher_server_admin_password).
rancher_server_url
admin
Two Kubernetes clusters are deployed into your GCP account, one running Rancher Server and the other ready for experimentation deployments.
Use Rancher to create a deployment. For more information, see Creating Deployments.
From the quickstart/gcp folder, execute terraform destroy --auto-approve.
quickstart/gcp
terraform destroy --auto-approve
Wait for confirmation that all resources have been destroyed.