API Gateway 11.1 | Administering API Gateway | Container-based Provisioning | Kubernetes Support | Deploying API Gateway Pod with API Gateway Container connected to an External Elasticsearch Kubernetes Service
 
Deploying API Gateway Pod with API Gateway Container connected to an External Elasticsearch Kubernetes Service
Select this deployment model if you want to have a separate external Elasticsearch service. This deployment allows you to scale external Elasticsearch independently or to use an already existing external Elasticsearch service. Ensure that you have an external Elasticsearch Kubernetes service for external Elasticsearch 8.2.3.
The diagram depicts the API Gateway Kubernetes service deployment model where you have a separate API Gateway pod that constitutes an API Gateway container connected to an external Elasticsearch service. External Kibana can run as a separate container within the API Gateway pod or can be embedded in the API Gateway container.
Kubernetes service deployment model
*To deploy an API Gateway Kubernetes pod that communicates with an external Elasticsearch Kubernetes service
1. Ensure that you have an external Elasticsearch Kubernetes service for external Elasticsearch 8.2.3.
For more details on deploying external Elasticsearch on Kubernetes, see external Elasticsearch and Kubernetes documentation.
2. Ensure that you have an API Gateway Docker image for this deployment. For the 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 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 API Gateway pod with API Gateway container connected to an external Elasticsearch Kubernetes service.
Run the command kubectl get pods to view the pods created.