Install dns
first1, and then the addons for monitoring with:
microk8s enable dns
microk8s enable dashboard prometheus
One can forward port from the dashboard pod to the host with:
microk8s dashboard-proxy
To access grafana, forward the port with:
microk8s kubectl port-forward -n monitoring service/grafana 3000:3000 --address 0.0.0.0
Note that by default grafana, unlike the dashboard proxy, doesn't use TLS2.
Having a HA cluster is very resource demanding for the 3 unfortunate nodes
which end up being the master. Since I don't have the capacity for this, I live
on the edge without microk8s.disable ha-cluster
.
Happened to me when adding one node.
- Call IT
- Exit the cluster with
microk8s leave
- Remove the node on master with
microk8s remove node {hostname}
- Turn HA on the node with
microk8s.enable ha-cluster
- Turn it off again with
microk8s.disable ha-cluster
- Reconnect
- Thank you Roy
To get hostname as node name, the node IP must be present in the /etc/hosts
file. See the setup.md
for list of nodes and their IPs on
the home network.
Footnotes
-
Installing
prometheus
directly afterdns
results in an error "error: error running snapctl: snap "microk8s" has "service-control" change in progress" ↩ -
This means that when you access it via https, you get
ERR_SSL_PROTOCOL_ERROR
in Firefox andSSL_ERROR_RX_RECORD_TOO_LONG
in Chrome, as I've learnt the hard way. ↩