As training platform, I setup a microk8s cluster on 3 RaspberryPI 4s. In principle it's working fine, I can deploy applications, etc. As it's consisting of 3 nodes, it also automatically made high availability availble.
master node 192.168.1.225
worker node1 192.168.1.226
worker node2 192.168.1.227
https://microk8s.io/high-availability is saying that microk8s is using all nodes - even the master - to execute workload. To validate I installed prometheus/grafana stack to see cluster metrics.
However, it looks like that the master node is only correctly discovered by prometheus as target, see screenshots from prometheus GUI below. Disable & re-enable prometheus did not fix the issue.
Obviously, also in Grafana I can also see the worker nodes, not master.
It feels a bit like the master node is not treated like worker nodes - however it should be as it provides capacity to cluster.
Any idea how to fix?
kubelet not outlining master node but duplicate worker node
node exporter only on worker nodes
Output of microk8s status:
microk8s statusmicrok8s is running
high-availability: yes
datastore master nodes: 192.168.1.225:19001 192.168.1.226:19001 192.168.1.227:19001
datastore standby nodes: none
addons:
enabled:
dashboard # The Kubernetes dashboard
dns # CoreDNS
ha-cluster # Configure high availability on the current node
helm3 # Helm 3 - Kubernetes package manager
ingress # Ingress controller for external access
metallb # Loadbalancer for your Kubernetes cluster
metrics-server # K8s Metrics Server for API access to service metrics
prometheus # Prometheus operator for monitoring and logging
disabled:
dashboard-ingress # Ingress definition for Kubernetes dashboard
helm # Helm 2 - the package manager for Kubernetes
host-access # Allow Pods connecting to Host services smoothly
linkerd # Linkerd is a service mesh for Kubernetes and other frameworks
openebs # OpenEBS is the open-source storage solution for Kubernetes
portainer # Portainer UI for your Kubernetes cluster
rbac # Role-Based Access Control for authorisation
registry # Private image registry exposed on localhost:32000
storage # Storage class; allocates storage from host directory
traefik # traefik Ingress controller for external access
Pods in Prometheus namespace:
microk8s.kubectl get pods -n monitoring
NAME READY STATUS RESTARTS AGE
node-exporter-dkhks 2/2 Running 2 (11d ago) 11d
prometheus-adapter-5b7fb5c557-2bbqs 1/1 Running 2 (11d ago) 11d
prometheus-operator-667757c7b9-7ll9v 2/2 Running 4 (24h ago) 11d
alertmanager-main-0 2/2 Running 4 (24h ago) 11d
node-exporter-qc467 2/2 Running 4 (24h ago) 11d
grafana-59f6895cb8-28dmn 1/1 Running 2 (24h ago) 11d
blackbox-exporter-5c4d9867d6-57wxv 3/3 Running 6 (24h ago) 11d
prometheus-k8s-0 2/2 Running 3 (24h ago) 11d
prometheus-adapter-5b7fb5c557-dfx6v 1/1 Running 3 (24h ago) 11d
kube-state-metrics-bbd47c478-4qb54 3/3 Running 7 (24h ago) 11d