How to access HawkConsole REST API running in kubernetes
book
Article ID: KB0072406
calendar_today
Updated On:
Products
TIBCO Operational Intelligence Hawk RedTail
Description
This is article provide the detailed steps for those customers who want to access the HawkConsole running in k8s and interact with domain from REST APIs or CLI.
Issue/Introduction
Instructions of access HawkConsole REST API running in kubernetes
Environment
Kubernetes, EKS, AKS, GKE, Openshift etc...
Resolution
If you are with Kubernetes vendor for example EKS, AKS, GKE, Openshift etc... you can expose the the redtail-console-restservice as LoadBalancer. This is by default in sample yaml files. If you deploy Redtail to your own Kubernetes cluster, you can expose redtail-console-restservice as NodePort.
Run command "kubectl get svc -A |grep redtail-console-rest" to get the port: "kubectl get svc -A |grep redtail-console-rest"
For example: $ kubectl get svc -A |grep redtail-console-rest default redtail-console-rest NodePort 10.111.38.230 <none> 9687:30314/TCP 12h
Access HawkConsole REST API Swagger page in browser with address: https://<HKConsole_LB_IP or Node_IP>:<port>/hawkconsole/v1/docs
Get the authentication token with method Authentication POST/authenticate
Copy the accessToken and paste it to the Authorize value field.(The button is at the top right of the page)
Now you are good to invoke the REST APIs from the swagger page. Or using curl command from anywhere.
For example: $curl -X GET "https://10.65.200.146:30314/hawkconsole/Domain" -H "accept: */*" -H "Authorization: Bearer eyJhbG...token..."
Note: This should also work for the QueryNode.
Service name of the query node is redtail-querynode, URL is https://<HKQueryNode_LB_IP or Node_IP>:<port>/docs