Microgateway 10.11 | webMethods Microgateway Help | Kubernetes Support | Deploying Microgateway as a Kubernetes Service using a YAML file
 
Deploying Microgateway as a Kubernetes Service using a YAML file
Microgateway offers capability to generate a deployment YAML file, which can be used to set up pods and services indside a Kubernetes server. WHen accessing API Gateway for APIs to be used, you can specify appropriate parameters, which are then specified as environment settings in the YAML file.
*To deploy a Microgateway as a Kubernetes service using a YAML file
1. Ensure you have a running Kubernetes environment.
For details on setting up of a Kubernetes environment, see Kubernetes documentation.
2. Ensure that you have a Microgateway Docker image for the containers to be started on Kubernetes.
3. Create the deployment YAML file by running the createKubernetesFile command.
Example:
./microgateway.sh createKubernetesFile -p 7071
-di lean-docker-image -pn mymg -gw myhost:5555
-gwu admin -apis MyAPI -au accessUrl -o MyMicrogatewayDeploy.yaml
The arguments used in the command specify the following:
Argument
Description
-p
Microgateway access port to be used
-di <a lean docker image>
Reference to a Microgateway image in a docker registry
-pn
Name for deployment, pod and service
-gw
API Gateway host and port (can also be an address of Kubernetes service)
-gwu
User accessing API Gateway. The password should be specified with standard Kubernetes secrets)
-apis
API to be used that are accessed API Gateway
-au
The access URL through which Microgateway can be reached.
If this value is not provided the default value taken would be http://Kubernetes-service-name:port
-o
The output YAML file, which can be used for deployment
4. Deploy the deployment YAML file to establish a Microgateway pod with a Kubernetes service.
Example:
kubectl -f MyMicrogatewayDeploy.yaml
Microgateway now registers to the specified API Gateway, and API Gateway can reach Microgateway through the address given with the -au parameter.
5. Verify that the connections are successful from the Microgateway management section in API Gateway UI.
For details about Microgateway management section in API Gateway, see webMethods API Gateway User's Guide