Kubernetes has a versioning system x.y.z where the z can change without breaking anything (fairly typical). It would be nice if the x.y part would be put in a subslot for the packages below such that the specific subslot can be installed and upgraded within the subslot until a user is ready to upgrade their cluster. sys-cluster/kubeadm sys-cluster/kube-apiserver sys-cluster/kube-controller-manager sys-cluster/kubectl sys-cluster/kubelet sys-cluster/kube-proxy sys-cluster/kube-scheduler
I believe you will have to use /etc/portage/package.mask to keep the versions of kubernetes you do not want from being installed, regardless of whether I use subslots. I haven't done a lot with slots or subslots, so I'm a bit at a loss for how subslots would help in this case.
If it had subslots then I would install the subslot instead. I.e. emerge -av sys-cluster/kubelet:1.20 instead of emerge -av sys-cluster/kubelet Having looked at an example on my machine I think it's SLOTS that I'm thinking of, not SUBSLOTS. From dev-ruby/sass it looks like SLOT="$(ver_cut 1-2)" could be used to do this.
subslots do allow for: emerge cat/pkg:0/subslot But the difference is that this won't get recorded in world file, or not normally anyway (unless you edit yourself). Firefox does something similar for ESR branch, e.g. 0/esr78 Is this what you still want? But simply masking versions you don't want may work better. real SLOTs are intended for something entirely different and I don't think it can be used here
Full slots are used to allow multiple versions of a package to be installed, so they don't fit what you are wanting to do I don't think, but you can use /etc/portage/package.mask to mask versions of k8s you don't want installed. Let me know if that works for you.