Your web service is located at https://api.example.com/my-service
It exposes a route /_health that should return a 200 - OK response when everything is fine.
Create the following Unit resource:
---
apiVersion: kubirds.com/v1
kind: Unit
metadata:
name: check-my-service-access
namespace: default
labels:
app: my-service
spec:
schedule: every 5 minutes
image:
name: curlimages/curl:latest
command: "curl -L -v $HOST"
pullPolicy: Always
env:
- name: HOST
value: https://api.example.com/my-service/_health
The
scheduleproperty indicates how often Kubirds should run the task.The
imageproperty indicates which Docker image to use to run the task.The
envproperty populates the container environment.
For the complete Unit schema, see this page.