Skip to main content

Kubernetes

The Kubernetes check performs requests on Kubernetes resources such as Pods to get the desired information.

apiVersion: canaries.flanksource.com/v1
kind: Canary
metadata:
name: kube-check
spec:
interval: 30
kubernetes:
- namespace:
name: default
name: k8s-ready pods
kind: Pod
resource:
labelSelector: app=k8s-ready
- namespace:
name: default
kind: Pod
name: k8s-not-ready pods
ready: false
resource:
labelSelector: app=k8s-not-ready
FieldDescriptionSchemeRequired
kindSpecifies the kind of Kubernetes object for interactionstringYes
resourceQueries resources related to specified Kubernetes objectResourceSelector
namespaceSpecifies namespace for Kubernetes objectResourceSelector
ignoreIgnore the specified resources from the fetched resources. Can be a glob pattern.[]string
readyBoolean value of true or false to query and display resources based on availabilitybool
nameName of the check, must be unique within the canarystringYes
descriptionDescription for the checkstring
iconIcon for overwriting default icon on the dashboardstring
labelsLabels for checkmap[string]string
testEvaluate whether a check is healthyExpression
displayExpression to change the formatting of the displayExpression
transformTransform data from a check into multiple individual checksExpression
metricsMetrics to export from[]Metrics

ResourceSelector

FieldDescriptionSchemeRequired
nameName of Kubernetes resourcestring
labelSelectorSelect Kubernetes resource based on label. e.g. app, canary.string
fieldSelectorSelect Kubernetes resource based on the value of specified resource fieldstring