pydo.kubernetes.get_cluster_lint_results()

Description

To request clusterlint diagnostics for your cluster, send a GET request to /v2/kubernetes/clusters/$K8S_CLUSTER_ID/clusterlint. If the run_id query parameter is provided, then the diagnostics for the specific run is fetched. By default, the latest results are shown.

To find out how to address clusterlint feedback, please refer to the clusterlint check documentation.

Parameters

Name Type Required Description Default Value
cluster_id string True A unique ID that can be used to reference a Kubernetes cluster.
run_id string False Specifies the clusterlint run whose results will be retrieved.

Request Sample

import os
from pydo import Client

client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN"))

resp = client.kubernetes.get_cluster_lint_results(cluster_id="da8fda8")

Responses

See the API spec for this endpoint to view additional detail on responses, headers, parameters, and more.

The response is a JSON object which contains the diagnostics on Kubernetes objects in the cluster. Each diagnostic will contain some metadata information about the object and feedback for users to act upon.

Click to expand an example response.
{
  "run_id": "50c2f44c-011d-493e-aee5-361a4a0d1844",
  "requested_at": "2019-10-30T05:34:07Z",
  "completed_at": "2019-10-30T05:34:11Z",
  "diagnostics": [
    {
      "check_name": "unused-config-map",
      "severity": "warning",
      "message": "Unused config map",
      "object": {
        "name": "foo",
        "kind": "config map",
        "namespace": "kube-system"
      }
    },
    {
      "check_name": "unused-config-map",
      "severity": "warning",
      "message": "Unused config map",
      "object": {
        "name": "foo",
        "kind": "config map",
        "namespace": "kube-system"
      }
    }
  ]
}

Unauthorized

Click to expand an example response.
{
  "id": "unauthorized",
  "message": "Unable to authenticate you."
}

The resource was not found.

Click to expand an example response.
{
  "id": "not_found",
  "message": "The resource you requested could not be found."
}

API Rate limit exceeded

Click to expand an example response.
{
  "id": "too_many_requests",
  "message": "API Rate limit exceeded."
}

Server error.

Click to expand an example response.
{
  "id": "server_error",
  "message": "Unexpected server-side error"
}

Unexpected error

Click to expand an example response.
{
  "id": "example_error",
  "message": "some error message"
}