https://rancher.com/ logo
Title
v

victorious-insurance-69234

03/21/2023, 7:15 AM
Hello, trying to just do
kubectl get nodes
on a cluster created by
k3d
. The command
kubectl cluster-info
hangs with no output and no clear indication as to what is wrong. I'll paste some diagnostics now. The command used to create the cluster was
k3d cluster create k8s
$ k3d node list
NAME               ROLE           CLUSTER   STATUS
k3d-k8s-server-0   server         k8s       running
k3d-k8s-serverlb   loadbalancer   k8s       running
$ docker ps
CONTAINER ID   IMAGE                            COMMAND                  CREATED         STATUS         PORTS                             NAMES
8b1a899f1bcd   <http://ghcr.io/k3d-io/k3d-proxy:5.4.9|ghcr.io/k3d-io/k3d-proxy:5.4.9>   "/bin/sh -c nginx-pr…"   2 minutes ago   Up 2 minutes   80/tcp, 0.0.0.0:39277->6443/tcp   k3d-k8s-serverlb
0d2361470d59   rancher/k3s:v1.25.7-k3s1         "/bin/k3d-entrypoint…"   2 minutes ago   Up 2 minutes
$ cat ~/.kube/config
apiVersion: v1
clusters:
- cluster:
    certificate-authority-data: <redacted>
    server: <https://0.0.0.0:39277>
  name: k3d-k8s
contexts:
- context:
    cluster: k3d-k8s
    user: admin@k3d-k8s
  name: k3d-k8s
current-context: k3d-k8s
kind: Config
preferences: {}
users:
- name: admin@k3d-k8s
  user:
    client-certificate-data: <redacted>
    client-key-data: <redacted>
$ cat /etc/os-release 
NAME="Arch Linux"
PRETTY_NAME="Arch Linux"
ID=arch
BUILD_ID=rolling
ANSI_COLOR="38;2;23;147;209"
HOME_URL="<https://archlinux.org/>"
DOCUMENTATION_URL="<https://wiki.archlinux.org/>"
SUPPORT_URL="<https://bbs.archlinux.org/>"
BUG_REPORT_URL="<https://bugs.archlinux.org/>"
PRIVACY_POLICY_URL="<https://terms.archlinux.org/docs/privacy-policy/>"
LOGO=archlinux-logo
$ sudo iptables -L
Chain INPUT (policy ACCEPT)
target     prot opt source               destination         

Chain FORWARD (policy DROP)
target     prot opt source               destination         
DOCKER-USER  all  --  anywhere             anywhere            
DOCKER-ISOLATION-STAGE-1  all  --  anywhere             anywhere            
ACCEPT     all  --  anywhere             anywhere             ctstate RELATED,ESTABLISHED
DOCKER     all  --  anywhere             anywhere            
ACCEPT     all  --  anywhere             anywhere            
ACCEPT     all  --  anywhere             anywhere            
ACCEPT     all  --  anywhere             anywhere             ctstate RELATED,ESTABLISHED
DOCKER     all  --  anywhere             anywhere            
ACCEPT     all  --  anywhere             anywhere            
ACCEPT     all  --  anywhere             anywhere            
ACCEPT     all  --  anywhere             anywhere             ctstate RELATED,ESTABLISHED
DOCKER     all  --  anywhere             anywhere            
ACCEPT     all  --  anywhere             anywhere            
ACCEPT     all  --  anywhere             anywhere            

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination         

Chain DOCKER (3 references)
target     prot opt source               destination         
ACCEPT     tcp  --  anywhere             172.21.0.3           tcp dpt:sun-sr-https

Chain DOCKER-ISOLATION-STAGE-1 (1 references)
target     prot opt source               destination         
DOCKER-ISOLATION-STAGE-2  all  --  anywhere             anywhere            
DOCKER-ISOLATION-STAGE-2  all  --  anywhere             anywhere            
DOCKER-ISOLATION-STAGE-2  all  --  anywhere             anywhere            
RETURN     all  --  anywhere             anywhere            

Chain DOCKER-ISOLATION-STAGE-2 (3 references)
target     prot opt source               destination         
DROP       all  --  anywhere             anywhere            
DROP       all  --  anywhere             anywhere            
DROP       all  --  anywhere             anywhere            
RETURN     all  --  anywhere             anywhere            

