Create a Kubernetes Cluster

Use Terraform to set up a Kubernetes cluster in your Oracle Cloud Infrastructure account.

Key tasks include how to:

  • Copy your existing scripts from Terraform tutorials.
  • Edit existing scripts for reuse.
  • Write new scripts for a Kubernetes cluster.
A diagram of the components needed to create a Kubernetes cluster with Terraform. From a local Linux environment, the user connects to an Oracle Cloud Infrastructure account and creates a cluster. The cluster creation includes creating network resources. The network resources include one private regional subnet for worker nodes. These nodes are compute nodes. There is also a public regional subnet created to use for load balancers. In this example, each regional subnet spans three availability domains: AD1, AD2, and AD3. The public subnet is connected to the internet with a two-way arrow. The private subnet has two one-directional, outgoing arrows, one to the internet and the other to Oracle services network.

For more information, see:

1. Gather Required Information

Gather information for the compute instances in the node pool.

2. Copy Existing Scripts

Copy scripts created at Set Up a Simple Infrastructure with OCI Terraform. Then, remove the scripts and outputs related to the compute instance. In the next section, you declare a node pool with compute instances.

3. Create Scripts

Create scripts for a cluster, a node pool, and to print outputs.

4. Run Scripts

Run your Terraform scripts to create a compartment, a virtual cloud network, a Kubernetes cluster, and a node pool.

What's Next

Congratulations! You have created a Kubernetes cluster using Terraform, in your Oracle Cloud Infrastructure account.

Now that you have a Kubernetes cluster, try Kubernetes tutorials at Developer Tutorials.

To explore more information about development with Oracle products, check out these sites: