How to enable HTTP API in a Kubernetes Cluster?
In this article, we will discuss how to enable HTTP API on a Kubernetes operator-based cluster and how to test it.
To enable this, a couple of variables needed to be updated. The variable settings are required to be updated in the
memsql-cluster.yaml You will add the http_proxy_port and http_api settings.
globalVariables the section must be declared under the
After updating the settings, apply the configuration with the below command:
kubectl apply -f memsql-custer.yaml
After HTTP API is enabled, you can call the
GET /ping API request to verify that the HTTP service is running and connectable. To perform this action using cURL, invoke a GET request to the
/ping endpoint with no parameters, as shown below.
If the HTTP API service is available and can respond to requests, you will receive the following response along with a 200 OK status code, indicating a successful HTTP response.
GET /pingrequest can only verify whether the HTTP service is running and connectable. To confirm that the database can receive queries, use the
/queryendpoints as mentioned in the docs. Click here to know more.