Skip to content

Latest commit

 

History

History
63 lines (48 loc) · 2.01 KB

MICROK8S.md

File metadata and controls

63 lines (48 loc) · 2.01 KB

microk8s

Master setup

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.

Issues

High resource usage

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.

flanneld failing on a node

Happened to me when adding one node.

  1. Call IT
  2. Exit the cluster with microk8s leave
  3. Remove the node on master with microk8s remove node {hostname}
  4. Turn HA on the node with microk8s.enable ha-cluster
  5. Turn it off again with microk8s.disable ha-cluster
  6. Reconnect
  7. Thank you Roy

Hostname as IP instead of name

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

  1. Installing prometheus directly after dns results in an error "error: error running snapctl: snap "microk8s" has "service-control" change in progress"

  2. This means that when you access it via https, you get ERR_SSL_PROTOCOL_ERROR in Firefox and SSL_ERROR_RX_RECORD_TOO_LONG in Chrome, as I've learnt the hard way.