Cluster Monitoring

You can find source code and guidelines on Github.

Motivation behind this project to learn:

  • Using Kubernetes Go SDK to operate on cluster by a service
  • Using Knative on Kubernetes clusters
  • Using a service mesh and ingress gateway such as Istio
  • Using a certificate manager to provide HTTPS connection
  • Configuring a custom domain to publish services
  • Proxy requests by creating DNS records on DNS providers

Cluster Monitoring

To learn the concepts described above, I created a Knative service that uses in-cluster configurations to retrieve information about deployments.

It has three endpoints:

  • GET /health is used by Kubernetes for liveness probe.
  • GET /services/{namespace} is used to get information about deployments in a specific namespace.
  • GET /services/{namespace}/{applicationGroup} is used to get information about deployments in a specific namespace and application group.

Then,

  • I deployed this service as a Knative service.
  • Created an wildcard A record on Cloudflare, my DNS provider, to proxy requests to the external IP of the cluster.
  • Configured Knative to use my custom domain.
  • Used cert-manager to provision a TLS certificate automatically.
  • Configured Knative to provide HTTPS connection.