The following steps will quickly deploy a Rancher Server with a single node cluster attached.
Prerequisites
Note Deploying to DigitalOcean will incur charges.
- DigitalOcean Account: You will require an account on DigitalOcean as this is where the server and cluster will run.
- DigitalOcean Access Key: Use this link to create a DigitalOcean Access Key if you don't have one.
- Terraform: Used to provision the server and cluster to DigitalOcean.
Getting Started
-
Clone Rancher Quickstart to a folder using
git clone https://github.com/rancher/quickstart. -
Go into the DigitalOcean folder containing the terraform file by executing
cd quickstart/do. -
Rename the
terraform.tfvars.examplefile toterraform.tfvars. -
Edit
terraform.tfvarsto include your DigitalOcean Access Key. -
Optional: Edit
terraform.tfvarsto:- Change the number of nodes. (
count_agent_all_nodes) - Change the password of the
adminuser for logging into Rancher. (admin_password)
- Change the number of nodes. (
-
Run
terraform init. -
To initiate the creation of the environment, run
terraform apply. Then wait for the the following output:Apply complete! Resources: 2 added, 0 changed, 0 destroyed. Outputs: rancher-url = [ https://xxx.xxx.xxx.xxx ] -
Paste the
rancher-urlfrom the output above into the browser. Log in when prompted (default password isadmin).
Result: Rancher Server and your Kubernetes cluster is installed on DigitalOcean.
What's Next?
Use Rancher to create a deployment. For more information, see Creating Deployments.
Destroying the Environment
-
From the
quickstart/dofolder, executeterraform destroy --force. -
Wait for confirmation that all resources have been destroyed.