kubectl, one Kubernetes minor per tag, rebuilt weekly and signed. A drop-in for bitnami/kubectl.
9.5K
kubectl for pipelines and Helm hooks: one Kubernetes minor per tag, rebuilt every week, signed, and laid out like bitnami/kubectl, so a chart written for that image runs on this one unchanged.
bitnami/kubectl has published one tag since August 2025: latest. Its versioned tags stopped at 1.33.4 on 2025-08-22 and live on, unmaintained, as bitnamilegacy/kubectl, pulled 21.6 million times by 2026-10-26. A chart or pipeline that pinned bitnami/kubectl:1.33 stopped receiving security fixes that day, and one that switched to latest now gets whatever kubectl minor ships next, which kubectl's one-minor version skew policy does not promise will talk to its cluster.
docker run --rm heyvaldemar/kubectl:1.37 version --client
docker run --rm -v ~/.kube/config:/.kube/config:ro heyvaldemar/kubectl:1.37 get nodes
In a chart that used bitnami/kubectl:<version>, change the repository and pick the minor of your cluster:
image:
repository: heyvaldemar/kubectl
tag: "1.37"
| Tag | What it is | Moves |
|---|---|---|
1.37, 1.36, 1.35 | the three newest Kubernetes minors, the window upstream supports | every week and on every change here, with the minor's current patch release and Debian's security updates; never to another minor |
1.37.1 | one patch release | every week, with Debian's security updates, while it is its minor's current patch |
latest | the newest minor | as 1.37, and to the next minor the week it ships |
Every tag moves, so a pinned tag keeps receiving security fixes. For an image that never changes, pin its digest:
docker buildx imagetools inspect heyvaldemar/kubectl:1.37 --format '{{.Manifest.Digest}}'
A minor that falls out of the newest three keeps its last image and stops moving. Images are linux/amd64 and linux/arm64.
Charts depend on how the image runs, not only on kubectl. This one keeps what bitnami/kubectl did:
1001 with group 0, so it also runs under an arbitrary UID in group 0 (OpenShift);kubectl and the command --help, so args: ["get", "pods"] works as it did;HOME=/, with /.kube writable by group 0, so a kubeconfig mounted at /.kube/config is found and kubectl's discovery cache works;/opt/bitnami/kubectl/bin/kubectl and /opt/bitnami/common/bin/yq run.It is checked, not claimed. tests/drop-in-test.sh runs on every build against the last versioned Bitnami image, bitnamilegacy/kubectl:1.33.4: the same user, entrypoint, command and HOME, the same calls a hook makes, and every executable on its PATH on this one's. The ones that are not here are named in tests/drop-in-absent.tsv, each with its reason: Bitnami's own package scripts, and tools Debian 13 no longer ships in its slim base (apt-key, adduser, util-linux extras). The test fails on any absence without a reason.
A hook that calls only kubectl does not need this image. The Kubernetes project publishes registry.k8s.io/kubectl:v1.37.1: kubectl and nothing else, no shell. Use that one. This image is for hooks that run bash -c with jq, yq or envsubst around kubectl.
Before anything is published, each build is compared with the image already published under its tag (scripts/contract-test.sh): every executable on its PATH, its user, HOME, working directory, entrypoint and command, and kubectl on the tag's minor and no older. A removal has to be named in tests/contract-removed.tsv and in the changelog. Each test is shown the breaks it exists for (tests/plants.tsv, run in CI): the image running as root, jq or the procps tools left out, a Bitnami path gone, /.kube not writable, another entrypoint, HOME moved, a yq binary with another checksum, a kubectl that is not the version the image says.
Dockerfile. Neither is installed if it does not match.1.36 and 1.36.6 named on 5 November 2026 from 15:38 to 17:07 UTC (sha256:f6f9dc5ef80f…, no tag names it now), whose signing was skipped when cosign could not be installed. See the CHANGELOG. A tag never names an unsigned image: the build pushes by digest with no tag, the image is signed, then attested, its signature is checked on Docker Hub, and only then do the tags point at it; a run that cannot sign names nothing. Afterwards every tag is read back from Docker Hub, and the run fails if the digest it names has no signature that verifies as this workflow. Before anything is published, a signing job runs the same steps on a local registry with each failure planted (the attestation failing, signing failing or silently skipped, so that no tag is created and latest stays on the earlier signed image, a tag moved to an image this workflow did not sign). BuildKit attaches an SPDX SBOM and SLSA provenance, an SPDX and a CycloneDX SBOM and an OpenVEX document are attached as signed attestations (see below), and build provenance is attested in GitHub Attestations.release-assets.yml calls by tag (@v2.1.0), because it verifies its own reference at run time and refuses a SHA.Everything below runs on a machine that has nothing from this repository. Install cosign, grype and jq. The commands are the ones scripts/verify-release.sh runs, and a test fails if this page and the script disagree. Images published before the release that follows 1.0.5 carry the signature but not the SBOM and VEX attestations; cosign verify-attestation finds nothing on them.
Name the tag, and the three digests it points at:
IMAGE=heyvaldemar/kubectl
TAG=1.37
ISSUER=https://token.actions.githubusercontent.com
ID_REGEXP='^https://github.com/heyvaldemar/kubectl-docker/.github/workflows/publish.yml@refs/(heads/main|tags/v.+)$'
INDEX="$(docker buildx imagetools inspect "$IMAGE:$TAG" --format '{{.Manifest.Digest}}')"
AMD64="$(docker buildx imagetools inspect "$IMAGE:$TAG" --raw | jq -r '.manifests[] | select(.platform.os == "linux" and .platform.architecture == "amd64") | .digest')"
ARM64="$(docker buildx imagetools inspect "$IMAGE:$TAG" --raw | jq -r '.manifests[] | select(.platform.os == "linux" and .platform.architecture == "arm64") | .digest')"
The signature. It must verify as this repository's publish.yml, on main or on a release tag, and nothing else:
cosign verify "$IMAGE:$TAG" --certificate-identity-regexp "$ID_REGEXP" --certificate-oidc-issuer "$ISSUER"
The signature and the attestations on each architecture. Each architecture's image carries its own signature. The SBOMs (spdxjson, cyclonedx) and the VEX (openvex) are attestations signed by the same identity:
for DIGEST in "$AMD64" "$ARM64"; do
cosign verify "$IMAGE@$DIGEST" --certificate-identity-regexp "$ID_REGEXP" --certificate-oidc-issuer "$ISSUER"
for TYPE in spdxjson cyclonedx openvex; do
cosign verify-attestation "$IMAGE@$DIGEST" --type "$TYPE" --certificate-identity-regexp "$ID_REGEXP" --certificate-oidc-issuer "$ISSUER"
done
done
cosign verify-attestation "$IMAGE@$INDEX" --type openvex --certificate-identity-regexp "$ID_REGEXP" --certificate-oidc-issuer "$ISSUER"
The scanner, with and without the VEX. The VEX is a file you can take out of the attestation (the newest, if a re-run attached more than one):
cosign verify-attestation "$IMAGE@$AMD64" --type openvex --certificate-identity-regexp "$ID_REGEXP" --certificate-oidc-issuer "$ISSUER" | jq -rs '.[-1].payload' | base64 -d | jq '.predicate' > vex.openvex.json
grype "$IMAGE@$AMD64"
grype "$IMAGE@$AMD64" --vex vex.openvex.json
The VEX is honest about what has been reviewed: a finding nobody has reviewed is under_investigation, and the VEX never says better (vex/decisions.json holds only what a person decided and why). To read an SBOM, take .predicate out of the spdxjson or cyclonedx attestation the way the VEX is taken out above.
docker build --build-arg KUBE_VERSION=v1.37.1 -t kubectl:local .
./scripts/smoke-test.sh kubectl:local
./tests/drop-in-test.sh kubectl:local
./scripts/contract-test.sh kubectl:local heyvaldemar/kubectl:1.37 1.37
KUBE_VERSION is required; the build refuses to guess.
Report a bug or ask for a change in issues. Pull requests are welcome: every test above runs on them before anything can merge. Report a vulnerability privately, as SECURITY.md describes.
heyvaldemar/aws-kubectl is the same idea with the AWS CLI beside kubectl, for EKS pipelines, and the same weekly lines (kube-1.37).
Maintained by Vladimir Mikhalev · Docker Captain · CNCF Ambassador · IBM Champion · AWS Community Builder
docker pull heyvaldemar/kubectl:latest