MastodonHow to add status page to your k8s cluster using kubestatus | Soubai's stories
How to add status page to your k8s cluster using kubestatus

How to add status page to your k8s cluster using kubestatus

January 14, 2023

Hello in today's blog post we will learn how to add a status page to your kubernetes cluster.

What is status page

By definition a status page is a communication page (public) that helps you inform your users about outages and scheduled maintenance. And as kubernetes (k8s) is the preferred platform to deploy applications nowdays it's deserves to make a blog post on how to create a status page

pre-required to start

To be able to progress in this tutorial make make sure you have a working kubernetes cluster and kubectl installed. in this tutorial I will use a minikube to spin up a local k8s cluster.

minikube start

I will be using kubestatus an open-source tool that I created to make life easier 😎.

What is Kubestatus

Kubestatus is a tool that allows you to create the status of your Kubernetes cluster. It is written in Go and uses the Kubernetes API to fetch information about the clusters and resources.

The tool provides a simple and convenient way to view the current state of your cluster and resources without having to use the kubectl command-line tool or the Kubernetes dashboard.

Kubestatus can be used to quickly identify problems or issues with your cluster's services, and can be a useful tool for troubleshooting and debugging. It is designed to be easy to use and requires minimal setup, making it a useful tool for both experienced Kubernetes users and those new to the platform.

install Kubestatus:

Using helm:

You can install Kubestatus via helm chart

helm repo add kubestatus

You may need sometime to update your repo list:

helm repo update

After install the chart on namespace kubestatus

helm install kubestatus kubestatus/kubestatus --set namespace="default" --n kubestatus --create-namespace --wait

Using kubectl:

Clone the repo:

git clone
cd kubestatus

Create k8s resources:

kubectl create -f kubestatus.yaml

Check the creation of resources under the namespace kubestatus

kubectl get all -n kubestatus


In order to run Kubestatus on your Kubernetes cluster quickly, You need to:

  • Tell Kubestatus the namespace to watch for that edit ConfigMap and update namespace value (--set namespace="default")
  • Tell Kubestatus the services to watch for that add annotation kubestatus/watch='true' to desired services:
kubectl annotate svc my-service-name kubestatus/watch='true'

Adding some resources for the demo

To be able to see some out put we need to create a some resources (Pod + Service). I will create a simple nginx deployment and expose it via a ClusterIP service.

In your terminal:

cat <<EOF | kubectl apply -f -
apiVersion: apps/v1
kind: Deployment
  name: nginx-deployment
      app: nginx
  replicas: 1
        app: nginx
      - name: nginx
        image: nginx:1.14.2
        - containerPort: 80


cat <<EOF | kubectl apply -f -
apiVersion: v1
kind: Service
  name: nginx-service
    app: nginx
  - port: 80

Add annotation to nginx-service:

kubectl annotate svc nginx-service kubestatus/watch='true'

Demo time

You can add the kubestatus service to your Ingress to get something like .. for the forwarder demo I will just use port-forward to expose the kubestatus service so I can access to the status page on my local network http://localhost:8080

kubectl port-forward service/kubestatus-service 8080:8080 -n kubestatus

You should be able to see something similar to:



Written by Abderrahim SOUBAI-ELIDRISI Homosapien with high affinity to machines. Interested in Web Technologies & Cloud