How to deploy a free Kubernetes Cluster with Oracle Cloud Always free tier
Tags: devops, docker, kubernetes, tutorial
Published: 2024-07-16 17:57:05

_Você pode ler este artigo em Português [clicando aqui](https://www.ronilsonalves.com/pt/artigos/como-fazer-o-deploy-gratuito-de-um-cluster-kubernetes-com-o-always-free-tier-da-oracle-cloud)._

The recent changes in Vercel's billing system have prompted many developers to seek alternative platforms that offer cost-effective solutions without compromising on capabilities. Oracle Cloud Infrastructure (OCI) presents itself as a viable alternative with its Always Free tier, which provides users with a robust set of services that can cater to various computing needs, this series of articles will explore the process of migrating from Vercel – or another PaaS to Oracle Cloud, offering a comprehensive guide for those considering the switch.

## Oracle Cloud Always Free tier
Oracle Cloud's Always Free tier is designed to give developers a hands-on experience with Oracle's cloud services. With $300 in credits available for the first 30 days and a selection of services that remain free indefinitely, it's an attractive option for those starting out or looking to migrate from another platform.

### The Ampere A1 Compute Instances

One of the standout offerings in the Always Free tier is the Ampere A1 Compute instances. These virtual machines (VMs) are based on the ARM architecture and are known for their efficiency and scalability. Users can deploy up to four VMs, harnessing up to 24GB of memory, which is more than sufficient for a range of applications, including development, testing, and even production workloads.

## Step-by-Step Guide to Deploying a free OKE Cluster

_To follow this guide you must have an Oracle Cloud account. In some regions you probably need to make an upgrade in your account to reach the free ARM instances due to low availability in Always free tier, I, for e.g., have tried for weeks deploy the ARM Instances in regions sa-saopaulo-1 and sa-vinhedo-1 without success using a free account, just succeed after I upgrade my account and the instances became available._

So, logged in your account, in console go to **Developer Services > Containers & Artifacts > OKE**.

![OCI Console](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yjzbo3e2vyi62cfzhpcs.png)

After, just click on Create cluster button and the modal will be shown, if you don't have any contact with infra or It's your first contact with public clouds or even OCI itself, select the Quick create option.

![OKE creation](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0r11pz063m71n8khkr7v.png)

So, OCI will provide the necessary resources to orchestrate the network of our cluster, creating a virtual network, public and private subnets and also some related services to empower the communication between Kubernetes panel and nodes and also external access.

On creation screen, fill the cluster name, select the compartment in your OCI tenancy and the Kubernetes version should be used in your cluster. Also, select if you want or not to expose to internet your Kubernetes API endpoint and Kubernetes nodes, in this article, we will use private nodes, but feel free to choose your preferred configuration.

![OKE creation configuration](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tnzkihrcrzdqpboosw6j.png)

To allow us to use the free A1 Ampere instances in our cluster, select the node type managed as seen above.

The next step in Image & shape, select the VM.Standard.A1.Flex VM inside Node shape. Following this guide, we use 2 nodes, so set the OCPU and memory to 2 and 12 GB respectively and Node count to 2 as you can see in the below image. You can configure as you prefer, just remember to not overtake the Always free tier limit of 4 OCPU and 24GB of memory. **Mainly if you have upgraded your account to a paid account to avoid surprise charges.**

![OKE Shape and image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0fjzjcln0mwpi2xs59pl.png)

Click in Show advanced options if you want to specify a custom boot volume size and/or upload a public SSH key, if not, just click in Next button. 

![OKE creation optional step](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qo05inlnonwcg4bzynjt.png)

After, a screen with all resources that will be created will be shown, and before you click on Create cluster button, check the option to create a basic cluster instead of an enhanced cluster at the end of the page. If you create an enhanced cluster, you should pay by this resource and most important, the basic cluster is FREE!

![Basic cluster confirmation](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ly2wid7wmj03trlp7mwm.png)

Few minutes later OCI will finish the OKE provisioning process and you are able to access your cluster using Cloud Shell Access or using OCI CLI. Remember to install OCI CLI if you want to access your cluster locally.

![OKE Cluster provisioned](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/efgn9zv3lw6vutzmiq8k.png)

## Conclusion

Migrating from a PaaS like Vercel to Oracle Cloud may seem like a challenging step, but with the always free tier and specifically the Ampere A1 instances, this transition becomes more accessible and attractive to developers.

This step-by-step guide demonstrated how to create a free OKE cluster in OCI, opening doors for deploying applications in a robust and scalable environment.

By exploring the capabilities of OCI and Kubernetes, developers can discover new possibilities to optimize their workflows and build more efficient software solutions.

In the next article of this series, we will delve deeper into the automation process with GitHub Actions and how to setup the created OKE Cluster to these automation. Don't forget to let your comment and share your insights about this guide.