Setup Kubernetes on Oracle Cloud Infrastructure

We’re going to make use of the Terraform Installer for Kubernetes on Oracle Cloud Infrastructure to make setting up a Kubernetes cluster on OCI quick and easy.

Kubernetes is an Open Source system for automating deployment, scaling and management of containerised applications. In the last few years, Kubernetes has become the de-facto standard for container orchestration.

The Kubernetes Dashboard UI

In this article, I’ll show you how you can quickly deploy a production ready Kubernetes cluster running on Oracle’s cutting edge cloud infrastructure (OCI). We’ll use Terraform to do the hard work for us.

If you’ve used Kubernetes before, you’ll know that there are a hundred different ways to configure a new cluster (such as Kubeadm). Having an opinionated way to provision your cluster is definitely a big help for most people. We’re going to make use of the Terraform Installer for Kubernetes on Oracle Cloud Infrastructure to make setting up a Kubernetes cluster on OCI quick and easy.

Prerequisites

We’re going to need a few things before we can get started. Notably, we’ll need to get hold of Terraform and the Terraform provider for OCI. Both of these components are open source. I’ve put together a script that shows you how to install these on a typical Ubuntu Linux machine

Setup Kubernetes

OK, now we have both Terraform and the Terraform OCI provider installed, we can go ahead and setup our Kubernetes cluster using the Terraform Kubernetes Install for Oracle Cloud Infrastructure.

Clone the project somewhere into your local workspace

git clone https://github.com/oracle/terraform-kubernetes-installer.git

Follow the instructions in the README to get your cluster up and running.

Persistent Volumes and Load Balancing

The vanilla setup above does not give you the ability to create load balancers or persistent volumes in Oracle’s cloud. To do this we are going to need to install some additional plugins for persistent volumes along with an external cloud provider to enable the load balancing functionality.

We are currently getting ready to open source these features and I’ll talk about how to use them once they’re publicly available.