September 2026 release is live Read More

K8s Cluster APIs for IaC Automation

Why this matters: the manual onboarding flows (copy a script, paste it into a shell) assume a human doing the work interactively. These are the underlying API calls for teams who want to script cluster onboarding themselves — for example, calling this from a CI/CD pipeline or a custom automation tool, rather than using Terraform (see the EKS-specific Terraform module) or the manual UI flow.

OnPrem K8s

  1. Create a New OnPrem K8s cluster using API

Copy the tenant URL from

Mavvrik Console > Admin >API

Open Mavvrik API settings
Open Mavvrik API settings

use the REST as TENANT REST URL

and API Key > KEY for authorization

API Request

API Method: GET
URL: <TENANT REST URL>/k8s/init/k8s
Headers:
x-api-key: <MAVVRIK APIKEY>

Response

{
    "id": "wroxhgclop",
    "url": "oci://us-central1-docker.pkg.dev/cloudwiz-io/public-charts/dx-k8s-appliance",
    "secret": "<SECRET>"
}
  1. To Get info related to an existing cluster using API

Copy the cluster ID from the
Mavvrik Console > Admin > Kubernetes > select the cluster > Reconnect Button >

and copy the cluster ID from Step 3

and replace the CLUSTER ID

Identify the Kubernetes cluster ID
Identify the Kubernetes cluster ID

API Request

API Method: GET
URL: <TENANT REST URL>/k8s/init/k8?clusterId=<CLUSTER ID>
Headers:
x-api-key: <MAVVRIK APIKEY>

Response

{
    "id": "wroxhgclop",
    "url": "oci://us-central1-docker.pkg.dev/cloudwiz-io/public-charts/dx-k8s-appliance",
    "secret": "<SECRET>"
}

Troubleshooting

  • If a request fails with an auth error, confirm the x-api-key header is set to your Mavvrik API key — both calls on this page require it.

  • If you don't know a cluster's ID, get it from Mavvrik Console > Admin > Kubernetes > select the cluster > Reconnect Button, rather than guessing.

FAQs

Should I use this API instead of the manual onboarding flow?
Only if you're scripting cluster onboarding yourself — for example, from a CI/CD pipeline or a custom automation tool. For a one-off setup, the manual copy-paste script flow or a Terraform module is simpler.

What's the difference between the two API calls on this page?
The first creates the init payload for a new OnPrem K8s cluster. The second retrieves the same kind of info for a cluster that already exists, using its cluster ID.