Skip to content

Please multi-node docker DNS instructions #19228

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

Closed
borg286 opened this issue Jan 2, 2016 · 14 comments
Closed

Please multi-node docker DNS instructions #19228

borg286 opened this issue Jan 2, 2016 · 14 comments
Labels
kind/documentation Categorizes issue or PR as related to documentation. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. sig/cluster-lifecycle Categorizes an issue or PR as relevant to SIG Cluster Lifecycle.
Milestone

Comments

@borg286
Copy link

borg286 commented Jan 2, 2016

I'm trying to follow the instructions for local docker here
https://github.com/kubernetes/kubernetes/blob/master/docs/getting-started-guides/docker.md
For DNS setup it refers you to the multi-node docker setup for DNS. There is has the user set up some environment variables, one of which is
export KUBE_SERVER=10.10.103.250 # your master server ip, you may change it
For single-node docker setups this should be 127.0.0.1

I request that a note in the above page mention in the DNS section that the user should swap in this export instead of the one meant for multi-node setups
export KUBE_SERVER=127.0.0.1 # your master server ip, you may change it

A side note, I tried localhost and got the following error
error: couldn't read version from server: Get localhost:8080: unsupported protocol scheme "localhost"

@a-robinson
Copy link
Contributor

Thanks @borg286 -- would you be up for making this change in the docs and submitting a pull request?

@borg286
Copy link
Author

borg286 commented Jan 4, 2016

Sure.

@luxas
Copy link
Member

luxas commented Jan 5, 2016

Sorry for distrurbing, but I don't think that's the case.
If you submit 127.0.0.1 to KUBE_SERVER, it will point to localhost of the pod, not the node. The only case when localhost of a pod is the same as the node localhost is when setting hostNetwork: true on the pod definition. So, as you mentioned, setting KUBE_SERVER to 127.0.0.1 will not work, not even in the single-node docker case. You must use the public ip address of the node.

However, when serviceAccounts is properly merged and included in releases, this line and KUBE_SERVER) is unnecessary.
To check, run kubectl get serviceaccounts. If there are one secret for the default serviceaccount, it should work without the -kube-master-url to kube2sky.

Cheers!

@borg286
Copy link
Author

borg286 commented Jan 5, 2016

What is the approximate timeline for serviceAccounts to get merged in?
Contrary to what you said, setting KUBE_SERVER to 127.0.0.1 did seem to
work. I recognize now that it should be the internal address. How do I get
that internal address?

On Tue, Jan 5, 2016 at 7:25 AM, Lucas Käldström [email protected]
wrote:

Sorry for distrurbing, but I don't think that's the case.
If you submit 127.0.0.1 to KUBE_SERVER, it will point to localhost of the
pod, not the node. The only case when localhost of a pod is the same as
the node localhost is when setting hostNetwork: true on the pod
definition. So, as you mentioned, setting KUBE_SERVER to 127.0.0.1 will
not work, not even in the single-node docker case. You must use the
public ip address of the node.

However, when serviceAccounts is properly merged and included in
releases, this line
https://github.com/kubernetes/kubernetes/blob/master/docs/getting-started-guides/docker-multinode/skydns-rc.yaml.in#L51
and KUBE_SERVER) is unnecessary.
To check, run kubectl get serviceaccounts. If there are 2 secrets for the
default serviceaccount, it should work without the -kube-master-url to
kube2sky.

Cheers!


Reply to this email directly or view it on GitHub
#19228 (comment)
.

Integral z-squared dz
from 1 to the cube root of 3
times the cosine
of three pi over 9
equals log of the cube root of 'e'.

@luxas
Copy link
Member

luxas commented Jan 7, 2016

Soon #17213 is merged, I hope. But v1.1.3 has this PR already merged in, so that would work.
But instead another issue appears. The apiserver cert isn't signed for 10.0.0.10, so DNS without KUBE_SERVER won't work until we fix that.

I tested setting KUBE_SERVER to 127.0.0.1 and it didn't work. I don't know what kind of setup you have. localhost:8080 in the pod will refer to the exechealthz port.

@andreikop
Copy link
Contributor

Setting KUBE_SERVER to localhost:8080 produces error described at #12534

If I understand correctly, now there are no API server accessible by kube2sky container in single-node docker mode.
I tried to use https://10.0.0.1, which is available if kube-proxy is running. But kube2sky needs https certificates. Probably this problem will be fixed by #17213

So, now docker single node tutorial doesn't work. @luxas, I'd suggest to roll back @6ab098ec56c371a9b81fce611af1bf5f7685df6e and include it to your #17213 PR to avoid problems for next users.

See also #18626

@bgrant0607
Copy link
Member

See also #19227, #16087

@bgrant0607 bgrant0607 added priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. sig/cluster-lifecycle Categorizes an issue or PR as relevant to SIG Cluster Lifecycle. team/control-plane labels Jan 29, 2016
@bgrant0607 bgrant0607 modified the milestones: v1.2-candidate, v1.2 Jan 29, 2016
@bgrant0607 bgrant0607 changed the title Please update comment in docs Please multi-node docker DNS instructions Jan 29, 2016
@davidopp
Copy link
Member

davidopp commented Feb 4, 2016

This is marked 1.2 with no assignee.

@davidopp
Copy link
Member

@fgrzadkowski maybe you can take a look at this?

@bgrant0607 bgrant0607 added the kind/documentation Categorizes issue or PR as related to documentation. label Feb 12, 2016
@luxas
Copy link
Member

luxas commented Feb 18, 2016

@davidopp I'm working on this

@fgrzadkowski
Copy link
Contributor

Thanks @luxas

@timbunce
Copy link

I don't know if this is relevant here, but the master/docs/getting-started-guides/docker-multinode/skydns-*.yaml.in lag behind the master/cluster/addons/dns/skydns-*.yaml.in files. E.g. the former skydns-rc.yaml.in refers to gcr.io/google_containers/kube2sky:1.11 but the later refers to 1.12. I noticed this when I stumbled into #12534.

@luxas
Copy link
Member

luxas commented Feb 22, 2016

@timbunce I have a fix for this, #21504, and are working on docker-multinode UX that probably will start DNS somewhat automatically #21646

@timbunce
Copy link

That's great news. Thanks @luxas.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/documentation Categorizes issue or PR as related to documentation. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. sig/cluster-lifecycle Categorizes an issue or PR as relevant to SIG Cluster Lifecycle.
Projects
None yet
Development

No branches or pull requests

8 participants