{"id":18802226,"url":"https://github.com/oracle-quickstart/oke-prerequisites","last_synced_at":"2025-04-13T18:10:35.070Z","repository":{"id":106381225,"uuid":"152794856","full_name":"oracle-quickstart/oke-prerequisites","owner":"oracle-quickstart","description":" Instructions on how to setup an Oracle Kubernetes Engine (OKE) cluster","archived":false,"fork":false,"pushed_at":"2019-10-10T00:35:57.000Z","size":6259,"stargazers_count":2,"open_issues_count":2,"forks_count":4,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-27T08:58:17.653Z","etag":null,"topics":["cloud","kubectl","kubernetes","oke","oracle","oracle-led","terraform"],"latest_commit_sha":null,"homepage":null,"language":"HCL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"upl-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/oracle-quickstart.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-10-12T18:52:07.000Z","updated_at":"2022-01-10T12:13:56.000Z","dependencies_parsed_at":null,"dependency_job_id":"9fbe73b5-0ecf-4046-8a78-d63a1d962dbe","html_url":"https://github.com/oracle-quickstart/oke-prerequisites","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oracle-quickstart%2Foke-prerequisites","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oracle-quickstart%2Foke-prerequisites/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oracle-quickstart%2Foke-prerequisites/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oracle-quickstart%2Foke-prerequisites/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oracle-quickstart","download_url":"https://codeload.github.com/oracle-quickstart/oke-prerequisites/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248758418,"owners_count":21156957,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cloud","kubectl","kubernetes","oke","oracle","oracle-led","terraform"],"created_at":"2024-11-07T22:27:05.392Z","updated_at":"2025-04-13T18:10:35.065Z","avatar_url":"https://github.com/oracle-quickstart.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# oke-prerequisites\nThese are instructions on how to setup an Oracle Cloud Infrastructure Container Engine for Kubernetes (OKE) cluster along with a Terraform module to automate part of that process for use with the Oracle Cloud Infrastructure Quick Start examples.\n\n## Prerequisites\nFirst off you'll need to do some pre deploy setup.  That's all detailed [here](https://github.com/oracle/oci-quickstart-prerequisites).\n\n## Clone the Module\nNow, you'll want a local copy of this repo.  You can make that with the commands:\n\n    git clone https://github.com/oracle/oke-quickstart-prerequisites.git\n    cd oke-quickstart-prerequisites/terraform\n    ls\n\n![](./images/01%20-%20git%20clone.png)\n\nWe now need to initialize the directory with the module in it.  This makes the module aware of the OCI provider.  You can do this by running:\n\n    terraform init\n\nThis gives the following output:\n\n![](./images/02%20-%20terraform%20init.png)\n\n## Deploy\nNow for the main attraction.  Let's make sure the plan looks good:\n\n    terraform plan\n\nThat gives:\n\n![](./images/03%20-%20terraform%20plan.png)\n\nIf that's good, we can go ahead and apply the deploy:\n\n    terraform apply\n\nYou'll need to enter `yes` when prompted.  The apply should take about five minutes to run.  Once complete, you'll see something like this:\n\n![](./images/04%20-%20terraform%20apply.png)\n\n## Viewing the Cluster in the Console\nWe can check out our new cluster in the console by navigating [here](https://console.us-phoenix-1.oraclecloud.com/containers/clusters).\n\n![](./images/05%20-%20console%20cluster.png)\n\nSimilarly, the IaaS machines running the cluster are viewable [here](https://console.us-phoenix-1.oraclecloud.com/a/compute/instances).\n\n![](./images/06%20-%20console%20iaas.png)\n\n## Setup the Terminal\nTo interact with our cluster, we need `kubectl` on our local machine.  Instructions for that are [here](https://kubernetes.io/docs/tasks/tools/install-kubectl/).  I'm a big fan of easy and on a Mac, so I just ran:\n\n    brew install kubectl\n\nThat gave me this:\n\n![](./images/07%20-%20brew%20install%20kubectl.png)\n\nWe're also probably going to want `helm`.  Once again, brew is our friend.  If you're on another platform, take a look [here](https://github.com/helm/helm).\n\n    brew install kubernetes-helm\n\nThat gave me this:\n\n![](./images/08%20-%20brew%20install%20helm.png)\n\nThe terraform apply dumped a Kubernetes config file called config.  By default, `kubectl` expects the config file to be in `~/.kube/config`.  So, we can put it there by running:\n\n    mkdir ~/.kube\n    mv config ~/.kube\n\nWe can make sure this all worked by running this command to check out the nodes in our cluster:\n\n    kubectl get nodes\n\nThat should give something like:\n\n![](./images/09%20-%20get%20nodes.png)\n\n## Make yourself Admin\nYou probably want your `kubectl` set up so that you're a cluster admin.  Otherwise your access to your new cluster will be limited.  There are some instructions on that [here](https://docs.cloud.oracle.com/iaas/Content/ContEng/Concepts/contengaboutaccesscontrol.htm).  You'll need to grab your user OCID (possibly from the console, [here](https://console.us-phoenix-1.oraclecloud.com/a/identity/users)) and then run a command like:\n\n    kubectl create clusterrolebinding myadmin --clusterrole=cluster-admin --user=ocid1.user.oc1..aaaaa...zutq\n\nThat gives this:\n\n![](./images/10%20-%20admin.png)\n\n## Destroy the Deployment\nWhen you no longer need the OKE cluster, you can run this to delete the deployment:\n\n    terraform destroy\n\nYou'll need to enter `yes` when prompted.  Once complete, you'll see something like this:\n\n![](./images/11%20-%20terraform%20destroy.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foracle-quickstart%2Foke-prerequisites","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foracle-quickstart%2Foke-prerequisites","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foracle-quickstart%2Foke-prerequisites/lists"}