A minimalist Kubernetes dashboard that displays your cluster's pod information on a single page, built with Hugo and automatically updated via Kubernetes CronJobs.
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ │ │ │ │ │
│ Kubernetes │ │ Git Repo │ │ GitHub Actions │
│ CronJob │────>│ (content │────>│ (Build & Push │
│ (Update Pods) │ │ update) │ │ Docker Image) │
│ │ │ │ │ │
└─────────────────┘ └─────────────────┘ └─────────────────┘
│ │
│ │
│ ▼
│ ┌─────────────────┐
│ │ │
│ │ Container │
│ │ Registry │
│ │ │
│ └─────────────────┘
│ │
│ │
▼ ▼
┌─────────────────┐ ┌─────────────────┐
│ │ │ │
│ kubectl │ │ ArgoCD │
│ (Pod Data) │ │ (Deployment) │
│ │ │ │
└─────────────────┘ └─────────────────┘
│
│
▼
┌─────────────────┐
│ │
│ Hugo Site │
│ (Dashboard) │
│ │
└─────────────────┘
The system works as follows:
- A Kubernetes CronJob runs periodically to gather pod information
- The CronJob updates the Hugo content directly in the _index.md file
- GitHub Actions workflow builds the Hugo site and packages it as a Docker image
- ArgoCD deploys the updated image to the Kubernetes cluster
- Simple dashboard: Shows current cluster status and all pods on a single page
- Automatic updates: CronJob refreshes pod information hourly
- Fork or clone this repository
- Replace
YOUR_USERNAME
in the following files:manifest/argo-hugo-app.yaml
manifest/cronjob-update-pods.yaml
- Go to GitHub Settings > Developer Settings > Personal Access Tokens
- Create a new token with
repo
scope - Create a Kubernetes secret with this token (for use by the CronJob):
kubectl create namespace prod
kubectl create secret generic github-token-secret -n prod --from-literal=GITHUB_TOKEN=your_github_token
kubectl apply -f manifest/cronjob-rbac.yaml
kubectl apply -f manifest/cronjob-update-pods.yaml
- Install ArgoCD in your cluster if not already present
- Update the repository URL in
manifest/argo-hugo-app.yaml
to point to your fork - Apply the ArgoCD application:
kubectl apply -f manifest/argo-hugo-app.yaml
The CronJob performs these steps:
- Clones the GitHub repository
- Fetches cluster pod information using kubectl
- Updates the _index.md file with current pod data
- Generates a simple JSON API endpoint for status information
- Commits and pushes changes back to GitHub
- GitHub Actions builds and publishes the Docker image
- ArgoCD detects the new image and updates the deployment
To run the site locally for development:
hugo server -D
To change the dashboard:
- Edit
content/_index.md
for the main page content - Modify styles directly in the _index.md file
- Adjust the CronJob schedule in
manifest/cronjob-update-pods.yaml
MIT License