MicroK8s : Enable Observability2026/05/20 |
|
Enable Observability add-on to monitor metrics on MicroK8s Cluster. |
|
| [1] | Enable built-in Observability add-on on primary Node. |
|
root@dlp:~# microk8s enable observability
Infer repository core for addon observability
Addon core/dns is already enabled
Addon core/helm3 is already enabled
Addon core/hostpath-storage is already enabled
Enabling observability
Release "kube-prom-stack" does not exist. Installing it now.
I0520 05:54:47.710802 25379 warnings.go:110] "Warning: v1 Endpoints is deprecated in v1.33+; use discovery.k8s.io/v1 EndpointSlice"
I0520 05:54:47.712513 25379 warnings.go:110] "Warning: v1 Endpoints is deprecated in v1.33+; use discovery.k8s.io/v1 EndpointSlice"
I0520 05:54:54.698468 25379 warnings.go:110] "Warning: v1 Endpoints is deprecated in v1.33+; use discovery.k8s.io/v1 EndpointSlice"
I0520 05:54:54.699541 25379 warnings.go:110] "Warning: v1 Endpoints is deprecated in v1.33+; use discovery.k8s.io/v1 EndpointSlice"
NAME: kube-prom-stack
LAST DEPLOYED: Wed May 20 05:54:44 2026
NAMESPACE: observability
STATUS: deployed
REVISION: 1
NOTES:
kube-prometheus-stack has been installed. Check its status by running:
kubectl --namespace observability get pods -l "release=kube-prom-stack"
Get Grafana 'admin' user password by running:
kubectl --namespace observability get secrets kube-prom-stack-grafana -o jsonpath="{.data.admin-password}" | base64 -d ; echo
Access Grafana local instance:
export POD_NAME=$(kubectl --namespace observability get pod -l "app.kubernetes.io/name=grafana,app.kubernetes.io/instance=kube-prom-stack" -oname)
kubectl --namespace observability port-forward $POD_NAME 3000
Visit https://github.com/prometheus-operator/kube-prometheus for instructions on how to create & configure Alertmanager and Prometheus instances using the Operator.
Release "loki" does not exist. Installing it now.
NAME: loki
LAST DEPLOYED: Wed May 20 05:55:01 2026
NAMESPACE: observability
STATUS: deployed
REVISION: 1
NOTES:
The Loki stack has been deployed to your cluster. Loki can now be added as a datasource in Grafana.
See http://docs.grafana.org/features/datasources/loki/ for more detail.
Release "tempo" does not exist. Installing it now.
NAME: tempo
LAST DEPLOYED: Wed May 20 05:55:03 2026
NAMESPACE: observability
STATUS: deployed
REVISION: 1
TEST SUITE: None
sudo: preserving the entire environment is not supported, '-E' is ignored
sudo: preserving the entire environment is not supported, '-E' is ignored
No callback tokens file.
root@dlp:~# microk8s kubectl get pods -n observability NAME READY STATUS RESTARTS AGE alertmanager-kube-prom-stack-kube-prome-alertmanager-0 2/2 Running 0 117s kube-prom-stack-grafana-6c57c7dbc5-lvd2g 3/3 Running 0 2m2s kube-prom-stack-kube-prome-operator-6cb465454b-6hqmv 1/1 Running 0 2m2s kube-prom-stack-kube-state-metrics-6ccf79c879-vxttk 1/1 Running 0 2m2s kube-prom-stack-prometheus-node-exporter-vvrxp 1/1 Running 0 2m2s loki-0 1/1 Running 0 115s loki-promtail-nz6j4 1/1 Running 0 115s prometheus-kube-prom-stack-kube-prome-prometheus-0 2/2 Running 0 117s tempo-0 1/1 Running 0 113s # set port-forwarding to enable external access if you need # Prometheus UI root@dlp:~# microk8s kubectl port-forward -n observability service/prometheus-operated --address 0.0.0.0 9090:9090 Forwarding from 0.0.0.0:9090 -> 9090 # Grafana UI root@dlp:~# microk8s kubectl port-forward -n observability service/kube-prom-stack-grafana --address 0.0.0.0 3000:80 Forwarding from 0.0.0.0:3000 -> 3000 |
| [2] | Access to [https://(MicroK8s primary node's Hostname or IP address):(setting port)] with an web browser
on a Client computer in local network. Then, that's OK if following Prometheus or Grafana UI is shown. For default user/password on Grafana, it [admin/prom-operator]. |
|
|
|
| Sponsored Link |
|
|