Oracle Cloud Infrastructure CLI Scripts for preparing for OKE Cluster Provisioning

Lucas Jellema
0 0
Read Time:2 Minute, 23 Second

In order to provision a Kubernetes cluster on Oracle Cloud Infrastructure, you need to prepare the OCI tenancy and create a compartment with appropriate network configuration and associated resources. All set up can be performed through the console – but this is quite tedious, error prone and outright stupid if you have to go through these steps more than once. I should know – I went through them multiple times.

In a previous article I described how easy it is to get going with the OCI CLI (using a Docker container) and in this article I will share the OCI CLI statements that should be executed in order to fully prepare the OCI tenancy for subsequently provisioning the OKE Cluster. (OKE = Oracle Kubernetes Engine). The article “Create OKE Kubernetes Cluster on Oracle Cloud Infrastructure” will subsequently take you through the steps of creating an K8S instance leveraging the artifacts created in this article.

Assuming you have the OCI CLI configured with a user with the right privileges connecting to the target OCI tenancy, below you will find the steps to perform through the OCI to create all artifacts that are required in order before an OKE Cluster can be created. After providing with the step by step commands, I will also show you the beginnings of a Shell script that will execute all individual steps automatically,saving quite a bit of manual work.

Step by Steps Commands

At this point, all resourced are created and you can attempt the provisioning of the OKE Cluster, either through the Console or trough the CLI or the REST API.

(beginning of a) Shell Script for Provisioning the Required OCI resources for an OKE Cluster Instance

Executing all these steps manually and constantly exporting environment variable is still a lot of work. The next level of automation is to take these individual steps and create a Shell script out of them. Below you will find that script – or at least the beginning of one, as I have not yet had the time to complete it.

Resources

Blog article: Create OKE Kubernetes Cluster on Oracle Cloud Infrastructure – including Service Request to increase limit  https://technology.amis.nl/2018/10/16/create-oke-kubernetes-cluster-on-oracle-cloud-infrastructure-including-service-request-to-increase-limit/

Blog article: Running OCI CLI using Docker container – https://technology.amis.nl/2018/10/14/get-going-quickly-with-command-line-interface-for-oracle-cloud-infrastructure-using-docker-container/

First steps with Oracle Kubernetes Engine–the managed Kubernetes Cloud Service – https://technology.amis.nl/2018/05/25/first-steps-with-oracle-kubernetes-engine-the-managed-kubernetes-cloud-service/

OCI Docs Preparing for Container Engine for Kubernetes- https://docs.cloud.oracle.com/iaas/Content/ContEng/Concepts/contengprerequisites.htm?tocpath=Services%7CContainer%20Engine%7CPreparing%20for%20Container%20Engine%20for%20Kubernetes%7C_____0

About Post Author

Lucas Jellema

Lucas Jellema, active in IT (and with Oracle) since 1994. Oracle ACE Director and Oracle Developer Champion. Solution architect and developer on diverse areas including SQL, JavaScript, Kubernetes & Docker, Machine Learning, Java, SOA and microservices, events in various shapes and forms and many other things. Author of the Oracle Press book Oracle SOA Suite 12c Handbook. Frequent presenter on user groups and community events and conferences such as JavaOne, Oracle Code, CodeOne, NLJUG JFall and Oracle OpenWorld.
Happy
Happy
0 %
Sad
Sad
0 %
Excited
Excited
0 %
Sleepy
Sleepy
0 %
Angry
Angry
0 %
Surprise
Surprise
0 %
Next Post

Rapid generation of Oracle DDL scripts for Tables, PL/SQL APIs, Sample Data

Yesterday, at the Oracle ACE Directors Product Briefing, I received a gift. It is called QuickSQL. And it is a free online service that generates SQL DDL and DML scripts. The gift in this case was the knowledge about this service – I was not aware of it. Go to […]
%d bloggers like this: