K3d: [HELP] Cluster not reachable on localhost with kubectl

Created on 18 Aug 2020  路  6Comments  路  Source: rancher/k3d

What did you do?

  • How was the cluster created?

    • k3d cluster create mycluster --api-port 6550 -p 8081:80@loadbalancer --switch-context
  • What did you do afterwards?

    • k3d cluster list ==> ok
    • docker ps ==> all containers shown and running all port-mappings as expected
    • reboot

What did you expect to happen?

command 'kubectl cluster-info' should return info about the newly created cluster.

Screenshots or terminal output

Bildschirmfoto 2020-08-18 um 17 27 14
Bildschirmfoto 2020-08-18 um 17 27 52
Bildschirmfoto 2020-08-18 um 17 28 22

Which OS & Architecture?

  • Ubuntu 20.04.1 LTS

Which version of k3d?

  • k3d version v3.0.1 / k3s version v.18.6-k3s1

Which version of docker?

  • Version: 19.03.12 / api-version: 1.40
bug

All 6 comments

Solved the problem myself by explicitly adding the 0.0.0.0 IP to /etc/environment "no_proxy" parameter.

Hi @rr-appadaptive , thanks for opening this issue!
Glad that you could solve it yourself. So this was about the settings on your local machine, right?
Then I'll go ahead and close this task :+1:

Solved the problem myself by explicitly adding the 0.0.0.0 IP to /etc/environment "no_proxy" parameter.

Also solved my problem. I use a global proxy to download kubectl and other install scripts.
All install scripts aren't support proxy setting. I have to config a global proxy.

Then you can probably as well use --api-port 127.0.0.1:6443 upon cluster creation. I'd guess that 127.0.0.1 is no_proxy by default?

@iwilltry42 why does K3D reference the server by 0.0.0.0 anyway? AFAIK it's not even a valid ip address.

@Ka0o0 we make the server listen on 0.0.0.0 by default, so it listens on all interfaces (that's what it stands for after all). What's written in the kubeconfig is whatever is the listening address, so we don't assume anything there.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

blaggacao picture blaggacao  路  5Comments

jwhb picture jwhb  路  3Comments

sfriedel picture sfriedel  路  6Comments

rjshrjndrn picture rjshrjndrn  路  5Comments

inercia picture inercia  路  4Comments