Join us

Oracle Cloud Infrastructure- OKE and Terraform

Provisioning Kubernetes cluster using terraform. In this article, I am going describe the requirements to provision a Kubernetes cluster on OCI using terraform and deploying an application on Kubernetes cluster

Oracle Cloud Infrastructure

The next-generation cloud is designed to run any application, faster and more securely, for less. Try Oracle Cloud for free

Container Engine for Kubernetes (OKE)

Oracle Cloud Infrastructure Container Engine for Kubernetes is a fully-managed, scalable, and highly available service that you can use to deploy your containerized applications to the cloud. Use Container Engine for Kubernetes (OKE) when your development team wants to reliably build, deploy, and manage cloud-native applications

Terraform

Terraform is an infrastructure as code (IaC) tool that allows you to build, change, and version infrastructure safely and efficiently. This includes low-level components such as compute instances, storage, and networking, as well as high-level components such as DNS entries, SaaS features, etc.

PART 1

OCI Terraform Module https://github.com/oracle-terraform-modules/terraform-oci-oke

Install Terraform

For creating a OKE cluster what you need

  • A VCN, an Internet Gateway, a NAT gateway for private worker node deployment
  • worker subnets( public/private)with a set of security rules
  • load balancer subnets with its security rules

Step 1: Clone the terraform from git and cd terraform-oci-oke folder

Step 2: cp terraform.tfvars.example terraform.tfvars

Step 3: Finish Prerequisites or Check my Video(coming soon..)

Create a provider.tf file in root add 2 providers

Provider 1 -home regions

Provider 2- the current region where you want to provision your cluster.

step 4: Run terraform init command in the root folder

Step 4: Modify terraform.tfvars and add the fields copied in the prerequisites

For example:

Step 5: Run terraform plan command in the root folder to check any actions are required.

Step 6: Run terraform apply command in the root folder. This would create your OKE Cluster


Only registered users can post comments. Please, login or signup.

Start blogging about your favorite technologies, reach more readers and earn rewards!

Join other developers and claim your FAUN account now!

User Popularity
31

Influence

3k

Total Hits

1

Posts