Deploying the Micro Integrator on Kubernetes using Helm Resources

Follow the instructions given below to deploy the Micro Integrator on Kubernetes (K8s) using Helm resources.

Before you begin

Step 1 - Get the Helm resources

Check out the Helm Resources for the WSO2 Micro Integrator Git repository.

  1. Open a terminal and navigate to the location where you want to save the local copy.
  2. Clone the Micro Integrator Git repository with Helm resources:

    git clone https://github.com/wso2/kubernetes-mi.git
    git checkout tags/v4.0.0.1

This creates a local copy of wso2/kubernetes-mi, which includes all the Helm Resources for WSO2 Micro Integrator.

Let's refer to the root folder of the local copy as <KUBERNETES_HOME>.

Step 2 - Update the deployment configurations

Follow the steps given below to configure how your Micro Integrator deployment should be set up.

  1. Open the values.yaml file in the `/helm/micro-integrator folder of your local copy.

    Info

    Before you do any changes, go through the default configurations in this file.

  2. Use the following guidelines to update the deployment configurations:

    • Updating the WSO2 subscription details

      You can update the user name and password in the following section. If you don't have an active WSO2 subscription, leave these parameters empty.

      wso2:
          subscription:
              username: "<username>"
              password: "<password>"

      Alternatively, you can skip this step and pass your subscription details at the time of deploying (see the next step for details).

    • Updating the Micro Integrator Docker images

      By default, the values.yaml file uses the base Micro Integrator image (which does not include any integrations) to set up the deployment.

      imageName: "wso2mi"
      imageTag: "4.0.0"

      When you have a custom Docker image with integrations, uncomment the dockerRegistry parameter and the details of your custom image.

      dockerRegistry: "<docker_registry>"
      imageName: "<custom_mi_image>"
      imageTag: "<custom_image_tag>"
    • You can update other configurations as required.

  3. Save the values.yaml file.

Step 3 - Deploy the Micro Integrator

Once you have set up your Helm resources locally, follow the instructions given below to set up the deployment.

  1. Open a terminal and navigate to the `/helm/micro-integrator folder.
  2. Execute the command that is relevant to your Helm version.

    Tip

    Be sure to replace NAMESPACE with the Kubernetes namespace in which your resources are deployed.

    • Using Helm v2

      helm install --name <RELEASE_NAME> wso2/micro-integrator --version 4.0.0-1 --namespace <NAMESPACE>
    • Using Helm v3

      helm install <RELEASE_NAME> wso2/micro-integrator --version 4.0.0-1 --namespace <NAMESPACE> --create-namespace

Update configurations during deployment

If required, you can set any of the deployment configurations at the time of running the deployment (instead of specifying them in the values.yaml file). See the examples given below.

  • Setting the subscription username and password.

    --set wso2.subscription.username=<SUBSCRIPTION_USERNAME>
    --set wso2.subscription.username=<SUBSCRIPTION_USERNAME>
  • Setting the custom Micro Integrator Docker image.

    --set wso2.deployment.mi.dockerRegistry=<CUSTOM_IMAGE_REGISTRY>
    --set wso2.deployment.mi.imageName=<CUSTOM_IMAGE_NAME>
    --set wso2.deployment.mi.imageTag=<CUSTOM_IMAGE_TAG>
  • Use the following parameter only if your custom Docker image is stored in a private Docker registry.

    --set wso2.deployment.mi.imagePullSecrets=<IMAGE_PULL_SECRET>

Your Micro Integrator Kubernetes cluster should now be created.

Step 4 - Access the Micro Integrator deployment

Go to your Kubernetes cluster from your terminal and follow the steps given below.

  1. Get the external IP (EXTERNAL-IP) of the Ingress resources by listing down the Kubernetes Ingresses.

    kubectl get ing -n <NAMESPACE>

    Example:

    NAME                                                 HOSTS                      ADDRESS        PORTS     AGE
    <RELEASE_NAME>-micro-integrator-service-ingress      mi.wso2.com                <EXTERNAL-IP>  80, 443   3m
    <RELEASE_NAME>-micro-integrator-management-ingress   management.mi.wso2.com     <EXTERNAL-IP>  80, 443   3m
  2. Add the above hosts in the /etc/hosts file as follows:

    <EXTERNAL-IP>   mi.wso2.com 
    <EXTERNAL-IP>   management.mi.wso2.com 
  3. Execute the following command to invoke health check services:

    curl https://mi.wso2.com/healthz -k

What's Next?

Note that these instructions are for setting up a standalone deployment of the Micro Integrator. To set up one of the recommended deployment patterns, see the following topics:

Top