Chain DOCKER-USER (1 references)
target     prot opt source               destination         
RETURN     all  --  anywhere             anywhere
$ docker inspect <http://ghcr.io/k3d-io/k3d-proxy:5.4.9|ghcr.io/k3d-io/k3d-proxy:5.4.9>
[
    {
        "Id": "sha256:55aa42e8234edfe155d3fe46003f03988a3ec0171bccc3ae2854cad1e2d79c07",
        "RepoTags": [
            "<http://ghcr.io/k3d-io/k3d-proxy:5.4.9|ghcr.io/k3d-io/k3d-proxy:5.4.9>"
        ],
        "RepoDigests": [
            "<http://ghcr.io/k3d-io/k3d-proxy@sha256:538f5f0223ef455031ad311565b0ab6bee28961d9a4eac249f6aa930c7640bf5|ghcr.io/k3d-io/k3d-proxy@sha256:538f5f0223ef455031ad311565b0ab6bee28961d9a4eac249f6aa930c7640bf5>"
        ],
        "Parent": "",
        "Comment": "buildkit.dockerfile.v0",
        "Created": "2023-03-17T05:35:47.663228988Z",
        "Container": "",
        "ContainerConfig": {
            "Hostname": "",
            "Domainname": "",
            "User": "",
            "AttachStdin": false,
            "AttachStdout": false,
            "AttachStderr": false,
            "Tty": false,
            "OpenStdin": false,
            "StdinOnce": false,
            "Env": null,
            "Cmd": null,
            "Image": "",
            "Volumes": null,
            "WorkingDir": "",
            "Entrypoint": null,
            "OnBuild": null,
            "Labels": null
        },
        "DockerVersion": "",
        "Author": "",
        "Config": {
            "Hostname": "",
            "Domainname": "",
            "User": "",
            "AttachStdin": false,
            "AttachStdout": false,
            "AttachStderr": false,
            "ExposedPorts": {
                "80/tcp": {}
            },
            "Tty": false,
            "OpenStdin": false,
            "StdinOnce": false,
            "Env": [
                "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
                "NGINX_VERSION=1.19.10",
                "NJS_VERSION=0.5.3",
                "PKG_RELEASE=1",
                "OS=",
                "ARCH="
            ],
            "Cmd": null,
            "Image": "",
            "Volumes": null,
            "WorkingDir": "",
            "Entrypoint": [
                "/bin/sh",
                "-c",
                "nginx-proxy"
            ],
            "OnBuild": null,
            "Labels": {
                "maintainer": "NGINX Docker Maintainers <docker-maint@nginx.com>",
                "org.opencontainers.image.created": "2023-03-17T05:35:06.435Z",
                "org.opencontainers.image.description": "Little helper to run CNCF's k3s in Docker",
                "org.opencontainers.image.licenses": "MIT",
                "org.opencontainers.image.revision": "18967282633144120abcf75a3dacc110543cc00c",
                "org.opencontainers.image.source": "<https://github.com/k3d-io/k3d>",
                "org.opencontainers.image.title": "k3d",
                "org.opencontainers.image.url": "<https://github.com/k3d-io/k3d>",
                "org.opencontainers.image.version": "5"
            },
            "StopSignal": "SIGQUIT"
        },
        "Architecture": "amd64",
        "Os": "linux",
        "Size": 42393610,
        "VirtualSize": 42393610,
        "GraphDriver": {
            "Data": {
                "LowerDir": "/var/lib/docker/overlay2/5403b1da8c213266850221b39a5b7694787a6e2fb4e09a8060429d0cefeca1af/diff:/var/lib/docker/overlay2/c18d416723b59a3a56abed94f5472706204ac9bfb5ef095f7fda89dc1288027c/diff:/var/lib/docker/overlay2/debf956e07b8c023dfea14d03f2a37e2c99862f722cc2482d4084873e1249a80/diff:/var/lib/docker/overlay2/048f1a158f4fc8fab2863d6c6360063410e7a1e5a880fc0821d263df2c72a170/diff:/var/lib/docker/overlay2/abf0683460b29ffea0fbfaec50417fab7d0c21c2733ca54398311182f328717c/diff:/var/lib/docker/overlay2/1ab7bf768eb4a5e1d253a1c2d4c445d8fb2d481763285a22b15bd667650fa405/diff:/var/lib/docker/overlay2/9b6fc7c3365d31fd2058d7602bcb21874b2015f31c017ae91c1a993398dea62f/diff:/var/lib/docker/overlay2/f94023589ffa7c12cceb331dcfb354b7ea102ae6a8bd1a77ad9915be60bda038/diff:/var/lib/docker/overlay2/895db9d4cbcc8a2bbfd2d6b9642ae6b4579817c12a43a338f9d3320e090aa4a8/diff:/var/lib/docker/overlay2/cbc3025ed5cc787342dea6a99b45544a846d7e5991a04039c8eadec79dc3139e/diff",
                "MergedDir": "/var/lib/docker/overlay2/0e2bdc9e22a9e51d7e1cf50c8db83c49576294055a943c76acd6c777e7d5810a/merged",
                "UpperDir": "/var/lib/docker/overlay2/0e2bdc9e22a9e51d7e1cf50c8db83c49576294055a943c76acd6c777e7d5810a/diff",
                "WorkDir": "/var/lib/docker/overlay2/0e2bdc9e22a9e51d7e1cf50c8db83c49576294055a943c76acd6c777e7d5810a/work"
            },
            "Name": "overlay2"
        },
        "RootFS": {
            "Type": "layers",
            "Layers": [
                "sha256:b2d5eeeaba3a22b9b8aa97261957974a6bd65274ebd43e1d81d0a7b8b752b116",
                "sha256:ed3fe3f2b59f88def4ef31f4020793e2dc613571bebd4e8ee1241185fd2e6945",
                "sha256:4531e200ac8d238b1f09c9b6f6aa2283532ec011de255b28cce9cf4aabf758f0",
                "sha256:3c369314e0038454cd2849c5efac02812cea5a3b575f4e74cf6a9d1790360b24",
                "sha256:3480549413ea041ba4a469d540b4bd3fe579029098f0a02038c0d1f4f0c25bdf",
                "sha256:4689e8eca613fc415093e337de5d9194fbe1f767cc474f07b73ff08d2efcdac0",
                "sha256:431f7c4eab0e9d18fd5c897ea975792eb1855fea6b9d7e88ca279c1babefdb9c",
                "sha256:676e91d8739fb0ba44bfcb78ffda8029c6de70fd9d7502e606b33bee08cdce6a",
                "sha256:4665183fb7306ec6497057862674343e5626bd47c83758dd93169de529b24394",
                "sha256:263972c7e626a3bc7e9a3c9b10b3ff33cc52f44b84894e98cedff3be76e36824",
                "sha256:5b390e0d0fdd660e6edd31b9f6e3b912b42da4d2e3dafe5da90a35fb48f23ce3"
            ]
        },
        "Metadata": {
            "LastTagTime": "0001-01-01T00:00:00Z"
        }
    }
]