This repository is utilising always free resource of oracle cloud to create an OKE (Oracle Kubernetes Engine) k8s cluster. As OKE basic is of no charge at the moment, but doesn't comes under always free resources, you need to put up a credit card to create the resource. It's best to put an upper budget limit of $10 to avoid any charges.
At the end, you'll have a kubernetes cluster with 3 nodes of type VM.Standard.A1.Flex (ARM) with each have 2 OCPU and 6 GB of memory, with 50 GB of disk.
- Create a .env file to source in your terminal.
mv .env.example .env
- Fill the values in
.env
file - Source the file
source .env
- Initialise terraform and apply.
terraform init && terraform apply
- Execute the command which comes as the output
oci ce cluster create-kubeconfig --cluster-id your-cluster-id --file $HOME/.kube/config --region eu-frankfurt-1 --token-version 2.0.0 --kube-endpoint PUBLIC_ENDPOINT
Name | Description | Type | Default | Required |
---|---|---|---|---|
cluster_name | Kubernetes cluster name | string |
"my_free_k8s" |
no |
compartment_ocid | The compartment id to create the resources in. Check compartment ID. | string |
n/a | yes |
fingerprint | Fingerprint of the private key | string |
n/a | yes |
kubernetes_version | Version of your k8s cluster | string |
"v1.27.2" |
no |
node_boot_volume_size | Node boot volume for each node in the node pool in Gb. | number |
50 |
no |
node_memory | Node memory in Gb for a node in the node pool. | number |
6 |
no |
node_ocpu | CPU unit of a node in the node pool. | number |
2 |
no |
node_pool_size | Node pool size. Currently hardcoded, perhaps later we use an autoscaler or something. | number |
3 |
no |
node_type | K8s cluster node type. VM.Standard.A1.Flex is the one in always free resources with ARM variant | string |
"VM.Standard.A1.Flex" |
no |
private_key_path | Path to your private key used to authenticate or oci. Check https://docs.oracle.com/en-us/iaas/Content/API/Concepts/apisigningkey.htm#two | string |
n/a | yes |
region | The region to provision the resources in. Mostly the same as the one you selected while creating your account. | string |
n/a | yes |
tenancy_ocid | Your tenancy OCID https://docs.oracle.com/en-us/iaas/Content/API/Concepts/apisigningkey.htm#five | string |
n/a | yes |
user_ocid | Your user OCID. https://docs.oracle.com/en-us/iaas/Content/API/Concepts/apisigningkey.htm#five | string |
n/a | yes |
worker_compartment_ocid | The compartment id to create the resources in. Check compartment ID. | string |
n/a | yes |
Name | Source | Version |
---|---|---|
oke | oracle-terraform-modules/oke/oci | 5.0.0-beta.6 |
Name | Description |
---|---|
cluster_kubeconfig | n/a |
Name | Version |
---|---|
oci | 5.16.0 |
Name | Version |
---|---|
oci | 5.16.0 |
Name | Type |
---|---|
oci_core_network_security_group_security_rule.allow_all | resource |