mtougeron/khcheck-get-pods
A Kuberhealthy check that checks that it can get pods in a specified period of time
125
The Kuberhealthy Get Pods Check
checks if the API servers returns a list of pods under a specified time-limit.
A big shout-out and thank you goes to Comcast for writing Kuberhealthy
apiVersion: comcast.github.io/v1
kind: KuberhealthyCheck
metadata:
name: get-pods
spec:
runInterval: 5m
timeout: 1m
podSpec:
containers:
- name: main
image: ghcr.io/mtougeron/khcheck-get-pods:latest
imagePullPolicy: IfNotPresent
env:
- name: NAMESPACE
value: "kuberhealthy"
- name: MAX_DURATION_MILLISECONDS
value: "250"
- name: DEBUG
value: "1"
where NAMESPACE
is the Kubernetes namespace to get the pods from.
Make sure you are using the latest release of Kuberhealthy 2.x
Run kubectl apply
against example spec file
kubectl apply -f khcheck-get-pods.yaml -n kuberhealthy
Container Image
Image is available Github Container Registry and DockerHub
This project is licensed under the Apache V2 License. See LICENSE for more information.
docker pull mtougeron/khcheck-get-pods