Skip to content

Add ARM images to quay.io image #1037

@rhuss

Description

@rhuss

Actually I can't use quay.io/coreos/kube-state-metrics:v1.9.3 on a Raspberry Pi cluster as there is no manifest deployed.

Currently, I'm using this workaround with a Docker multistage build and Buildkit:

FROM golang:1.13-alpine AS builder
ARG VERSION

RUN apk add make git

WORKDIR /opt
RUN git clone https://github.com/kubernetes/kube-state-metrics.git . \
 && git fetch --tags \
 && git checkout $VERSION \
 && make build-local

# -----------------------------------------
FROM gcr.io/distroless/static

COPY --from=builder /opt/kube-state-metrics /
USER nobody
ENTRYPOINT ["/kube-state-metrics", "--port=8080", "--telemetry-port=8081"]

EXPOSE 8080 8081

and then

# Create builkdit builder
docker buildx create --name xbuilder
docker buildx use xbuilder

# Build. Adjust architectures to the ones needed
VERSION=v1.9.3
docker buildx build --build-arg VERSION=${VERSION} --platform linux/arm/v7,linux/amd64 --progress plain --push -t rhuss/kube-state-metrics:${VERSION} .

Metadata

Metadata

Assignees

No one assigned

    Labels

    lifecycle/staleDenotes an issue or PR has remained open with no activity and has become stale.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions