gefyrahq / gefyra

Blazingly-fast :rocket:, rock-solid, local application development :arrow_right: with Kubernetes.
https://gefyra.dev
Apache License 2.0
686 stars 28 forks source link

'gefyra up' fails with kind setup in podman #680

Open Nieju opened 2 months ago

Nieju commented 2 months ago

What happened?

gefyra -d up
on 0: DEBUG gefyra.api.status status.py:94 - Reading API resources from Kubernetes
on 0: WARNING urllib3.connectionpool connectionpool.py:870 - Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x11199f590>: Failed to establish a new connection: [Errno 61] Connection refused')': /api/v1/
on 0: WARNING urllib3.connectionpool connectionpool.py:870 - Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x11199ee10>: Failed to establish a new connection: [Errno 61] Connection refused')': /api/v1/
on 0: WARNING urllib3.connectionpool connectionpool.py:870 - Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x11199f7a0>: Failed to establish a new connection: [Errno 61] Connection refused')': /api/v1/

What did you expect to happen?

The command to complete

kubectl get ns output

kubectl get ns
NAME                 STATUS   AGE
default              Active   20m
ingress-nginx        Active   20m
kube-node-lease      Active   20m
kube-public          Active   20m
kube-system          Active   20m
local-path-storage   Active   20m

Please provide the output of gefyra check.

No such command

How can we reproduce it (as minimally and precisely as possible)?

  1. Install podman
  2. Create machine
  3. Install kind
    export KIND_EXPERIMENTAL_PROVIDER=podman
    cat <<EOF | sudo kind create cluster --config=-
    kind: Cluster
    apiVersion: kind.x-k8s.io/v1alpha4
    name: rgmx-cluster
    nodes:
    - role: control-plane
    kubeadmConfigPatches:
    - |
    kind: InitConfiguration
    nodeRegistration:
      kubeletExtraArgs:
        node-labels: "ingress-ready=true"
    extraPortMappings:
    - containerPort: 80
    hostPort: 80
    protocol: TCP
    - containerPort: 443
    hostPort: 443
    protocol: TCP
    - containerPort: 31820
    hostPort: 31820
    protocol: udp
    EOF

What Kubernetes setup are you working with?

Client Version: v1.30.2 Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3 Server Version: v1.29.2

OS version

Darwin Kernel Version 23.6.0

Anything else we need to know?

Gefyra client version: 2.2.2

kubectl cluster-info

Kubernetes control plane is running at https://127.0.0.1:56358
CoreDNS is running at https://127.0.0.1:56358/api/v1/namespaces/kube-system/services/kube-dns:dns/proxy

Also

gefyra -d install --apply

on 0: DEBUG gefyra install.py:67 - Using options: GefyraInstallOptions(namespace='gefyra', version='2.2.2', service_type='NodePort', service_port=31820, service_labels={}, service_annotations={})
on 0: DEBUG gefyra install.py:83 - {'apiVersion': 'v1', 'kind': 'Namespace', 'metadata': {'name': 'gefyra'}}
on 0: WARNING urllib3.connectionpool connectionpool.py:870 - Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x113392540>: Failed to establish a new connection: [Errno 61] Connection refused')': /api/v1/namespaces
on 0: WARNING urllib3.connectionpool connectionpool.py:870 - Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x1137da5a0>: Failed to establish a new connection: [Errno 61] Connection refused')': /api/v1/namespaces
on 0: WARNING urllib3.connectionpool connectionpool.py:870 - Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x1137da930>: Failed to establish a new connection: [Errno 61] Connection refused')': /api/v1/namespaces
Installing Gefyra |████████████████████| 0 in 0.7s 
Error: HTTPSConnectionPool(host='127.0.0.1', port=53961): Max retries exceeded with url: /api/v1/namespaces (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x1137da7e0>: Failed to establish a new connection: [Errno 61] Connection refused'))
Nieju commented 2 months ago

Looks like ~/.gefyra/default.yaml is somehow incorrect. How to update it (except manually)?

Nieju commented 2 months ago

When updating it manually to be identical to /.kube/config then gefyra -d install --apply works.

gefyra -d up still fails

Nieju commented 2 months ago

How to regenerate the ~/.gefyra/ directory?

Nieju commented 2 months ago

Honestly, looks like a cool tool but with the documentation I cannot make it work.

What are the steps I need to follow after I have

  1. Installed gefyra
  2. Installed the kind cluster as shown in the post above

Thank you