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.tfvarsas per your account & regionnano terraform.tfvars
- Rename
secret.tfvars.exampletosecret.tfvarsand 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 ../ansibleor# Recommended ansible-playbook playbooks/microk8s.ymlansible-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 - [email protected]
Blog & Portfolio : https://solamarpreet.github.io