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
spec:
kubernetes:
- namespace:
name: default
name: k8s-ready pods
kind: Pod
resource:
labelSelector: app=k8s-ready
- namespace:
name: default
kind: Pod
name: k8s-ready pods
ready: false
resource:
labelSelector: app=k8s-not-ready
FieldDescriptionSchemeRequired
descriptionDescription for the checkstring
displayTemplate to display query results in text (overrides default bar format for UI)Template
iconIcon for overwriting default icon on the dashboardstring
ignoreIgnore the specified resources from the fetched resources. Can be a glob pattern.[]string
kindSpecifies the kind of Kubernetes object for interactionstringYes
labelsLabels for the checkstring
nameName of the checkstringYes
namespaceSpecifies namespace for Kubernetes objectResourceSelector
readyBoolean value of true or false to query and display resources based on availabilitybool
resourceQueries resources related to specified Kubernetes objectResourceSelector
testTemplate to test the result againstTemplate
transformTemplate to transform results toTemplate

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