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

arm64 image has wrong architecture #1615

Closed
arnitolog opened this issue Oct 18, 2021 · 2 comments · Fixed by #1629
Closed

arm64 image has wrong architecture #1615

arnitolog opened this issue Oct 18, 2021 · 2 comments · Fixed by #1629
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@arnitolog
Copy link

arnitolog commented Oct 18, 2021

What happened:
I want to run kube-state-metrics v2.2.3 on the arm64 node. I have downloaded the image k8s.gcr.io/kube-state-metrics/kube-state-metrics-arm64:v2.2.3.
But when I did docker inspect it showed the architecture is still amd64 and my Kubernetes arm node is not able to run this image :

[
    {
        "Id": "sha256:fbcfb8562ecd149b3544e8506201bcdf22ce89443e51a80fdee4fb10a5728c82",
        "RepoTags": [
            "k8s.gcr.io/kube-state-metrics/kube-state-metrics-arm64:v2.2.3"
        ],
        "RepoDigests": [
            "k8s.gcr.io/kube-state-metrics/kube-state-metrics-arm64@sha256:b9fde7b533d24538317ee54709bbf7295d005f6838666fb5dfaf65d583572197"
        ],
        "Parent": "",
        "Comment": "",
        "Created": "2021-10-11T14:50:08.27707348Z",
        "Container": "6445d97943b73aa50452cd80324cc0362314682559708f5334091e4e2c1a73ed",
        "ContainerConfig": {
            "Hostname": "6445d97943b7",
            "Domainname": "",
            "User": "nobody",
            "AttachStdin": false,
            "AttachStdout": false,
            "AttachStderr": false,
            "ExposedPorts": {
                "8080/tcp": {},
                "8081/tcp": {}
            },
            "Tty": false,
            "OpenStdin": false,
            "StdinOnce": false,
            "Env": [
                "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
                "SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt"
            ],
            "Cmd": [
                "/bin/sh",
                "-c",
                "#(nop) ",
                "EXPOSE 8080 8081"
            ],
            "Image": "sha256:091741be1d9364225d09693ad0b02700ebf3e491af819de7fcecf6e50c12039b",
            "Volumes": null,
            "WorkingDir": "/",
            "Entrypoint": [
                "/kube-state-metrics",
                "--port=8080",
                "--telemetry-port=8081"
            ],
            "OnBuild": null,
            "Labels": {}
        },
        "DockerVersion": "20.10.8",
        "Author": "",
        "Config": {
            "Hostname": "",
            "Domainname": "",
            "User": "nobody",
            "AttachStdin": false,
            "AttachStdout": false,
            "AttachStderr": false,
            "ExposedPorts": {
                "8080/tcp": {},
                "8081/tcp": {}
            },
            "Tty": false,
            "OpenStdin": false,
            "StdinOnce": false,
            "Env": [
                "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
                "SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt"
            ],
            "Cmd": null,
            "Image": "sha256:091741be1d9364225d09693ad0b02700ebf3e491af819de7fcecf6e50c12039b",
            "Volumes": null,
            "WorkingDir": "/",
            "Entrypoint": [
                "/kube-state-metrics",
                "--port=8080",
                "--telemetry-port=8081"
            ],
            "OnBuild": null,
            "Labels": null
        },
        "Architecture": "amd64",
        "Os": "linux",
        "Size": 36243915,
        "VirtualSize": 36243915,
        "GraphDriver": {
            "Data": {
                "LowerDir": "/var/lib/docker/overlay2/9d810219ef786022078a8b5671c6c5baf57f6578d29bf016e3dbf60cc29b9d78/diff",
                "MergedDir": "/var/lib/docker/overlay2/6631b54758319ee07d5438ad0517fd6601d8478d85b89edfcee063837a51db31/merged",
                "UpperDir": "/var/lib/docker/overlay2/6631b54758319ee07d5438ad0517fd6601d8478d85b89edfcee063837a51db31/diff",
                "WorkDir": "/var/lib/docker/overlay2/6631b54758319ee07d5438ad0517fd6601d8478d85b89edfcee063837a51db31/work"
            },
            "Name": "overlay2"
        },
        "RootFS": {
            "Type": "layers",
            "Layers": [
                "sha256:c0d270ab7e0db0fa1db41d15b679a7b77ffbb9db62790095c7aee41444435933",
                "sha256:13e3bcc4c6cb049739ec481797a5bc8a597e90c2d803760a4c6259a8c8675721"
            ]
        },
        "Metadata": {
            "LastTagTime": "0001-01-01T00:00:00Z"
        }
    }
]

What you expected to happen:
architecture is correctly specified for the image

How to reproduce it (as minimally and precisely as possible):
download image k8s.gcr.io/kube-state-metrics/kube-state-metrics-arm64:v2.2.3 and execute docker inspect

Anything else we need to know?:

Environment:

  • kube-state-metrics version: v2.2.3
  • Kubernetes version (use kubectl version):
  • Cloud provider or hardware configuration:
  • Other info:
@arnitolog arnitolog added the kind/bug Categorizes issue or PR as related to a bug. label Oct 18, 2021
@mrueg
Copy link
Member

mrueg commented Oct 18, 2021

Please try with k8s.gcr.io/kube-state-metrics/kube-state-metrics:v2.2.3, which is multi-arch. (the architecture specific ones are not needed).

@Serializator
Copy link
Contributor

I made a pull request (kubernetes-sigs/metrics-server#882) for the same issue at kubernetes-sigs/metrics-server and can verify that this issue also occurs with the k8s.gcr.io/kube-state-metrics/kube-state-metrics:v2.2.3 image.

$ docker pull k8s.gcr.io/kube-state-metrics/kube-state-metrics:v2.2.3
$ docker inspect k8s.gcr.io/kube-state-metrics/kube-state-metrics:v2.2.3 | jq ".[].Architecture"
"amd64"

/assign

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
3 participants