diff --git a/README.md b/README.md index bb40f25..c98193f 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,60 @@ # OCI Kubernetes cluster with traefik This repo has 2 kind of cluster setup for kubernetes, one is oci managed (OKE), the other one is the self managed cluster. + +## OCI managed cluster (OKE) + +This Terraform configuration sets up an Oracle Cloud Infrastructure (OCI) cluster with various components including a virtual cloud network (VCN), subnets, Oracle Kubernetes Engine (OKE) cluster, Service Networking (SNET), Network Load Balancer (NLB), and optionally installs ArgoCD. This setup assumes you use cloudflare and you want a wildcard domain dns setup for your cluster with strict https encryption setup with traefik. + +### Prerequisites + +Before you begin, ensure you have the following: + +- Access to an Oracle Cloud Infrastructure (OCI) tenancy. +- Properly configured authentication with necessary API credentials. +- Terraform CLI installed locally. + +#### Variables + +You need to provide values for the following variables: + +- ```compartment_ocid: The OCID (Oracle Cloud Identifier) of the compartment where resources will be created.``` +- ```tenancy_ocid: The OCID of your OCI tenancy.``` +- ```user_ocid: The OCID of the user.``` +- ```fingerprint: The fingerprint of the public key uploaded to OCI.``` +- ```private_key_path: The file path to the private key used for API authentication.``` +- ```availability_domain: The availability domain where resources will be provisioned.``` +- ```cluster_name: The name of the OCI cluster.``` +- ```cloudflare_api_email: Email associated with Cloudflare API.``` +- ```cloudflare_api_key: API key for Cloudflare.``` +- ```cloudflare_origin_certificate_pem: PEM-formatted string of Cloudflare origin certificate.``` +- ```cloudflare_origin_certificate_key: Private key associated with Cloudflare origin certificate.``` +- ```my_domain: Your domain name.``` +- ```install_argocd: Boolean flag indicating whether to install ArgoCD.``` +- ```region: OCI region where resources will be created.``` +- ```public_key_path: File path to the SSH public key.``` +- ```node_pool_size: Number of worker nodes in the Kubernetes cluster.``` +- ```environment: Deployment environment, e.g., "prod", "dev", etc.``` + +### Modules +#### VCN (Virtual Cloud Network) + +This module creates a VCN with specified configurations. +#### SNET (Service Networking) + +This module configures Service Networking in the VCN. +#### OKE (Oracle Kubernetes Engine) + +This module sets up an OKE cluster within the VCN. +#### NLB (Network Load Balancer) + +This module provisions a traefik2 Network Load Balancer for the cluster. +#### ArgoCD + +This module installs and configures ArgoCD on the cluster, if enabled. +Usage + +### How to run +Ensure you have set up your Terraform environment and configured the necessary variables. + Run ```terraform init``` to initialize the directory. + Run ```terraform plan -out tf.plan``` to see the execution plan. + Run ```terraform apply tf.plan``` to apply the changes and provision the resources. \ No newline at end of file diff --git a/oci-managed/variables.tf b/oci-managed/variables.tf index 64c7ad9..d40d639 100644 --- a/oci-managed/variables.tf +++ b/oci-managed/variables.tf @@ -35,12 +35,6 @@ variable "node_pool_size" { default = 2 } -variable "k3s_extra_worker_node" { - default = false -} -variable "expose_kubeapi" { - default = false -} variable "environment" { default = "prod" } \ No newline at end of file