Skip to content
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

[BUG] context saved in kubectl config set as 0.0.0.0 #1543

Open
adamcirillo opened this issue Jan 16, 2025 · 1 comment
Open

[BUG] context saved in kubectl config set as 0.0.0.0 #1543

adamcirillo opened this issue Jan 16, 2025 · 1 comment
Labels
bug Something isn't working not a bug Luckily this is not a bug with k3d after all ¯\_(ツ)_/¯

Comments

@adamcirillo
Copy link

adamcirillo commented Jan 16, 2025

What did you do

  • How was the cluster created?
    k3d registry create linkerd --default-network podman
    k3d cluster create linkerd --registry-use k3d-linkerd -a 2 -s 1 -i rancher/k3s:v1.32.0-k3s1

  • What did you do afterwards?
    kubectl works fine but tools like headlamp won't connect i solved this by changing https://0.0.0.0:11892 https://127.0.0.1:11892

What did you expect to happen

headlamp should connect to the cluster

Screenshots or terminal output

If applicable, add screenshots or terminal output (code block) to help explain your problem.

Which OS & Architecture

i'm running this on windows 11 with podman desktop 1.15 & wsl 2 installed

lient:       Podman Engine
Version:      5.3.1
API Version:  5.3.1
Go Version:   go1.23.3
Git Commit:   4cbdfde5d862dcdbe450c0f1d76ad75360f67a3c
Built:        Fri Nov 22 02:45:23 2024
OS/Arch:      windows/amd64

Server:       Podman Engine
Version:      5.3.1
API Version:  5.3.1
Go Version:   go1.22.7
Built:        Thu Nov 21 11:00:00 2024
OS/Arch:      linux/amd64

Which version of k3d

k3d version v5.7.5
k3s version v1.30.6-k3s1 (default)

Which version of docker

podman version 

arch: amd64
cgroupdriver: cgroupfs
cgroupversion: "1"
endpoint: /var/run/docker.sock
filesystem: extfs
infoname: adampc
name: docker
os: fedora
ostype: linux
version: 5.3.1
PS C:\Users\adam.ADAMCIRILLO> podman version
Client:       Podman Engine
Version:      5.3.1
API Version:  5.3.1
Go Version:   go1.23.3
Git Commit:   4cbdfde5d862dcdbe450c0f1d76ad75360f67a3c
Built:        Fri Nov 22 02:45:23 2024
OS/Arch:      windows/amd64

Server:       Podman Engine
Version:      5.3.1
API Version:  5.3.1
Go Version:   go1.22.7
Built:        Thu Nov 21 11:00:00 2024
OS/Arch:      linux/amd64
PS C:\Users\adam.ADAMCIRILLO> podman version
Client:       Podman Engine
Version:      5.3.1
API Version:  5.3.1
Go Version:   go1.23.3
Git Commit:   4cbdfde5d862dcdbe450c0f1d76ad75360f67a3c
Built:        Fri Nov 22 02:45:23 2024
OS/Arch:      windows/amd64

Server:       Podman Engine
Version:      5.3.1
API Version:  5.3.1
Go Version:   go1.22.7
Built:        Thu Nov 21 11:00:00 2024
OS/Arch:      linux/amd64

podman info

