Clusterlint helps operators conform to Kubernetes best practices around resources, security and reliability to avoid common problems while operating or upgrading the clusters.
To request a clusterlint run on your cluster, send a POST request to
/v2/kubernetes/clusters/$K8S_CLUSTER_ID/clusterlint
. This will run all
checks present in the doks
group by default, if a request body is not
specified. Optionally specify the below attributes.
For information about the available checks, please refer to the clusterlint check documentation.
Name | Type | Required | Description | Default Value |
---|---|---|---|---|
cluster_id |
string | True | A unique ID that can be used to reference a Kubernetes cluster. | |
body |
JSON or IO[bytes] | False |
import os
from pydo import Client
client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN"))
req = {
"include_groups": [
"basic",
"doks",
"security"
],
"include_checks": [
"bare-pods",
"resource-requirements"
],
"exclude_groups": [
"workload-health"
],
"exclude_checks": [
"default-namespace"
]
}
resp = client.kubernetes.run_cluster_lint(cluster_id="1fd32a", body=req)
See the API spec for this endpoint to view additional detail on responses, headers, parameters, and more.