Skip to content
 
 

Latest commit

 

History

38 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Terraform a Kubernetes cluster on Oracle Cloud Infrastructure (OCI)

Inspired by oci-oke Oracle quickstart guide.

Design choices

Both the Kubernetes API endpoint and the service load balancer are public. Corresponds to the use-case defined here.

OKE Images

Starting with Kubernetes 1.35, platform images are not supported for worker nodes — only OKE images (which have Kubernetes pre-baked) are allowed. See OCI docs on images and shapes.

This module uses data.oci_containerengine_node_pool_option to discover available OKE images and selects the appropriate one by matching on:

  • Kubernetes version — the kubernetes_version variable (without v prefix) is matched against the OKE image source name (e.g. 1.35.2 matches ...-OKE-1.35.2-1402)
  • CPU architecture — A1 Flex shapes are ARM (aarch64); all other Standard shapes are x86_64

The kubernetes_version variable should be set without the v prefix (e.g. "1.35.2"). The module prepends v when passing it to the OCI API for the cluster and node pool resources.

Variables

Variable Description Default
compartment_id OCI compartment OCID
vcn_name VCN name "vcn"
vcn_cidr VCN CIDR block "10.1.0.0/16"
cluster_name OKE cluster name "oke"
kubernetes_version K8s version without v prefix (e.g. "1.35.2") "v1.26.2"
node_pools Map of node pool configs (shape, ocpus, memory, size, initial_node_labels, boot_volume_size_in_gbs)
ssh_public_key SSH public key for nodes (auto-generated if empty) ""
is_api_subnet_public Public API endpoint true
is_loadbalancer_subnet_public Public load balancer true
is_nodes_subnet_public Public worker nodes false

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages