Skip to content

Change the value of resolver in nginx-config.yaml #671

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 3, 2018

Conversation

swhsiang
Copy link
Contributor

WHAT / WHY

To change the value of resolver in nginx-config.yaml since the address of kube-dns changed.

I derived the following errors.

...
172.17.0.14 - - [27/Jan/2018:16:53:38 +0000]  499 "POST /api/prom/push HTTP/1.1" 0 "-" "Go-http-client/1.1" "-"
172.17.0.14 - - [27/Jan/2018:16:53:38 +0000]  499 "POST /api/prom/push HTTP/1.1" 0 "-" "Go-http-client/1.1" "-"
...

Information

I followed the instruction documented in README.md to build development environment on my MAC.

kubectl version

Client Version: version.Info{Major:"1", Minor:"9", GitVersion:"v1.9.0", GitCommit:"925c127ec6b946659ad0fd596fa959be43f0cc05", GitTreeState:"clean", BuildDate:"2017-12-16T03:16:50Z", GoVersion:"go1.9.2", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"8", GitVersion:"v1.8.0", GitCommit:"0b9efaeb34a2fc51ff8e4d34ad9bc6375459c4a4", GitTreeState:"clean", BuildDate:"2017-11-29T22:43:34Z", GoVersion:"go1.9.1", Compiler:"gc", Platform:"linux/amd64"}

Result

Log from nginx container (kubectl logs nginx)

After I modified the config, the nginx works just fine.

...
172.17.0.17 - - [27/Jan/2018:16:26:21 +0000]  200 "POST /api/prom/push HTTP/1.1" 0 "-" "Go-http-client/1.1" "-"
...

@bboreham
Copy link
Contributor

The cluster IP address of kube-dns is a free choice of the installation; in some cases 10.96.0.10 will work and in other cases it won't.

I guess it's more common than 10.0.0.10 but we really should have some docs explaining that you have to tailor this setting to your own cluster.

@tomwilkie
Copy link
Contributor

I believe you can put a hostname in their (kubedns.kube-system.svc.cluster.local) and nginx will resolve it on config load, although this might not be a good idea in production.

@swhsiang
Copy link
Contributor Author

@tomwilkie kubedns.kube-system.svc.cluster.local is incorrect. kube-dns.kube-system.svc.cluster.local is the correct address.

@bboreham
Copy link
Contributor

bboreham commented Feb 3, 2018

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants