Kubernetes Service Operator for Oracle Cloud Infrastructure Streaming — First steps

What can I do with Operator SDK?

The Operator SDK provides the tools to build, test, and package Operators. Initially, the SDK facilitates the marriage of an application’s business logic (for example, how to scale, upgrade, or backup) with the Kubernetes API to execute those operations. Over time, the SDK can allow engineers to make applications smarter and have the user experience of cloud services. Leading practices and code patterns that are shared across Operators are included in the SDK to help prevent reinventing the wheel.

Lets start…

Instead of the OCI Service Broker for Kubernetes, Oracle now recommends you use the OCI Service Operator for Kubernetes to interact with Oracle Cloud Infrastructure services using the Kubernetes API and Kubernetes tooling.

Part 1: Install OCI Service Operator for Kubernetes.

brew install operator-sdk
brew install operator-sdk
OLM install OK
OLM resources created in K8 cluster
instances running in OKE Cluster node pool
getting instances OCID
Rules for new Dynamic Group
Policies examples in Github
Policy builder in OCI Console
Policies tenancy level

Part 2: Secure OCI Service Operator for Kubernetes.

yaml to create operator
$ kubectl apply -f serviceoperatorokenamespace.yml
OCI Credentials for my user
Description for credentials from documentation
create secret with kubectl for my user credentials
### Tenancy based OCI Policy for user
Allow group <OSOK_OPERATOR_GROUP> to manage <OCI_SERVICE_1> in tenancy### Compartment based OCI Policy for user
Allow group <OSOK_OPERATOR_GROUP> to manage <OCI_SERVICE_1> in compartment <NAME_OF_THE_COMPARTMENT>
Create IAM Group
Create Policy for the Group a tenancy level
create policy for the group at compartment level
Policies resume at Tenancy Level
Policies resume at Compartment level

Deploy OSOK on K8

The OCI Service Operator for Kubernetes is packaged as Operator Lifecycle Manager (OLM) Bundle for making it easy to install in Kubernetes Clusters. The bundle can be downloaded as docker image using below command.

$ docker pull iad.ocir.io/oracle/oci-service-operator-bundle:1.0.0
docker pull service operator

The OSOK OLM bundle contains all the required Kubernetes resources such as CRDs, RBACs, Configmaps, deployments which will install the OSOK in your Kubernetes cluster.

$ operator-sdk run bundle iad.ocir.io/oracle/oci-service-operator-bundle:1.0.0

Part 3: Provision and bind to the required OCI services.

Oracle Streaming Service and OSOK

Streaming in OCI Console
List of existing streams
yaml to bind to an existing stream with OCID
New Stream, details 1.2
New Stream, details 2.2
List of existing streams in the compartment
New stream created
Events for the resource creation

Join the conversation!



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store