Cluster

See also:

The OKE parameters concern mainly the following:

  • whether you want your OKE control plane to be public or private
  • whether to assign a public IP address to the API endpoint for public access
  • whether you want to deploy public or private worker nodes
  • whether you want to allow NodePort or ssh access to the worker nodes
  • Kubernetes options such as dashboard, networking
  • number of node pools and their respective size of the cluster
  • services and pods cidr blocks
  • whether to use encryption

Note

If you need to change the default services and pods' CIDRs, note the following:

  • The CIDR block you specify for the VCN must not overlap with the CIDR block you specify for the Kubernetes services.
  • The CIDR blocks you specify for pods running in the cluster must not overlap with CIDR blocks you specify for worker node and load balancer subnets.

Example usage

Basic cluster with defaults:

cluster_name       = "oke-example"
kubernetes_version = "v1.26.2"

Enhanced cluster with extra configuration:

create_cluster                    = true // *true/false
cluster_dns                       = null
cluster_kms_key_id                = null
cluster_name                      = "oke"
cluster_type                      = "enhanced" // *basic/enhanced
cni_type                          = "flannel"  // *flannel/npn
assign_public_ip_to_control_plane = true // true/*false
image_signing_keys                = []
kubernetes_version                = "v1.26.2"
pods_cidr                         = "10.244.0.0/16"
services_cidr                     = "10.96.0.0/16"
use_signed_images                 = false // true/*false