GithubHelp home page GithubHelp logo

KIND kubelet fails to start about kind HOT 12 OPEN

tyler-dunkel avatar tyler-dunkel commented on July 17, 2024
KIND kubelet fails to start

from kind.

Comments (12)

tyler-dunkel avatar tyler-dunkel commented on July 17, 2024 1

Ok it created successfully with those changes. But I wonder why it was picking up the wrong arch?

from kind.

stmcginnis avatar stmcginnis commented on July 17, 2024

/remove-kind bug
/kind support

Can you check if DOCKER_DEFAULT_PLATFORM is set? I've seen some mention of this error happening when trying to run amd64 on arm64 hosts.

from kind.

tyler-dunkel avatar tyler-dunkel commented on July 17, 2024

I dont see it set. Should I set it export DOCKER_DEFAULT_PLATFORM=linux/amd64 ?

from kind.

BenTheElder avatar BenTheElder commented on July 17, 2024

I dont see it set. Should I set it export DOCKER_DEFAULT_PLATFORM=linux/amd64 ?

unset is preferable, so we can just use the docker default (which matches the host), but if it is set it should match the host platform, which in your case is not amd64

see #2718

from kind.

tyler-dunkel avatar tyler-dunkel commented on July 17, 2024

yea it is unset. It should be using the docker default. NOTE: I tested other docker containers (like hello-world) and they worked fine.

from kind.

BenTheElder avatar BenTheElder commented on July 17, 2024

Based on the logs it looks like #2718, this appears to be an amd64 image on an arm64 host. Maybe the image was already pulled as amd64 previously?

from kind.

tyler-dunkel avatar tyler-dunkel commented on July 17, 2024

Ive cleared all the images and containers out of docker and tried to run on a "clean" docker but still hit same issue.

from kind.

tyler-dunkel avatar tyler-dunkel commented on July 17, 2024

one thing to note compaired to #2718 is my install passes the prepare nodes step and fails on start control plane

from kind.

tyler-dunkel avatar tyler-dunkel commented on July 17, 2024

Adding my cluster yaml for additional details

kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
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

from kind.

BenTheElder avatar BenTheElder commented on July 17, 2024

From images.log we can see amd64 images preloaded into this node image, indicating it's an amd64 image.

This still looks like a variation on #2718

Can you try explicitly using the arm64 image?

$ crane manifest kindest/node:v1.30.0@sha256:047357ac0cfea04663786a612ba1eaba9702bef25227a794b52890dd8bcd692e
{
   "schemaVersion": 2,
   "mediaType": "application/vnd.docker.distribution.manifest.list.v2+json",
   "manifests": [
      {
         "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
         "size": 743,
         "digest": "sha256:2af5d1b382926abcd6336312d652cd045b7cc47475844a608669c71b1fefcfbc",
         "platform": {
            "architecture": "amd64",
            "os": "linux"
         }
      },
      {
         "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
         "size": 743,
         "digest": "sha256:5e4ce6f9033bdb9ce81a7fd699c8e67cfcacfab57076058e3e6f33c32036b42b",
         "platform": {
            "architecture": "arm64",
            "os": "linux"
         }
      }
   ]
}

You can use:
--image=kindest/node:v1.30.0@sha256:5e4ce6f9033bdb9ce81a7fd699c8e67cfcacfab57076058e3e6f33c32036b42b

from kind.

BenTheElder avatar BenTheElder commented on July 17, 2024

Better yet also with DOCKER_DEFAULT_PLATFORM=linux/arm64

It still looks like something is causing the wrong architecture to be run, and kind doesn't do anything this internally, that would be docker.

from kind.

BenTheElder avatar BenTheElder commented on July 17, 2024

That env may be set or there may be some other related docker setting set.

Docker sort of supports cross-platform image running but the way it does it is not sufficient to run something like Kubernetes.

If you figure out what setting this is overriding please let us know, I'm not aware of another option like DOCKER_DEFAULT_PLATFORM unless you supply --platform to docker run, which kind is not doing, so I'm not sure what it would be besides the env, but it seems plausible that docker would have some other way to set it.

from kind.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.