Deploying API-M on Kubernetes using Helm Resources

Warning

The contents on this page are currently under review

Follow the instructions below to use Kubernetes (K8s) and Helm resources for container-based deployments of WSO2 API Manager (API-M).

Note

  • In the context of this document, <KUBERNETES_HOME> refers to a local copy of the wso2/kubernetes-apim Git repository that includes Helm Resources for WSO2 API Manager.
  • <HELM_HOME> will refer to <<KUBERNETES_HOME>/simple.

Prerequisites

  • In order to use WSO2 Helm resources, you need an active WSO2 Subscription. If you do not possess an active WSO2 Subscription already, you can sign up for a WSO2 Free Trial Subscription from here. Otherwise you can proceed with Docker images, which are created using GA releases.

  • Install Git, Helm, Dep and Kubernetes client in order to run the steps provided in the following quick start guide.

  • An already setup Kubernetes cluster.

  • Install NGINX Ingress Controller. Please note that Helm resources for WSO2 product deployment patterns are compatible with NGINX Ingress Controller Git release nginx-0.22.0.

  • Add the WSO2 Helm chart repository.

    helm repo add wso2 https://helm.wso2.com && helm repo update
  1. Checkout the Helm Resources for WSO2 API Manager Git repository using git clone :

    git clone https://github.com/wso2/kubernetes-apim.git
    git checkout tags/v4.0.0.1
  2. Provide the necessary configurations.

    Note

    The default product configurations for deployment of WSO2 API Manager are available here folder. Change the configurations, as necessary.

    Open the <HELM_HOME>/am-single/values.yaml and provide the following values for WSO2 Subscription Configurations.

    Parameter Description Default Value
    wso2.subscription.username Your WSO2 Subscription username ""
    wso2.subscription.password Your WSO2 Subscription password ""

    Note

    If you do not have an active WSO2 subscription, do not change the parameters wso2.subscription.username and wso2.subscription.password.

  3. Deploy WSO2 API Manager with WSO2 API Manager Analytics.

    Refer Register for Analytics to setup the cloud Analytics solution and obtain an on-prem key.

    helm install --dependency-update --name <RELEASE_NAME> <HELM_HOME>/am-single --namespace <NAMESPACE> --set wso2.choreoAnalytics.enabled=true --set wso2.choreoAnalytics.endpoint=<CHOREO_ANALYTICS_ENDPOINT> --set wso2.choreoAnalytics.onpremKey=<ONPREM_KEY>

    You can also provide the above configurations in the <HELM_HOME>/am-single/values.yaml file.

    Parameter Description Default Value
    wso2.choreoAnalytics.enabled Analytics enabled or not false
    wso2.choreoAnalytics.endpoint Analytics data publishing endpoint https://analytics-event-auth.choreo.dev/auth/v1
    wso2.choreoAnalytics.onpremKey On-prem key for Analytics ""
  4. Access Management Console.

    1. Obtain 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
      wso2am-single-node-am-gateway-ingress              <RELEASE_NAME>-gateway               <EXTERNAL-IP>    80, 443    7m
      wso2am-single-node-am-ingress                      <RELEASE_NAME>-am                    <EXTERNAL-IP>    80, 443    7m
      wso2am-single-node-am-websub-ingress               <RELEASE_NAME>-websub                <EXTERNAL-IP>    80, 443    7m

    2. Add the above hosts as entries in /etc/hosts file as follows:

      <EXTERNAL-IP> <RELEASE_NAME>-am
      <EXTERNAL-IP> <RELEASE_NAME>-gateway
      <EXTERNAL-IP> <RELEASE_NAME>-websub
    3. Try navigating to https://<RELEASE_NAME>-am/carbon, https://<RELEASE_NAME>-am/publisher and https://<RELEASE_NAME>-am/devportal from your favorite browser.

Note

You can read the README guide of WSO2 API Manager Git repository for further details on other dependencies and configurations.

For more information, see the deployment configurations with regard to the Advanced Deployment Patterns.

Top