Deploying API Manager with Kubernetes Resources¶
Warning
Currently this page has instructions for deployment of WSO2 API Manager with WSO2 API Manager Analytics in Kubernetes.
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 thewso2/kubernetes-apim
Git repository that includes Helm Resources for WSO2 API Manager. - <
HELM_HOME>
will refer to <<KUBERNETES_HOME>/advanced
.
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
-
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/v3.1.0.1
-
Provide the necessary configurations.
Note
The default product configurations for deployment of WSO2 API Manager with WSO2 API Manager Analytics are available at
<HELM_HOME>/am-pattern-1/confs
folder. Change the configurations, as necessary.Open the
<HELM_HOME>/am-pattern-1/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
andwso2.subscription.password
. -
Deploy WSO2 API Manager with WSO2 API Manager Analytics.
helm install --dependency-update --name <RELEASE_NAME> <HELM_HOME>/am-pattern-1 --namespace <NAMESPACE>
-
Access Management Console.
-
Obtain the external IP (
EXTERNAL-IP
) of the Ingress resources by listing down the Kubernetes Ingresses.
Example:kubectl get ing -n <NAMESPACE>
NAME HOSTS ADDRESS PORTS AGE wso2am-pattern-1-am-gateway-ingress <RELEASE_NAME>-gateway <EXTERNAL-IP> 80, 443 7m wso2am-pattern-1-am-ingress <RELEASE_NAME>-am <EXTERNAL-IP> 80, 443 7m wso2am-pattern-1-am-analytics-dashboard-ingress <RELEASE_NAME>-analytics-dashboard <EXTERNAL-IP> 80, 443 7m
-
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>-analytics-dashboard
-
Try navigating to
https://<RELEASE_NAME>-am/carbon
,https://<RELEASE_NAME>-am/publisher
andhttps://<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.