Infrastructure as code is an important methodology for ensuring that your distributed systems are treated as cattle and not pets. Your Kubernetes and Rancher clusters are no different. You should be able to provision your Rancher clusters, your Kubernetes clusters, and all of your apps with automation.
Rancher provides a number of tools to spin up Rancher clusters. RKE, or Rancher Kubernetes Engine, allows you to spin up Kubernetes clusters via code. That’s why setting up RKE is the first step in installing a Rancher HA cluster. But what happens after installation is just as important.
Hashicorp’s Terraform is an incredibly useful tool to automate the creation of infrastructure and other system components. It’s syntax is easy to use and it is highly customizable with a plugable provider mode. The original Terraform Provider for Rancher 1.x was incredibly popular for automating state in Rancher 1.x. So not long after we released 2.x, we started work on a Terraform provider to go with it.
This week, Hashicorp published the Rancher2 provider and it is now generally available. The repository used during initial development will be archived and all future development will occur in the terraform-providers repository.
On Monday afternoon, May 20 around 2pm Eastern Time, on the RanchCast we’ll explore this new tool in detail. Follow The RanchCast on Twitch or subscribe to The RanchCast YouTube channel so you don’t miss it!
Note: this post has been edited as The RanchCast was rescheduled from 1pm to 2pm, because I read the wrong week on my calendar.