An extensible tool for creating your own in cluster health endpoints

healthyk8s

an extensible tool for creating your own "in cluster" health endpoints

Why?

allows for creating a health endpoint for anything - external resources (NFS, S3, whatever) are also easy to add.

How?

add your own "module" into the existing code, and as long as it conforms to the Api interface, it's fairly trivial to call: see the "internal/health" module for a simple starting point to see how it hangs together.

the agent can run on its own, via the deployment, or, as a sidecar container inside an existing pod.

NOTE:

to run this binary directly, without any container funkiness (requires Go 1.15):

git clone https://github.com/nicgrobler/healthyk8s.git && \
cd healthyk8s && \
go build -o server main.go && \
./server

Example?

To call the NFS module, use a POST request like this:

curl -POST http://localhost:8090/health -d'{
  "modulename": "nfs", 
  "module": {
    "Threshold":20
  }
}'

and, assuming that there is more than 20% free space left, it will repond with:

{
  "Healthy":true
}

Call the File module, to check for the existance of a file:

curl -POST http://localhost:8090/health -d'{
  "modulename": "file",
  "module": {
    "Path": "/Users/nicgrobler/code/go/src/gitlab.4data.ch/website/hugo/config.yml"
  }
}'

which will return the following, if the file exists:

{
  "Healthy":true
}
Similar Resources

Run Amazon EKS on your own infrastructure 🚀

Amazon EKS Anywhere Conformance test status: Amazon EKS Anywhere is a new deployment option for Amazon EKS that enables you to easily create and opera

Jan 5, 2023

Make any web accessible from your own host / domain

Make any web accessible from your own host / domain

Web Mirror Based on reverseproxy Solution for: Website that only set 'X-Frame-Options' to 'sameorigin'. Hide website real url Content interception & m

May 31, 2022

Latest block exporter to monitor your own nodes !

Ethereum Block Prometheus Exporter Deeply copied from 31z4/ethereum-prometheus-exporter Thanks a lot for his work ! This service exports the latest bl

Nov 5, 2021

Dynamic DNS on your own Domain, written in Go

dyngo Dynamic DNS on your own Domain, written in Go. It will determine the external IP of the system it is running on and updates a given domain recor

May 2, 2022

Kusk makes your OpenAPI definition the source of truth for API resources in your cluster

Kusk makes your OpenAPI definition the source of truth for API resources in your cluster

Kusk - use OpenAPI to configure Kubernetes What is Kusk? Developers deploying their REST APIs in Kubernetes shouldn't have to worry about managing res

Dec 16, 2022

Xds - A simple xDS server, distributing Kubernetes service endpoints to clients

xDS Server for gRPC on Kubernetes A simple xDS server, distributing Kubernetes s

Nov 20, 2022

Monitor - API endpoints for system monitoring

System monitor Golang API for accessing system stats, linux-only $ curl -s http:

Jan 12, 2022

A simple tool to sync your etcd cluster to PostgreSQL in realtime.

etcd-postgresql-syncer A simple tool to sync your etcd cluster to PostgreSQL in realtime. It sets up a watcher on etcd and commits all changes to Post

Jan 20, 2022

A simple and flexible health check library for Go.

Health A simple and flexible health check library for Go. Documentation · Report Bug · Request Feature Table of Contents Getting started Synchronous v

Jan 4, 2023
Endpoints-operator - Kubernetes endpoints balance for outsite apiserver

endpoints-operator 对于集群内访问集群外部服务场景使用固定的endpoint维护增加探活功能 背景 在实际使用中,两个K8s集群内的服务经常有

Dec 9, 2022
kubetnl tunnels TCP connections from within a Kubernetes cluster to a cluster-external endpoint, e.g. to your local machine. (the perfect complement to kubectl port-forward)

kubetnl kubetnl (kube tunnel) is a command line utility to tunnel TCP connections from within a Kubernetes to a cluster-external endpoint, e.g. to you

Dec 16, 2022
CetusGuard is a tool that allows to protect the Docker daemon socket by filtering the calls to its API endpoints.

CetusGuard CetusGuard is a tool that allows to protect the Docker daemon socket by filtering the calls to its API endpoints. Some highlights: It is wr

Dec 23, 2022
A pod scaler golang app that can scale replicas either inside of cluster or out of the cluster

pod-scaler A simple pod scaler golang application that can scale replicas via manipulating the deployment Technologies The project has been created us

Oct 24, 2021
cluster-api-state-metrics (CASM) is a service that listens to the Kubernetes API server and generates metrics about the state of custom resource objects related of Kubernetes Cluster API.

Overview cluster-api-state-metrics (CASM) is a service that listens to the Kubernetes API server and generates metrics about the state of custom resou

Oct 27, 2022
Go-gke-pulumi - A simple example that deploys a GKE cluster and an application to the cluster using pulumi

This example deploys a Google Cloud Platform (GCP) Google Kubernetes Engine (GKE) cluster and an application to it

Jan 25, 2022
Influxdb-cluster - InfluxDB Cluster for replacing InfluxDB Enterprise

InfluxDB ATTENTION: Around January 11th, 2019, master on this repository will be

Dec 26, 2022
A Terraform module to manage cluster authentication (aws-auth) for an Elastic Kubernetes (EKS) cluster on AWS.

Archive Notice The terraform-aws-modules/eks/aws v.18.20.0 release has brought back support aws-auth configmap! For this reason, I highly encourage us

Dec 4, 2022
k8s-image-swapper Mirror images into your own registry and swap image references automatically.
k8s-image-swapper Mirror images into your own registry and swap image references automatically.

k8s-image-swapper Mirror images into your own registry and swap image references automatically. k8s-image-swapper is a mutating webhook for Kubernetes

Dec 27, 2022
A simple Kubernetes Operator template that uses Golang, use it to build your own operators
A simple Kubernetes Operator template that uses Golang, use it to build your own operators

A simple programmatic Kubernetes Operator template. Use this to create your own Kubernetes operators with golang. Build with KIND (Kubernetes in Docke

May 13, 2022