Skip to content
This repository was archived by the owner on Jul 30, 2021. It is now read-only.

Conversation

@brancz
Copy link
Contributor

@brancz brancz commented Nov 8, 2016

The dnsmasq sidecar to expose metrics was recently released. Skydns (within kube-dns) by default exposes Prometheus metrics on a random port, and this defines it to be 8083.

It would be nice to expose those metrics by default, without having to modify the deployment after deploying a new cluster.

@stuart-warren
Copy link

your change mentions both port 8082 and 8083?

@brancz
Copy link
Contributor Author

brancz commented Nov 10, 2016

Port 8082 exposes metrics from dnsmasq and 8083 exposes metrics from skydns

@aaronlevy
Copy link
Contributor

@brancz we typically try to keep the addons in-line with the version of kubernetes the tool is installing. In this case, these changes have been made to upstream master, but not yet in v1.4.x (which this tool currently installs).

We can diverge from the upstream releases, but looks like there are a few differences here compared to the upstream version: https://github.com/kubernetes/kubernetes/pull/36261/files -- and hopefully we can minimize differences / maintenance burden. Is there a reason we can't keep this closer to the upstream changes?

Also, we should probably add a comment to the manifest describing the change / reference PR so down the line when trying to update the manifest - this change is not dropped (e.g. if v1.5.x doesn't ship with that change, it should be clear that we need to maintain this as a patch).

@brancz
Copy link
Contributor Author

brancz commented Nov 15, 2016

I missed that PR upstream. Of course it makes sense to stay as close to the upstream example as possible. So I guess we wait then until it gets into 1.4.x or 1.5.x?

@aaronlevy
Copy link
Contributor

If this is a useful / low risk change - we can diverge from the upstream. We do in minor ways already (such as using a deployment instead of replication controller - upstream changed in master, but not 1.4/1.5).

Another option would be to propose cherry-picking the upstream change back into v1.4/1.5 releases if that's not planned already.

I'm not super familiar with the needs for this change -- so I could go either way (wait until upstream matches, or carry patch if low-risk + helpful).

@brancz
Copy link
Contributor Author

brancz commented Nov 16, 2016

The need for this change is simply so we don't have to reconfigure kube-system components on future clusters, just to do something as basic to running a production infrastructure as exposing metrics from all components. All other components already expose metrics through their http servers, just these are missing. It is essential for end-to-end monitoring of a kubernetes cluster.

Regarding diverging from upstream: I have absolutely no hard feeling about the choice of ports, so I would prefer staying as close to upstream as possible, so I will update this PR accordingly. I will probably only get to it early next week, as I want to test it properly.

In addition to that I would also suggest to cherry-pick the change into 1.4 and 1.5.

Does this in general sound good?

@aaronlevy
Copy link
Contributor

Yup, sounds good

@brancz brancz force-pushed the expose-metrics branch 2 times, most recently from 0489dd4 to 7892a34 Compare November 28, 2016 16:41
@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Nov 28, 2016
@brancz
Copy link
Contributor Author

brancz commented Nov 29, 2016

Updated Deployment and Service manifests for kube-dns using:

curl -sL https://github.com/kubernetes/kubernetes/raw/545f749a0deb8535656ce93ac1f35a59887839bf/cluster/addons/dns/skydns-rc.yaml.sed | sed s/\$DNS_DOMAIN/cluster\.local/ | tail -n +21
curl -sL https://github.com/kubernetes/kubernetes/raw/545f749a0deb8535656ce93ac1f35a59887839bf/cluster/addons/dns/skydns-svc.yaml.sed | sed s/\$DNS_SERVER_IP/10\.3\.0\.10/ | tail -n +19

(tail to cut off the License part and a TODO, lmk if you want to include either of those)

Looks good to you now @aaronlevy ?

Built and tested with hack/multi-node.

Copy link
Contributor

@aaronlevy aaronlevy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@aaronlevy aaronlevy merged commit 911f0df into kubernetes-retired:master Dec 1, 2016
@brancz brancz deleted the expose-metrics branch December 1, 2016 19:32
@brancz
Copy link
Contributor Author

brancz commented Jan 24, 2017

for reference kube-dns and it's sidecars have moved to https://github.com/kubernetes/dns

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

cncf-cla: yes Indicates the PR's author has signed the CNCF CLA.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants