diff --git a/demo/lib/distro.bash b/demo/lib/distro.bash index 9fc3d35f9..bea3b227e 100644 --- a/demo/lib/distro.bash +++ b/demo/lib/distro.bash @@ -459,19 +459,21 @@ fedora-install-containerd-post() { } fedora-install-k8s() { + _k8s=$k8s + if [[ -z "$_k8s" ]] || [[ "$_k8s" == "latest" ]]; then + vm-command "curl -s https://api.github.com/repos/kubernetes/kubernetes/releases/latest | grep tag_name | sed -e 's/.*v\([0-9]\+\.[0-9]\+\).*/\1/g'" + _k8s=$COMMAND_OUTPUT + fi + local repo="/etc/yum.repos.d/kubernetes.repo" - local base="https://packages.cloud.google.com/yum/repos/kubernetes-el7-\$basearch" - local yumkey="https://packages.cloud.google.com/yum/doc/yum-key.gpg" - local rpmkey="https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg" cat <