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

Kind cluster not able to connect server API group #3190

Closed
tppalani opened this issue May 1, 2023 · 4 comments
Closed

Kind cluster not able to connect server API group #3190

tppalani opened this issue May 1, 2023 · 4 comments
Labels
area/provider/podman Issues or PRs related to podman kind/bug Categorizes issue or PR as related to a bug. triage/needs-information Indicates an issue needs more information in order to work on it.

Comments

@tppalani
Copy link

tppalani commented May 1, 2023

What happened:

I'm Running Windows 10 system, inside windows 10, I enabled WSL 2 platform to create a kind cluster and also installed Podman desktop to GUI to monitor the kind cluster.

kind cluster is healthy and I can see the cluster status using the cluster info command.

PS C:\Users\User> kubectl cluster-info --context kind-kind
Kubernetes control plane is running at https://127.0.0.1:4309
CoreDNS is running at https://127.0.0.1:4309/api/v1/namespaces/kube-system/services/kube-dns:dns/proxy

What you expected to happen:

When I'm doing shutdown my Windows VM then after some time when I will do start windows VM, the first thing I will verify whether Podman machine is running or not using Podman desktop or using wsl command, as you see below output connection are active.

But when I am running kubectl get pod -A command I'm getting an error message like below. After seeing the below error log, I'm trying to delete the existing kind cluster then i will create it again then the below issue resolved.

Can you please someone help me, with what I'm missing here?

PS C:\Users\User> kubectl get pod -A
E0501 12:59:10.246344   11948 memcache.go:238] couldn't get current server API group list: Get "https://127.0.0.1:4280/api?timeout=32s": dial tcp 127.0.0.1:4280: connectex: No connection could be made because the target machine actively refused it.
E0501 12:59:12.257579   11948 memcache.go:238] couldn't get current server API group list: Get "https://127.0.0.1:4280/api?timeout=32s": dial tcp 127.0.0.1:4280: connectex: No connection could be made because the target machine actively refused it.
E0501 12:59:14.285324   11948 memcache.go:238] couldn't get current server API group list: Get "https://127.0.0.1:4280/api?timeout=32s": dial tcp 127.0.0.1:4280: connectex: No connection could be made because the target machine actively refused it.
E0501 12:59:16.320177   11948 memcache.go:238] couldn't get current server API group list: Get "https://127.0.0.1:4280/api?timeout=32s": dial tcp 127.0.0.1:4280: connectex: No connection could be made because the target machine actively refused it.
E0501 12:59:18.362994   11948 memcache.go:238] couldn't get current server API group list: Get "https://127.0.0.1:4280/api?timeout=32s": dial tcp 127.0.0.1:4280: connectex: No connection could be made because the target machine actively refused it.
Unable to connect to the server: dial tcp 127.0.0.1:4280: connectex: No connection could be made because the target machine actively refused it.

PS C:\Users\User> wsl -l -v
  NAME                      STATE           VERSION
  podman-machine-default    Running         2

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

Anything else we need to know?:

Environment:
NA

  • kind version: (use kind version):
kind v0.18.0 go1.20.2 windows/amd64
  • Runtime info: (use docker info or podman info):
host:
  arch: amd64
  buildahVersion: 1.30.0
  cgroupControllers:
  - cpuset
  - cpu
  - cpuacct
  - blkio
  - memory
  - devices
  - freezer
  - net_cls
  - perf_event
  - net_prio
  - hugetlb
  - pids
  - rdma
  cgroupManager: cgroupfs
  cgroupVersion: v1
  conmon:
    package: conmon-2.1.7-2.fc37.x86_64
    path: /usr/bin/conmon
    version: 'conmon version 2.1.7, commit: '
  cpuUtilization:
    idlePercent: 95.63
    systemPercent: 2.28
    userPercent: 2.1
  cpus: 4
  distribution:
    distribution: fedora
    variant: container
    version: "37"
  eventLogger: journald
  hostname: DESKTOP-1OOLTMI
  idMappings:
    gidmap: null
    uidmap: null
  kernel: 5.4.72-microsoft-standard-WSL2
  linkmode: dynamic
  logDriver: journald
  memFree: 10330509312
  memTotal: 13316632576
  networkBackend: netavark
  ociRuntime:
    name: crun
    package: crun-1.8.4-1.fc37.x86_64
    path: /usr/bin/crun
    version: |-
      crun version 1.8.4
      commit: 5a8fa99a5e41facba2eda4af12fa26313918805b
      rundir: /run/crun
      spec: 1.0.0
      +SYSTEMD +SELINUX +APPARMOR +CAP +SECCOMP +EBPF +CRIU +LIBKRUN +WASM:wasmedge +YAJL
  os: linux
  remoteSocket:
    exists: true
    path: /run/podman/podman.sock
  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: /usr/bin/slirp4netns
    package: slirp4netns-1.2.0-8.fc37.x86_64
    version: |-
      slirp4netns version 1.2.0
      commit: 656041d45cfca7a4176f6b7eed9e4fe6c11e8383
      libslirp: 4.7.0
      SLIRP_CONFIG_VERSION_MAX: 4
      libseccomp: 2.5.3
  swapFree: 4294967296
  swapTotal: 4294967296
  uptime: 0h 14m 22.00s
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: 2
    paused: 0
    running: 1
    stopped: 1
  graphDriverName: overlay
  graphOptions:
    overlay.mountopt: nodev,metacopy=on
  graphRoot: /var/lib/containers/storage
  graphRootAllocated: 269490393088
  graphRootUsed: 3365412864
  graphStatus:
    Backing Filesystem: extfs
    Native Overlay Diff: "false"
    Supports d_type: "true"
    Using metacopy: "true"
  imageCopyTmpDir: /var/tmp
  imageStore:
    number: 3
  runRoot: /run/containers/storage
  transientStore: false
  volumePath: /var/lib/containers/storage/volumes
