A Go-based sensor simulator for Kubernetes, featuring a complete observability stack. It generates real-time temperature telemetry and reading counts, exported via Prometheus metrics and Loki-compatible logs, fully automated and deployed via GitOps using Argo CD.
- A running Kubernetes cluster
- Helm (package manager for Kubernetes) installed
First, install Argo CD into your cluster:
kubectl create namespace argocd
kubectl apply -n argocd --server-side --force-conflicts -f https://raw.githubusercontent.com/argoproj/argo-cd/v3.4.3/manifests/install.yamlBefore deploying, create the password required to log into the Grafana UI.
Ensure that this namespace matches the target namespace of your Grafana
deployment (defaulting to monitoring).
kubectl create namespace monitoring
kubectl create secret generic grafana-admin-secret \
-n monitoring \
--from-literal=admin-user=admin \
--from-literal=admin-password='supersecurepassword'This uses the Argo CD App of Apps pattern. Deploying the single root bootstrap application will automatically discover, configure, and roll out the entire application and observability pipeline:
kubectl apply -f argocd-apps/root-app.yaml-
Application Metrics: Visit http://localhost:8080/ and click on
Metricsto see the raw Prometheus format. -
Grafana UI: To access the Grafana UI, first port-forward it:
kubectl port-forward svc/prometheus-grafana -n monitoring 3000:80
Metrics: Open http://localhost:3000/ and log in using the username and password you stored in the Kubernetes secret above. You should be able to open the
Cloudmetricsdashboard to see the metrics being displayed.Logs: Go to
Drilldown > Logsto see logs for different services running in your cluster. -
Argo CD Dashboard: Use port forwarding:
# Use local port 7070 to avoid conflicts with the application port (8080) kubectl port-forward svc/argocd-server -n argocd 7070:443After that, open your browser and head to: https://localhost:7070/. Ignore the Certificate Error warning (Argo CD uses a self-signed certificate) and click on
Proceed anyway.The default username is
admin. Argo CD automatically generates a unique startup password and stores it securely in a Kubernetes secret. Retrieve and decode it by running:kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 -d; echo
You should be able to explore the state of the running applications:
If you add new Go packages, update the go.mod and go.sum files using a
container:
docker run --rm -v ./app:/app -w /app golang:1.23-alpine sh -c "go mod init cloudmetrics-app ; go mod tidy"Because of the App of Apps pattern, you can tear down the entire application, the observability stack, and all associated resources with a single command:
kubectl delete -f argocd-apps/root-app.yamlNote that Custom Resource Definitions (CRDs) are not deleted automatically. For details on how to uninstall them, refer to the kube-prometheus-stack official documentation.



