Configure Custom Hostnames
Configuring your own domain for a ClusterNest cluster is extremely simple - add a CNAME pointing
to our domain customers.c9t.io, then set the custom hostname on the cluster.
- OpenSearch
- Prometheus
ClusterNest Managed OpenSearch Service exposes two independent hostnames - one for the OpenSearch API, one for OpenSearch Dashboards - each customizable on its own:
opensearch.awesome-enterprise.org CNAME customers.c9t.io
opensearch-dashboards.awesome-enterprise.org CNAME customers.c9t.io
Once the CNAMEs have been added, set opensearch_custom_hostname and/or
opensearch_dashboards_custom_hostname:
- Console
- Terraform
- Raw API
Enter the hostname(s) in the cluster's settings form, at create time or as an update to an existing cluster.
resource "clusternest_opensearch" "logs" {
# ...
opensearch_custom_hostname = "opensearch.awesome-enterprise.org"
opensearch_dashboards_custom_hostname = "opensearch-dashboards.awesome-enterprise.org"
}
See the resource reference for every field.
PUT replaces the whole cluster, not just the fields you sendAny field left out of the request body resets to its schema default, not its current value -
GET the cluster first, merge in the change, then PUT the merged result back.
curl "https://api.clusternest.com/cluster/opensearch/$CLUSTER_ID" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
| jq '.opensearch_custom_hostname = "opensearch.awesome-enterprise.org"
| .opensearch_dashboards_custom_hostname = "opensearch-dashboards.awesome-enterprise.org"' \
> cluster.json
curl -X PUT "https://api.clusternest.com/cluster/opensearch/$CLUSTER_ID" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
--data-binary @cluster.json
ClusterNest Managed Prometheus has a single hostname to customize:
metrics.awesome-enterprise.org CNAME customers.c9t.io
Set prometheus_custom_hostname:
- Console
- Terraform
- Raw API
Enter the hostname in the cluster's settings form, at create time or as an update to an existing cluster.
resource "clusternest_prometheus" "metrics" {
# ...
prometheus_custom_hostname = "metrics.awesome-enterprise.org"
}
See the resource reference for every field.
PUT replaces the whole cluster, not just the fields you sendAny field left out of the request body resets to its schema default, not its current value -
GET the cluster first, merge in the change, then PUT the merged result back.
curl "https://api.clusternest.com/cluster/prometheus/$CLUSTER_ID" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
| jq '.prometheus_custom_hostname = "metrics.awesome-enterprise.org"' \
> cluster.json
curl -X PUT "https://api.clusternest.com/cluster/prometheus/$CLUSTER_ID" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
--data-binary @cluster.json
Either way, the CNAME has to resolve before the cluster picks it up - DNS propagation, not anything on ClusterNest's side, is what most delays take.