The k8s-ei-operator allows you to deploy your integration into Kuberntes environment build on top of WSO2 Enterprise Integrator Tooling.
An integration is self-contained and independently deployable integration scenario composed with an arbitrary set of EI constructs which directly maps to a business capability.
An integration scenario could divide into the following three categories.
- Synchronous service which may communicate with other systems
- Asynchronous message Consumer/Producer
- A periodically invoked pre-defined integration (e.g. Tasks)
The k8s-ei-operator built with operator-sdk v0.7.0 and supported in the following environment.
- Kubernetes cluster and client v1.11+
-
Create the folder structure
$GOPATH/src/github.com/wso2
if not available and clone k8s-ei-operator git repogit clone https://github.com/wso2/k8s-ei-operator.git
-
Change directory to k8s-ei-operator
cd $GOPATH/src/github.com/wso2/wso2/k8s-ei-operator
-
Setup Service Account
kubectl create -f deploy/service_account.yaml
-
Setup RBAC
kubectl create -f deploy/role.yaml kubectl create -f deploy/role_binding.yaml
-
Deploy integration CustomResourceDefinition into Kubernetes cluster to understand custom resource type
kubectl create -f deploy/crds/integration_v1alpha1_integration_crd.yaml
-
Deploy the k8s-ei-operator
kubectl create -f deploy/operator.yaml
-
Deploy sample integration to start WSO2 micro integrator runtime which having 'User Info' API
kubectl apply -f deploy/crds/user_mgt_demo_integration.yaml
-
List the deployed integration
kubectl get integration
-
Invoke the User Info API once STATUS becomes Running
i. Port forward
kubectl port-forward service/user-mgt-demo-integration-service 8290:8290
ii. Invoke the API
curl http://localhost:8290/userInfo/users
-
Check out and install the operator-sdk CLI
-
Install minikube and start Kubernetes cluster
-
Create the folder structure
$GOPATH/src/github.com/wso2
if not available and clone k8s-ei-operator git repogit clone https://github.com/wso2/k8s-ei-operator.git
-
Change directory to k8s-ei-operator
cd $GOPATH/src/github.com/wso2/wso2/k8s-ei-operator
-
Deploy integration CustomResourceDefinition into Kubernetes cluster to understand custom resource type
kubectl create -f deploy/crds/integration_v1alpha1_integration_crd.yaml
-
Run the operator code as a Go program outside the Kubernetes cluster
operator-sdk up local
-
Deploy sample integration to start WSO2 micro integrator runtime which having 'User Info' API
kubectl apply -f deploy/crds/user_mgt_demo_integration.yaml
-
List the deployed integration
kubectl get integration
-
Invoke the User Info API once STATUS becomes Running
i. Port forward
kubectl port-forward service/er-mgt-demo-integration-service 8290:8290
ii. Invoke the API
curl http://localhost:8290/services/userInfo/users