Deploy a Kubernetes cluster on OCI Free Tier using Terraform & Ansible
Table of Contents
The following must already be present on your system
- Clone this repository
git clone https://github.com/solamarpreet/kubernetes-on-oci.git
cd kubernetes-on-oci/terraform
- Change the values in
terraform.tfvars
as per your account & regionnano terraform.tfvars
- Rename
secret.tfvars.example
tosecret.tfvars
and populate it with valuesmv secret.tfvars.example secret.tfvars
- Initialize terraform
terraform init
- Apply terraform configuration
terraform apply --var-file=secret.tfvars
- Install either Microk8s or K3s on the created infrastructure depending on your preference
cd ../ansible
or# Recommended ansible-playbook playbooks/microk8s.yml
ansible-playbook playbooks/k3s.yml
- Copy the kubeconfig file to ~/.kube/config
mkdir ~/.kube && cp kubeconfig ~/.kube/config
- Start using kubectl commands
kubectl get nodes
Check the open issues for a list known issues and open a new issue if necessary.
- Add Ansible playbook for provisioning a private container registry on the VM.Standard.E2.1.Micro instance
Please create pull requests in the dev
branch. You can also give your ideas by opening a new issue and describing the features you would like to see added.
Distributed under the MIT License. See LICENSE
for more information.
Amarpreet Singh - solamarpreet@protonmail.com
Blog & Portfolio : https://solamarpreet.github.io