Deploying API Gateway Pod with API Gateway Container connected to an Elasticsearch Kubernetes Service

About this task

Select this deployment model if you want to have a separate Elasticsearch service. This deployment allows you to scale Elasticsearch independently or to use an already existing Elasticsearch service. Ensure that you have an Elasticsearch Kubernetes service for Elasticsearch 8.2.3.

The diagram depicts the webMethods API Gateway Kubernetes service deployment model where you have a separate webMethods API Gateway pod that constitutes an webMethods API Gateway container connected to an Elasticsearch service. Kibana can run as a separate container within the webMethods API Gateway pod or can be embedded in the webMethods API Gateway container.

To deploy an webMethods API Gateway Kubernetes pod that communicates with an Elasticsearch Kubernetes service

Procedure

  1. Ensure that you have an Elasticsearch Kubernetes service for Elasticsearch 8.2.3.

    For more details on deploying Elasticsearch on Kubernetes, see Elasticsearch and Kubernetes documentation.

  2. Ensure that you have an webMethods API Gateway Docker image for this deployment. For the webMethods API Gateway container, you have to set the following environment variable:
    apigw_elasticsearch_hosts=elasticsearch-host:elasticsearch-port
  3. Run the following command to deploy webMethods API Gateway in the Kubernetes setup:
    kubectl create -f api-gateway-deployment-external-elasticsearch.yaml

    Ensure that you have specified the required information such as image name, default ports, details of the external elastic search and how to access it in the Kubernetes sample file api-gateway-deployment-external-elasticsearch.yaml located at SAG_Root/IntegrationServer/instances/default/packages/WmAPIGateway/resources/samples/K8s. For details on Kubernetes YAML files, see Kubernetes documentation.

    This now pulls the image specified and creates the webMethods API Gateway pod with webMethods API Gateway container connected to an Elasticsearch Kubernetes service.

    Run the command kubectl get pods to view the pods created.