添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

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 Error testing connection https://kubernetes.default: java.net.UnknownHostException: kubernetes.default: Name does not resolve #59783 Error testing connection https://kubernetes.default: java.net.UnknownHostException: kubernetes.default: Name does not resolve #59783 fengyd2018 opened this issue Feb 13, 2018 · 8 comments lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. sig/node Categorizes an issue or PR as relevant to SIG Node. Enviroment:
kubernetes cluster, one master and two nodes.

Start Jenkins on kubernetes cluster.
Add kubernetes cluster to Jenkins cloud.

Input following information in "Kubernetes URL" and Test Connection:
https://kubernetes.default

Error log is printed:
Error testing connection https://kubernetes.default : java.net.UnknownHostException: kubernetes.default: Name does not resolve

What you expected to happen :
Connection test successful

How to reproduce it (as minimally and precisely as possible) :

Anything else we need to know? :

Environment :

  • Kubernetes version (use kubectl version ):
    Client Version: version.Info{Major:"1", Minor:"9", GitVersion:"v1.9.3", GitCommit:"d2835416544f298c919e2ead3be3d0864b52323b", GitTreeState:"clean", BuildDate:"2018-02-07T12:22:21Z", GoVersion:"go1.9.2", Compiler:"gc", Platform:"linux/amd64"}
    Server Version: version.Info{Major:"1", Minor:"9", GitVersion:"v1.9.3", GitCommit:"d2835416544f298c919e2ead3be3d0864b52323b", GitTreeState:"clean", BuildDate:"2018-02-07T11:55:20Z", GoVersion:"go1.9.2", Compiler:"gc", Platform:"linux/amd64"}
  • Cloud provider or hardware configuration:
  • OS (e.g. from /etc/os-release):
    NAME="CentOS Linux"
    VERSION="7 (Core)"
  • Kernel (e.g. uname -a ):
    Linux k8s-master 3.10.0-693.el7.x86_64 Unit test coverage in Kubelet is lousy. (~30%) #1 SMP Tue Aug 22 21:09:27 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
  • Install tools:
  • Others:
  • @fengyd2018 Are you talking about kubernetes-plugin ?
    If so, it can be because you didn't setup kube-dns correctly and this plugin works stably in my case. How about putting some more information about your dns?
    @zetaab I believe just kubernetes.default should work fine.

    I installed guestbook and found /etc/resolv.conf in the redis-slave container:
    nameserver 10.96.0.10
    search default.svc.cluster.local svc.cluster.local cluster.local

    But for the container jenkins, /etc/resolv.conf is the same as the host computer.
    I think that's why kubernetes.default cannot be resolved.
    Don't know why.

    spec:
    hostNetwork: true
    After I removed "hostNetwork: true", /etc/resolv.conf in the jenkins container:
    nameserver 10.96.0.10
    search default.svc.cluster.local svc.cluster.local cluster.local openstacklocal
    options ndots:5

    Obviously, hostNetwork is the cause.
    Could you explain the reason?

    Issues go stale after 90d of inactivity.
    Mark the issue as fresh with /remove-lifecycle stale .
    Stale issues rot after an additional 30d of inactivity and eventually close.

    If this issue is safe to close now please do so with /close .

    Send feedback to sig-testing, kubernetes/test-infra and/or fejta .
    /lifecycle stale

    lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jun 5, 2018

    Stale issues rot after 30d of inactivity.
    Mark the issue as fresh with /remove-lifecycle rotten .
    Rotten issues close after an additional 30d of inactivity.

    If this issue is safe to close now please do so with /close .

    Send feedback to sig-testing, kubernetes/test-infra and/or fejta .
    /lifecycle rotten
    /remove-lifecycle stale

    lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Jul 5, 2018

    Rotten issues close after 30d of inactivity.
    Reopen the issue with /reopen .
    Mark the issue as fresh with /remove-lifecycle rotten .

    Send feedback to sig-testing, kubernetes/test-infra and/or fejta .
    /close

    lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. sig/node Categorizes an issue or PR as relevant to SIG Node.