Example of a highly available Kubernetes cluster with Talos on Oracle Cloud. Based on the Talos Oracle Cloud Example.
general
- a top-level tenancy
- 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
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
- Run
tf apply --auto-approve -target null_resource.image
to download image and convert it to.oci
format - 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
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"
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