version:
  APIVersion: 4.5.0
  Built: 1681486976
  BuiltTime: Fri Apr 14 21:12:56 2023
  GitCommit: ""
  GoVersion: go1.19.7
  Os: linux
  OsArch: linux/amd64
  Version: 4.5.0
  • OS (e.g. from /etc/os-release):
PS C:\Users\User> wsl -l -v
  NAME                      STATE           VERSION
  podman-machine-default    Running         2
  
  
PS C:\Users\User>
PS C:\Users\User>
PS C:\Users\User> podman machine ssh
Connecting to vm podman-machine-default. To close connection, use `~.` or `exit`
Warning: Permanently added '[localhost]:4112' (ECDSA) to the list of known hosts.
Last login: Sun Apr 30 17:27:15 2023
[root@DESKTOP-1OOLTMI ~]#
[root@DESKTOP-1OOLTMI ~]#
[root@DESKTOP-1OOLTMI ~]#
[root@DESKTOP-1OOLTMI ~]# cat /etc/os-release
NAME="Fedora Linux"
VERSION="37 (Container Image)"
ID=fedora
VERSION_ID=37
VERSION_CODENAME=""
PLATFORM_ID="platform:f37"
PRETTY_NAME="Fedora Linux 37 (Container Image)"
ANSI_COLOR="0;38;2;60;110;180"
LOGO=fedora-logo-icon
CPE_NAME="cpe:/o:fedoraproject:fedora:37"
DEFAULT_HOSTNAME="fedora"
HOME_URL="https://fedoraproject.org/"
DOCUMENTATION_URL="https://docs.fedoraproject.org/en-US/fedora/f37/system-administrators-guide/"
SUPPORT_URL="https://ask.fedoraproject.org/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"
REDHAT_BUGZILLA_PRODUCT="Fedora"
REDHAT_BUGZILLA_PRODUCT_VERSION=37
REDHAT_SUPPORT_PRODUCT="Fedora"
REDHAT_SUPPORT_PRODUCT_VERSION=37
SUPPORT_END=2023-11-14
VARIANT="Container Image"
VARIANT_ID=container
  • Kubernetes version: (use kubectl version):
Client Version: v1.26.2-eks-a59e1f0
Kustomize Version: v4.5.7
Server Version: v1.26.3
  • Any proxies or other special environment settings?:
    NA
@tppalani tppalani added the kind/bug Categorizes issue or PR as related to a bug. label May 1, 2023
@BenTheElder
Copy link
Member

Podman support is experimental and podman machine has never been tested.

That disclaimer aside, it sounds like you rebooted the host, and KIND + podman does not support reboots on any host. You need to switch to docker or recreate the cluster on reboot. Podman lacks the functionality we use to ensure stable references to the nodes (embedded DNS).

#1778

@BenTheElder BenTheElder added the area/provider/podman Issues or PRs related to podman label May 1, 2023
@BenTheElder
Copy link
Member

Our user maintained WSL2 guide covers docker https://kind.sigs.k8s.io/docs/user/using-wsl2/

@BenTheElder
Copy link
Member

For WSL2 see this pinned issue #3180

@BenTheElder BenTheElder added the triage/needs-information Indicates an issue needs more information in order to work on it. label May 25, 2023
@BenTheElder
Copy link
Member

Closing due to lack of follow-up for one month.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/provider/podman Issues or PRs related to podman kind/bug Categorizes issue or PR as related to a bug. triage/needs-information Indicates an issue needs more information in order to work on it.
Projects
None yet
Development

No branches or pull requests

2 participants