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-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
*All other common fieldsCommon

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