Lesson1 – Hands-on – Terraform/OpenTofu Deployment
In this lesson, we will deploy and destroy an Oracle Kubernetes Engine (OKE) Basic Cluster using OpenTofu. We begin by running tofu init, which initializes the Terraform environment and downloads necessary provider plugins. Next, we use tofu apply, referencing our terraform.tfvars file to authenticate with Oracle Cloud Infrastructure (OCI) and deploy resources.
Once the deployment completes, we verify the cluster in the OCI Console, checking the created VCN, subnets, node pools, and the OKE control plane. After confirming that everything is running as expected, we proceed with the cleanup process using tofu destroy. This command removes all deployed resources, ensuring that no unnecessary infrastructure remains in our OCI tenancy.
Finally, we return to the OCI Console and verify that all OKE-related components have been deleted. This practice helps maintain a clean cloud environment and prevents unexpected charges. By following this deploy-verify-destroy workflow, we ensure that our Terraform configurations are fully functional, repeatable, and efficient. Now that we’ve successfully tested our deployment process, we’re ready to move forward with more advanced OKE configurations!

