You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I am trying to install autoscaler-keda, but I encountered many problems when executing ko apply -f config/. Error: error creating publisher: KO_DOCKER_REPO environment variable is unset
What is the value of the variable KO_DOCKER_REPO? Thanks
The text was updated successfully, but these errors were encountered:
Hi @testwhygh here is the doc for the ko tool: https://ko.build/configuration/ (ko comes from Google). KO_DOCKER_REPO : "Container repository where to push images built with ko (required)".
For example KO_DOCKER_REPO=docker.io/skonto is my setting pointing to my repo. ko apply -f config/ builds the images and applies the related yaml files.
Alternatively you could use the recently released file for 1.16 here (it will not be the latest though as this component is actively being developed). If you want to use the latest you will have to build the autoscaler image and replace it in the yaml files (related deployment). Right now there is no dockerfile but we could add one for more flexibility if that helps, here is an example that you could use:
FROM golang AS builder
ARG TARGETOS
ARG TARGETARCH
# Create and change to the app directory.
WORKDIR /app
# Copy local code to the container image.
COPY . ./
RUN go mod tidy
# Build the command inside the container.
RUN CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -o ./autoscaler-keda ./cmd/autoscaler-keda/
# Use a Docker multi-stage build to create a lean production image.
# https://docs.docker.com/develop/develop-images/multistage-build/#use-multi-stage-builds
# https://github.com/GoogleContainerTools/distroless#readme
FROM gcr.io/distroless/base:nonroot
# Copy the binaries to the production image from the builder stage.
COPY --from=builder /app/autoscaler-keda /autoscaler-keda
WORKDIR /home/nonroot
# Run the service on container startup.
ENTRYPOINT ["/autoscaler-keda"]
Hello, I am trying to install autoscaler-keda, but I encountered many problems when executing ko apply -f config/.
Error: error creating publisher: KO_DOCKER_REPO environment variable is unset
What is the value of the variable KO_DOCKER_REPO? Thanks
The text was updated successfully, but these errors were encountered: