Skip to content

Latest commit

 

History

History
83 lines (54 loc) · 2.45 KB

README.md

File metadata and controls

83 lines (54 loc) · 2.45 KB

Oracle Cloud Terraform Example

Example of a highly available Kubernetes cluster with Talos on Oracle Cloud. Based on the Talos Oracle Cloud Example.

Prequisites

general

  • a top-level tenancy

Notes

  • although not officially supported by Oracle Cloud, network LoadBalancers are provided through the Oracle Cloud Controller (only officially supported on OKE)
  • this guide will target arm64, though you can replace with amd64 if it doesn't suit your needs
  • instances will only launch with firmware set to UEFI_64 and lauch mode set to PARAVIRTUALIZED

Uploading an image

Unfortunately due to upload constraints, this portion of the deployment is unable to be run using Terraform. This may change in the future.

Prepare and upload a Talos disk image for Oracle Cloud, with

  1. Run tf apply --auto-approve -target null_resource.image to download image and convert it to .oci format
  2. under object and view object details, copy the dedicated endpoint url. Example: https://axe608t7iscj.objectstorage.us-phoenix-1.oci.customer-oci.com/n/axe608t7iscj/b/talos/o/talos-v1.8.0-oracle-arm64.oci

Create a .tfvars file

to configure authentication and namespacing, create a .tfvars file with values from the links placeholding in the example below

tenancy_ocid               = "TENANCY OCID                         : https://cloud.oracle.com/tenancy"
user_ocid                  = "YOUR USER OCID                       : https://cloud.oracle.com/identity/domains/my-profile"
private_key_path           = "YOUR PRIVATE KEY PATH                : https://cloud.oracle.com/identity/domains/my-profile/api-keys"
fingerprint                = "THE FINGERPRINT FOR YOUR PRIVATE KEY : ^^"
region                     = "YOUR PREFERRED REGION                : https://cloud.oracle.com/regions"
compartment_ocid           = "YOUR COMPARTMENT OCID                : https://cloud.oracle.com/identity/compartments"

Bringing it up

prepare the local direction for using Terraform

terraform init

verify the changes to provision

terraform plan

apply the changes

terraform apply

get the talosconfig

terraform output -raw talosconfig > ./talosconfig

get the kubeconfig

terraform output -raw kubeconfig > ./kubeconfig

destroy the worker nodes

terraform destroy -target=random_pet.worker

destroy

terraform destroy