A simple way to invoke the correct kubectl version on a Rancher managed cluster using kuberlr.
Images found at:
- https://hub.docker.com/r/rancher/kuberlr-kubectl
- https://github.com/rancher/kuberlr-kubectl/pkgs/container/kuberlr-kubectl
This repo produces a Rancher specific version of the flavio/kuberlr
image.
- This container is analogous to the current
rancher/kubectl
container, but based on kuberlr - Unlike
rancher/kubectl
, this image targets specific Rancher minor release branches. - Each release pre-bundles all necessary kubectl versions supported by the Rancher version the release supports.
Branch | Release Tag | Rancher Tag (Branch) |
---|---|---|
main (release/v3) | head (v3.Y.Z) | 2.10.Z (main) |
release/v2 | v2.Y.Z | 2.9.Z (release/v2.9) |
release/v1 | v1.Y.Z | 2.8.Z (release/v2.8) |
- Each minor Rancher release will get a
rancher/kuberlr-kubectl
branch:- Each branch will get an image tag major to match it.
- This gives us full "Y" and "Z" control on versioning the component to target Rancher minors.
- E.x. Rancher 2.8.x releases will get varying versions of 1.Y.Z
See the dedicated Migration's Doc for specific details on migrating charts.
The base flavio/kuberlr
image comes from the upstream repo and is essentially universally compatible like kuberlr
.
However, for it to work it relies on an internet connection to fetch kubectl binaries on the fly.
In contrast, our rancher/kuberlr-kubectl
bundles the necessary kubectl
binaries into each image.
In this way the image is ready to work on any supported k8s versions for that Rancher release in an air-gap out the box.
Given that k8s provides a slight version drift, as the Rancher minor lifecycle progresses we reduce inclusion of older kubectl
versions.
gantt
title `rancher/rancher` and `rancher/kuberlr-kubectl`
todayMarker off
dateFormat X
axisFormat 1.%S
tickInterval 1second
section Rancher
2.8.X :25,28
2.9.X :27,30
section kuberlr-kubectl image
1.Y.Z (for Rancher 2.8) :25,28
2.Y.Z (for Rancher 2.9) :27,30
section Kubectl Drift
1.25 :24,26
1.26 :25,27
1.27 :26,28
1.28 :27,29
1.29 :28,30
1.30 :29,31
Note: Over-time, as new
kuberlr
binaries are released we can still bump the Y or Z of eachrancher/kuberlr-kubectl
release to update all supported Rancher releases.