-
scripts/build echo Building k3s
CGO_ENABLED=1 "${GO}" build $BLDFLAGS -tags "$TAGS" -buildvcs=false -gcflags="all=${GCFLAGS}" -ldflags "$VERSIONFLAGS $LDFLAGS $STATIC" -o bin/k3s${BINARY_POSTFIX} ./cmd/server
scripts/package-cli CMD_NAME=dist/artifacts/k3s${BIN_SUFFIX}${BINARY_POSTFIX}
GOOS=linux CC=gcc CXX=g++ "${GO}" generate
LDFLAGS="
-X github.com/k3s-io/k3s/pkg/version.Version=$VERSION
-X github.com/k3s-io/k3s/pkg/version.GitCommit=${COMMIT:0:8}
-w -s
"
TAGS="urfave_cli_no_docs"
STATIC="-extldflags '-static'"
CGO_ENABLED=0 "${GO}" build -tags "$TAGS" -buildvcs=false -ldflags "$LDFLAGS $STATIC" -o ${CMD_NAME} ./cmd/k3s |
Beta Was this translation helpful? Give feedback.
Answered by
brandond
Jul 11, 2024
Replies: 1 comment 2 replies
-
There are two k3s binaries:
If you look at |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
brandond
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There are two k3s binaries:
If you look at
/var/lib/rancher/k3s/data/HASH/bin
on a k3s node, you'll find another k3s binary there - this is the actual entrypoint for the running k3s process. The one we install to /usr/local/bin/k3s just extracts and calls the actual binaries.