Skip to content

Latest commit

 

History

History
42 lines (22 loc) · 1.01 KB

README.md

File metadata and controls

42 lines (22 loc) · 1.01 KB

oci_k8s

k8s on OCI free tier

Need an Oracle Cloud account

  • Need a compartment you want the resources to provision in – it can be the root compartment

  • Optionally an SSH key for worker nodes

  • OCI CLI installed

  • Terraform CLI installed

  • kubectl installed

  • $ export TF_VAR_compartment_id=

  • $ export TF_VAR_region=

  • $ export TF_VAR_ssh_public_key=

cd /oci-infrastructure

terraform apply -var="compartment_id=ocid1.compartment.oc1.............." -var="region=us-ashburn-1" -var="ssh_public_key=ssh-rsa ............

create kubeconfig file: $ oci ce cluster create-kubeconfig --cluster-id --file ~/.kube/ocs-k8s-config --region us-ashburn-1 --token-version 2.0.0 --kube-endpoint PUBLIC_ENDPOINT

$ export KUBECONFIG=~/.kube/ocs-k8s-config

$ kubectl get nodes

terraform output

cd ./k8s_infrastructure

terraform init

terraform apply

oci_layout