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} .
The images are best effort currently, we don't have automation in place to generate those, we are working with the k8s org but sort of blocked on google right now.
But if you want to contribute the scripts to the makefile and update the release process we can generate and push those to at least coreos quay repo. Contributions welcome! :)
I'm taking a look at the Makefile but it's unclear what needs to change.
There is all-push
all-push: $(addprefix sub-push-,$(ALL_ARCH))
Which makes use of sub-push
sub-push-%:
$(MAKE) --no-print-directory ARCH=$* push
Which makes use of push
push: .push-$(ARCH)
.push-$(ARCH): .container-$(ARCH)
gcloud docker -- push $(MULTI_ARCH_IMG):$(TAG)
gcloud docker -- push $(MULTI_ARCH_IMG):latest
ifeq ($(ARCH), amd64)
gcloud docker -- push $(IMAGE):$(TAG)
gcloud docker -- push $(IMAGE):latest
endif
But why does sub-push not call quay-push as well?
Is it just as simple as adding the following to sub-push?
sub-push-%:
$(MAKE) --no-print-directory ARCH=$* push
$(MAKE) --no-print-directory ARCH=$* quay-push
A short-term fix is to just use this docker image: docker.io/carlosedp/kube-state-metrics.
Feel free to contribute the changes! :) Lets have those in before we migrate to https://github.com/kubernetes/kube-state-metrics/issues/1089
Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close.
Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale
/remove-lifecycle stale
I am very much still interested in this and will look into contributing the changes if I can.
There is work in progress for this already https://github.com/kubernetes/kube-state-metrics/pull/1190
Great! Glad arm64 is getting so much traction at the moment. 馃檪
Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close.
Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale
Closing this as they are part of gcr images now, we plan on deprecating quay images in the future so we won't be adding them to quay.
Closing this as they are part of gcr images now, we plan on deprecating quay images in the future so we won't be adding them to quay.
Happy to hear they are part of gcr, would you know the full repo url? I tried k8s.gcr.io/kube-state-metrics/kube-state-metrics:v1.9.7 and it doesn't seem to be there. Thanks!
@nemo83 they are not available for v1.9.7, for those you need to build them yourself the same as for quay, but they are available from 2.0 pre-release onwards, but you can use the same building make target to build the image of v1.9.7 which is most likely the final release. See those here https://github.com/kubernetes/kube-state-metrics#container-image
Most helpful comment
A short-term fix is to just use this docker image:
docker.io/carlosedp/kube-state-metrics.