Metrics-server is usually part of monitoring stacks for Kubernetes clusters. It queries kubelets via their metrics API, which is usually exposed via port 10255.
We've been running Kip in host network mode, thus moving the metrics endpoint to a different port. However, metrics-server can only set the metrics port on a per cluster basis, thus either monitor only virtual-kubelet instances or regular kubelet instances.
Thus, we need to move the metrics port to 10255.
A possible solution is to run Kip without host network mode. There are two caveats:
We need kube-proxy in a sidecar, to put in place nodeport and clusterIP redirects.
Access to the metadata service of the instance. I tested it briefly, and it seems to work on GCE even from inside pods. I haven't tested AWS.
The goal here is to
add kube-proxy sidecar,
run Kip without host network mode and
test node ports and general functionality of Kip.
Example pod spec with kube-proxy added as a sidecar:
Metrics-server is usually part of monitoring stacks for Kubernetes clusters. It queries kubelets via their metrics API, which is usually exposed via port 10255.
We've been running Kip in host network mode, thus moving the metrics endpoint to a different port. However, metrics-server can only set the metrics port on a per cluster basis, thus either monitor only virtual-kubelet instances or regular kubelet instances.
Thus, we need to move the metrics port to 10255.
A possible solution is to run Kip without host network mode. There are two caveats:
The goal here is to
Example pod spec with kube-proxy added as a sidecar: