---
title: "Get the Kubernetes cluster version and Portainer-relevant capabilities"
method: GET
path: "/kubernetes/{id}/version"
tags: ["kubernetes"]
---

# Get the Kubernetes cluster version and Portainer-relevant capabilities

`GET /kubernetes/{id}/version`

Get the Kubernetes cluster version (major, minor, gitVersion, ...)
as reported by the cluster's discovery API, augmented with capability
flags Portainer uses to gate UI features (e.g. supportsPodRestart).
**Access policy**: Authenticated user.

## Path parameters

- `id` integer, required

## Response `200`

Success

- KubernetesKubernetesVersionResponse
  - `buildDate` string
  - `compiler` string
  - `emulationMajor` string — EmulationMajor is the major version of the emulation version
  - `emulationMinor` string — EmulationMinor is the minor version of the emulation version
  - `gitCommit` string
  - `gitTreeState` string
  - `gitVersion` string
  - `goVersion` string
  - `major` string — Major is the major version of the binary version
  - `minCompatibilityMajor` string — MinCompatibilityMajor is the major version of the minimum compatibility version
  - `minCompatibilityMinor` string — MinCompatibilityMinor is the minor version of the minimum compatibility version
  - `minor` string — Minor is the minor version of the binary version
  - `platform` string
  - `supportsPodRestart` boolean — SupportsPodRestart is true when the cluster exposes the `pods/restart` subresource via API discovery — i.e. the feature gate is enabled and the cluster version is recent enough. This is the authoritative signal for whether Portainer can call the pod-restart endpoint, and is preferred over a raw Kubernetes-version comparison.

## Other responses

- `401` — Unauthorized access - the user is not authenticated or does not have the necessary permissions.
- `403` — Permission denied - the user is authenticated but does not have the necessary permissions to access the requested resource or perform the specified operation.
- `404` — Unable to find an environment with the specified identifier.
- `500` — Server error occurred while attempting to retrieve the cluster version.

---

[API](https://skmtc.net/portainer/apis/portainerce-api.md) · [All operations](https://skmtc.net/portainer/apis/portainerce-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/portainer/portainerce-api/versions/c0b0975cd11b/schema)
