Skip to content

My Kubernetes homelab on Oracle Cloud Infrastructure using Free Tier resources

License

Notifications You must be signed in to change notification settings

solamarpreet/kubernetes-on-oci

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Contributors Forks Stargazers Issues GPLv3 License Last Commit


Kubernetes on Oracle Cloud Infrastructure

Deploy a Kubernetes cluster on OCI Free Tier using Terraform & Ansible


Table of Contents
  1. Getting Started
  2. Usage
  3. Troubleshooting
  4. Roadmap
  5. Contributing
  6. License
  7. Contact
  8. Acknowledgments

Important Notice

Oracle has started restricting Free Tier accounts from launching new instances in most Regions. If you get a Resouce Capacity error the only solution so far is to upgrade your account to Pay As You Go. You should then be able to launch the resources. As long as you use the Always Free resources you still won't be charged even though your account is now upgraded.

Getting Started

The following must already be present on your system


Usage

  1. Clone this repository

    git clone https://github.com/solamarpreet/kubernetes-on-oci.git
    cd kubernetes-on-oci/terraform
  2. Change the values in terraform.tfvars as per your needs

    nano terraform.tfvars
  3. Rename secret.tfvars.example to secret.tfvars and populate it with values

    mv secret.tfvars.example secret.tfvars
    nano secret.tfvars
  4. Configure Remote Backend by adding your Terraform Cloud Backend details in the backend.tf file

    nano backend.tf
    terraform login

    or delete the backend.tf file if Remote Backend is not needed

    rm backend.tf
  5. Initialize terraform

    terraform init
  6. Apply terraform configuration

    terraform apply --var-file=secret.tfvars
  7. Install either Microk8s or K3s on the created infrastructure depending on your preference

    cd ../ansible
    # Recommended
    ansible-playbook playbooks/microk8s.yml

    or

    ansible-playbook playbooks/k3s.yml
  8. Copy the kubeconfig file to ~/.kube/config

    mkdir -p ~/.kube && cp kubeconfig ~/.kube/config
  9. Start using kubectl commands

    kubectl get nodes

(back to top)

Troubleshooting

Check the open issues for a list known issues and open a new issue if necessary.


Roadmap

  • Add Ansible playbook for provisioning a private container registry on the VM.Standard.E2.1.Micro instance

Contributing

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.


License

Distributed under the MIT License. See LICENSE for more information.


Contact

Amarpreet Singh - [email protected]

Blog & Portfolio : https://solamarpreet.github.io


Acknowledgments


(back to top)

About

My Kubernetes homelab on Oracle Cloud Infrastructure using Free Tier resources

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages