Skip to main content
Skip table of contents

K8s Cluster APIs for IaC Automation

OnPrem K8s

  1. Create a New OnPrem K8s cluster using API

Copy the tenant URL from

Mavvrik Console > Admin >API

Screenshot 2025-03-21 at 10.18.43.png

use the REST as TENANT REST URL

and API Key > KEY for authorization

API Request

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

Response

CODE
{
    "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

Screenshot 2025-03-21 at 10.26.43.png

API Request

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

Response

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

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.