> For the complete documentation index, see [llms.txt](https://docs.mithril.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.mithril.ai/compute-api/compute-api-reference/kubernetes-clusters.md).

# Kubernetes Clusters

## Get Kubernetes Clusters

> Get all Kubernetes clusters for a project

```json
{"openapi":"3.1.0","info":{"title":"Mithril","version":"1.0.0"},"servers":[{"url":"https://api.mithril.ai"}],"security":[{"MithrilAPIKey":[]}],"components":{"securitySchemes":{"MithrilAPIKey":{"type":"http","scheme":"bearer","bearerFormat":"fkey_<key>"}},"schemas":{"KubernetesClusterModel":{"properties":{"fid":{"type":"string","title":"Fid"},"project":{"type":"string","title":"Project"},"name":{"type":"string","title":"Name"},"region":{"type":"string","title":"Region"},"created_at":{"type":"string","format":"datetime","title":"Created At"},"kube_host":{"type":"string","nullable":true},"ssh_keys":{"items":{"type":"string"},"type":"array","title":"Ssh Keys"},"instances":{"items":{"type":"string"},"type":"array","title":"Instances"},"join_command":{"type":"string","nullable":true},"status":{"type":"string","enum":["Pending","Available","Terminated"],"title":"Status"},"deleted_at":{"type":"string","format":"datetime","nullable":true},"k8s_version":{"type":"string","title":"K8S Version"},"user_fid":{"type":"string","nullable":true}},"type":"object","required":["fid","project","name","region","created_at","ssh_keys","instances","status","k8s_version"],"title":"KubernetesClusterModel"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"oneOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/v2/kubernetes/clusters":{"get":{"tags":["kubernetes clusters"],"summary":"Get Kubernetes Clusters","description":"Get all Kubernetes clusters for a project","operationId":"get_kubernetes_clusters_v2_kubernetes_clusters_get","parameters":[{"name":"project","in":"query","required":true,"schema":{"type":"string","title":"Project"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/KubernetesClusterModel"},"title":"Response Get Kubernetes Clusters V2 Kubernetes Clusters Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

## Create Kubernetes Cluster

> Create a new Kubernetes cluster

```json
{"openapi":"3.1.0","info":{"title":"Mithril","version":"1.0.0"},"servers":[{"url":"https://api.mithril.ai"}],"security":[{"MithrilAPIKey":[]}],"components":{"securitySchemes":{"MithrilAPIKey":{"type":"http","scheme":"bearer","bearerFormat":"fkey_<key>"}},"schemas":{"CreateKubernetesClusterRequest":{"properties":{"name":{"type":"string","title":"Name"},"project":{"type":"string","title":"Project"},"region":{"type":"string","title":"Region"},"ssh_keys":{"items":{"type":"string"},"type":"array","minItems":1,"title":"Ssh Keys"},"instance_type":{"type":"string","title":"Instance Type"},"k8s_version":{"type":"string","enum":["1.34","1.29"],"title":"K8S Version","default":"1.34"},"image_version":{"type":"string","nullable":true}},"type":"object","required":["name","project","region","ssh_keys","instance_type"],"title":"CreateKubernetesClusterRequest"},"KubernetesClusterModel":{"properties":{"fid":{"type":"string","title":"Fid"},"project":{"type":"string","title":"Project"},"name":{"type":"string","title":"Name"},"region":{"type":"string","title":"Region"},"created_at":{"type":"string","format":"datetime","title":"Created At"},"kube_host":{"type":"string","nullable":true},"ssh_keys":{"items":{"type":"string"},"type":"array","title":"Ssh Keys"},"instances":{"items":{"type":"string"},"type":"array","title":"Instances"},"join_command":{"type":"string","nullable":true},"status":{"type":"string","enum":["Pending","Available","Terminated"],"title":"Status"},"deleted_at":{"type":"string","format":"datetime","nullable":true},"k8s_version":{"type":"string","title":"K8S Version"},"user_fid":{"type":"string","nullable":true}},"type":"object","required":["fid","project","name","region","created_at","ssh_keys","instances","status","k8s_version"],"title":"KubernetesClusterModel"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"oneOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/v2/kubernetes/clusters":{"post":{"tags":["kubernetes clusters"],"summary":"Create Kubernetes Cluster","description":"Create a new Kubernetes cluster","operationId":"create_kubernetes_cluster_v2_kubernetes_clusters_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateKubernetesClusterRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KubernetesClusterModel"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

## Get Kubernetes Cluster

> Get a specific Kubernetes cluster

```json
{"openapi":"3.1.0","info":{"title":"Mithril","version":"1.0.0"},"servers":[{"url":"https://api.mithril.ai"}],"security":[{"MithrilAPIKey":[]}],"components":{"securitySchemes":{"MithrilAPIKey":{"type":"http","scheme":"bearer","bearerFormat":"fkey_<key>"}},"schemas":{"KubernetesClusterModel":{"properties":{"fid":{"type":"string","title":"Fid"},"project":{"type":"string","title":"Project"},"name":{"type":"string","title":"Name"},"region":{"type":"string","title":"Region"},"created_at":{"type":"string","format":"datetime","title":"Created At"},"kube_host":{"type":"string","nullable":true},"ssh_keys":{"items":{"type":"string"},"type":"array","title":"Ssh Keys"},"instances":{"items":{"type":"string"},"type":"array","title":"Instances"},"join_command":{"type":"string","nullable":true},"status":{"type":"string","enum":["Pending","Available","Terminated"],"title":"Status"},"deleted_at":{"type":"string","format":"datetime","nullable":true},"k8s_version":{"type":"string","title":"K8S Version"},"user_fid":{"type":"string","nullable":true}},"type":"object","required":["fid","project","name","region","created_at","ssh_keys","instances","status","k8s_version"],"title":"KubernetesClusterModel"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"oneOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/v2/kubernetes/clusters/{cluster_fid}":{"get":{"tags":["kubernetes clusters"],"summary":"Get Kubernetes Cluster","description":"Get a specific Kubernetes cluster","operationId":"get_kubernetes_cluster_v2_kubernetes_clusters__cluster_fid__get","parameters":[{"name":"cluster_fid","in":"path","required":true,"schema":{"type":"string","title":"Cluster Fid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KubernetesClusterModel"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

## Delete Kubernetes Cluster

> Delete a Kubernetes cluster

```json
{"openapi":"3.1.0","info":{"title":"Mithril","version":"1.0.0"},"servers":[{"url":"https://api.mithril.ai"}],"security":[{"MithrilAPIKey":[]}],"components":{"securitySchemes":{"MithrilAPIKey":{"type":"http","scheme":"bearer","bearerFormat":"fkey_<key>"}},"schemas":{"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"oneOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/v2/kubernetes/clusters/{cluster_fid}":{"delete":{"tags":["kubernetes clusters"],"summary":"Delete Kubernetes Cluster","description":"Delete a Kubernetes cluster","operationId":"delete_kubernetes_cluster_v2_kubernetes_clusters__cluster_fid__delete","parameters":[{"name":"cluster_fid","in":"path","required":true,"schema":{"type":"string","title":"Cluster Fid"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.mithril.ai/compute-api/compute-api-reference/kubernetes-clusters.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