host:
  arch: amd64
  buildahVersion: 1.38.0
  cgroupControllers:
  - cpuset
  - cpu
  - cpuacct
  - blkio
  - memory
  - devices
  - freezer
  - net_cls
  - perf_event
  - net_prio
  - hugetlb
  - pids
  - rdma
  - misc
  cgroupManager: cgroupfs
  cgroupVersion: v1
  conmon:
    package: conmon-2.1.12-2.fc40.x86_64
    path: /usr/bin/conmon
    version: 'conmon version 2.1.12, commit: '
  cpuUtilization:
    idlePercent: 97.73
    systemPercent: 0.92
    userPercent: 1.35
  cpus: 8
  databaseBackend: sqlite
  distribution:
    distribution: fedora
    variant: container
    version: "40"
  eventLogger: journald
  freeLocks: 2025
  hostname: adampc
  idMappings:
    gidmap: null
    uidmap: null
  kernel: 5.15.167.4-microsoft-standard-WSL2
  linkmode: dynamic
  logDriver: journald
  memFree: 28950421504
  memTotal: 33634131968
  networkBackend: netavark
  networkBackendInfo:
    backend: netavark
    dns:
      package: aardvark-dns-1.13.1-1.fc40.x86_64
      path: /usr/libexec/podman/aardvark-dns
      version: aardvark-dns 1.13.1
    package: netavark-1.13.1-1.fc40.x86_64
    path: /usr/libexec/podman/netavark
    version: netavark 1.13.1
  ociRuntime:
    name: crun
    package: crun-1.19.1-1.fc40.x86_64
    path: /usr/bin/crun
    version: |-
      crun version 1.19.1
      commit: 3e32a70c93f5aa5fea69b50256cca7fd4aa23c80
      rundir: /run/crun
      spec: 1.0.0
      +SYSTEMD +SELINUX +APPARMOR +CAP +SECCOMP +EBPF +CRIU +LIBKRUN +WASM:wasmedge +YAJL
  os: linux
  pasta:
    executable: /usr/bin/pasta
    package: passt-0^20241211.g09478d5-1.fc40.x86_64
    version: |
      pasta 0^20241211.g09478d5-1.fc40.x86_64
      Copyright Red Hat
      GNU General Public License, version 2 or later
        <https://www.gnu.org/licenses/old-licenses/gpl-2.0.html>
      This is free software: you are free to change and redistribute it.
      There is NO WARRANTY, to the extent permitted by law.
  remoteSocket:
    exists: true
    path: unix:///run/podman/podman.sock
  rootlessNetworkCmd: pasta
  security:
    apparmorEnabled: false
    capabilities: CAP_CHOWN,CAP_DAC_OVERRIDE,CAP_FOWNER,CAP_FSETID,CAP_KILL,CAP_NET_BIND_SERVICE,CAP_SETFCAP,CAP_SETGID,CAP_SETPCAP,CAP_SETUID,CAP_SYS_CHROOT
    rootless: false
    seccompEnabled: true
    seccompProfilePath: /usr/share/containers/seccomp.json
    selinuxEnabled: false
  serviceIsRemote: true
  slirp4netns:
    executable: ""
    package: ""
    version: ""
  swapFree: 8589934592
  swapTotal: 8589934592
  uptime: 3h 43m 38.00s (Approximately 0.12 days)
  variant: ""
plugins:
  authorization: null
  log:
  - k8s-file
  - none
  - passthrough
  - journald
  network:
  - bridge
  - macvlan
  - ipvlan
  volume:
  - local
registries:
  search:
  - docker.io
store:
  configFile: /usr/share/containers/storage.conf
  containerStore:
    number: 7
    paused: 0
    running: 7
    stopped: 0
  graphDriverName: overlay
  graphOptions:
    overlay.imagestore: /usr/lib/containers/storage
    overlay.mountopt: nodev,metacopy=on
  graphRoot: /var/lib/containers/storage
  graphRootAllocated: 1081101176832
  graphRootUsed: 3693441024
  graphStatus:
    Backing Filesystem: extfs
    Native Overlay Diff: "false"
    Supports d_type: "true"
    Supports shifting: "false"
    Supports volatile: "true"
    Using metacopy: "true"
  imageCopyTmpDir: /var/tmp
  imageStore:
    number: 7
  runRoot: /run/containers/storage
  transientStore: false
  volumePath: /var/lib/containers/storage/volumes
version:
  APIVersion: 5.3.1
  Built: 1732147200
  BuiltTime: Thu Nov 21 11:00:00 2024
  GitCommit: ""
  GoVersion: go1.22.7
  Os: linux
  OsArch: linux/amd64
  Version: 5.3.1
@adamcirillo adamcirillo added the bug Something isn't working label Jan 16, 2025
@iwilltry42 iwilltry42 added the not a bug Luckily this is not a bug with k3d after all ¯\_(ツ)_/¯ label Jan 20, 2025
@iwilltry42
Copy link
Member

iwilltry42 commented Jan 20, 2025

Hi there!

This is expected.
You can set the host to whatever you like using k3d cluster create --api-port HOST:HOSTPORT, e.g. --api-port 127.0.0.1:6443
That's also how it will be used for exposing the port in Docker.
You might as well use an external IP.

FWIW, since the port is exposed to your host, you can also edit the kubeconfig file manually and just replace 0.0.0.0 with 127.0.0.1 for your local tools.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working not a bug Luckily this is not a bug with k3d after all ¯\_(ツ)_/¯
Projects
None yet
Development

No branches or pull requests

2 participants