The default k0s configuration starts the
kube-router service and listens at port 8080 on my localhost.
That port is only for collecting metrics from the
kube-router service. I wonder how the port can bind to my localhost. Isn’t the k8s network stack separated from the localhost?
kube-router, as all/most Kubernetes networking components, is running on the host network namespace. Hence it is able to bind to hosts localhost.
Is that causing some problems or concerns?
8080 is also commonly used for local HTTP test servers. It surprised me when my script stopped working. I did not expect someone would take that port.
Right. It’s bit unfortunate kube-router has chosen that as the default port for metrics.
But the happy side is that you can actually configure this via k0s config: