Welcome to the Linux Foundation Forum!

Installing Kubeadm, Kubectl, Kubelet

Options
tstaffordsmith
tstaffordsmith Posts: 31
edited November 2022 in LFD259 Class Forum

Not sure about anyone else, but I'm unable to install Kubernetes software on my Ubuntu instances (both control plane and worker nodes) via ssh with the following commands provided in the 'Labs' pdf–

[[ COPYRIGHTED CONTENT REMOVED ]]

But! But. After some (a few hours, actually lol) research, the following worked for me (just copy/paste the whole thing at once)–

sudo apt-get update && sudo apt-get install -y apt-transport-https curl
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -
cat <<EOF | sudo tee /etc/apt/sources.list.d/kubernetes.list
deb https://apt.kubernetes.io/ kubernetes-xenial main
EOF
sudo apt-get update
sudo apt-get install -y kubelet kubeadm kubectl
sudo apt-mark hold kubelet kubeadm kubectl

Btw, I found this on IBM. Site here–
https://www.ibm.com/docs/en/control-desk/7.6.1.x?topic=kubernetes-installing-kubeadm-kubelet-kubectl

Is it just me, or has anyone else encountered this issue?

Answers

  • chrispokorni
    Options

    Hi @tstaffordsmith,

    The instructions to install the Kubernetes components for both nodes are scripted to ease the entire installation process. Therefore, the k8scp.sh and k8sWorker.sh script files have been created to be run with bash, as presented in steps 5 and 7 of Lab 2.2.

    The commands provided by you above are installing the latest Kubernetes components, something we do not encourage. The lab guide calls for a specific Kubernetes version release.

    In addition, I strongly encourage you to familiarize yourself with security best practices for sharing sensitive information, such as user ID and password, in plain text in a public forum.

    Regards,
    -Chris

Categories

Upcoming Training