The repository contains a Terraform script for creating a fully functioning Kubernetes cluster on Oracle Cloud.
The repo was created for this article: Free Oracle Cloud Kubernetes cluster with Terraform
- Get the following data from your Oracle Cloud account
- User OCID
- Tenancy OCID
- Compartment OCID
- Open a terminal within the
oci-infra
folder - Execute a
terraform init
- Execute a
terraform apply
- Create your Kubernetes configuration file using
$ oci ce cluster create-kubeconfig --cluster-id <cluster OCID> --file ~/.kube/free-k8s-config --region <region> --token-version 2.0.0 --kube-endpoint PUBLIC_ENDPOINT
- Apply your K8S config for kubectl
$ export KUBECONFIG=~/.kube/free-k8s-config
- To verify cluster access, do a
kubectl get nodes
- Enjoy