Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ Kubernetes The Hard Way guides you through bootstrapping a basic Kubernetes clus

Component versions:

* [kubernetes](https://github.com/kubernetes/kubernetes) v1.32.x
* [containerd](https://github.com/containerd/containerd) v2.1.x
* [cni](https://github.com/containernetworking/cni) v1.6.x
* [etcd](https://github.com/etcd-io/etcd) v3.6.x
* [kubernetes](https://github.com/kubernetes/kubernetes) v1.33.x
* [containerd](https://github.com/containerd/containerd) v2.0.x
* [cni](https://github.com/containernetworking/cni) v1.7.x
* [etcd](https://github.com/etcd-io/etcd) v3.5.x

## Labs

Expand Down
51 changes: 37 additions & 14 deletions docs/02-jumpbox.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,20 +52,46 @@ pwd

In this section you will download the binaries for the various Kubernetes components. The binaries will be stored in the `downloads` directory on the `jumpbox`, which will reduce the amount of internet bandwidth required to complete this tutorial as we avoid downloading the binaries multiple times for each machine in our Kubernetes cluster.

The binaries that will be downloaded are listed in either the `downloads-amd64.txt` or `downloads-arm64.txt` file depending on your hardware architecture, which you can review using the `cat` command:
The binaries that will be downloaded are listed in `download-template.txt`, which is a template file that will match your system architecture and the latest software version. You can check it by the following command.

```bash
cat downloads-$(dpkg --print-architecture).txt
cat downloads-template.txt
```

Download the binaries into a directory called `downloads` using the `wget` command:

```bash
wget -q --show-progress \
{
export ARCH=$(dpkg --print-architecture)
echo $ARCH

export K8S_VERSION=$(curl -sSL https://dl.k8s.io/release/stable.txt)
echo "K8S Version: $K8S_VERSION"

export CRI_VERSION=$(wget -qO- https://api.github.com/repos/kubernetes-sigs/cri-tools/releases/latest | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/')
echo "CRI Version: $CRI_VERSION"


export RUNC_VERSION=$(wget -qO- https://api.github.com/repos/opencontainers/runc/releases/latest | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/')
echo "runc Version: $RUNC_VERSION"

export CNI_VERSION=$(wget -qO- https://api.github.com/repos/containernetworking/plugins/releases/latest | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/')
echo "cni Version: $CNI_VERSION"

export CONTAINERD_VERSION=$(wget -qO- https://api.github.com/repos/containerd/containerd/releases/latest | grep '"tag_name":' | sed -E 's/.*"v?([^"]+)".*/\1/')
echo "containerd Version: v$CONTAINERD_VERSION"

export ETCD_VERSION=$(wget -qO- https://api.github.com/repos/etcd-io/etcd/releases/latest | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/')
echo "etcd Version: $ETCD_VERSION"

envsubst < download-template.txt > download.txt

wget -q --show-progress \
--https-only \
--timestamping \
-P downloads \
-i downloads-$(dpkg --print-architecture).txt
-i download.txt
}
```

Depending on your internet connection speed it may take a while to download over `500` megabytes of binaries, and once the download is complete, you can list them using the `ls` command:
Expand All @@ -78,20 +104,19 @@ Extract the component binaries from the release archives and organize them under

```bash
{
ARCH=$(dpkg --print-architecture)
mkdir -p downloads/{client,cni-plugins,controller,worker}
tar -xvf downloads/crictl-v1.32.0-linux-${ARCH}.tar.gz \
tar -xvf downloads/crictl-${CRI_VERSION}-linux-${ARCH}.tar.gz \
-C downloads/worker/
tar -xvf downloads/containerd-2.1.0-beta.0-linux-${ARCH}.tar.gz \
tar -xvf downloads/containerd-${CONTAINERD_VERSION}-linux-${ARCH}.tar.gz \
--strip-components 1 \
-C downloads/worker/
tar -xvf downloads/cni-plugins-linux-${ARCH}-v1.6.2.tgz \
tar -xvf downloads/cni-plugins-linux-${ARCH}-${CNI_VERSION}.tgz \
-C downloads/cni-plugins/
tar -xvf downloads/etcd-v3.6.0-rc.3-linux-${ARCH}.tar.gz \
tar -xvf downloads/etcd-${ETCD_VERSION}-linux-${ARCH}.tar.gz \
-C downloads/ \
--strip-components 1 \
etcd-v3.6.0-rc.3-linux-${ARCH}/etcdctl \
etcd-v3.6.0-rc.3-linux-${ARCH}/etcd
etcd-${ETCD_VERSION}-linux-${ARCH}/etcdctl \
etcd-${ETCD_VERSION}-linux-${ARCH}/etcd
mv downloads/{etcdctl,kubectl} downloads/client/
mv downloads/{etcd,kube-apiserver,kube-controller-manager,kube-scheduler} \
downloads/controller/
Expand All @@ -107,9 +132,7 @@ rm -rf downloads/*gz
Make the binaries executable.

```bash
{
chmod +x downloads/{client,cni-plugins,controller,worker}/*
}
chmod +x downloads/{client,cni-plugins,controller,worker}/*
```

### Install kubectl
Expand Down
11 changes: 11 additions & 0 deletions download-template.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
https://dl.k8s.io/${K8S_VERSION}/bin/linux/${ARCH}/kubectl
https://dl.k8s.io/${K8S_VERSION}/bin/linux/${ARCH}/kube-apiserver
https://dl.k8s.io/${K8S_VERSION}/bin/linux/${ARCH}/kube-controller-manager
https://dl.k8s.io/${K8S_VERSION}/bin/linux/${ARCH}/kube-scheduler
https://dl.k8s.io/${K8S_VERSION}/bin/linux/${ARCH}/kube-proxy
https://dl.k8s.io/${K8S_VERSION}/bin/linux/${ARCH}/kubelet
https://github.com/kubernetes-sigs/cri-tools/releases/download/${CRI_VERSION}/crictl-${CRI_VERSION}-linux-${ARCH}.tar.gz
https://github.com/opencontainers/runc/releases/download/${RUNC_VERSION}/runc.${ARCH}
https://github.com/containernetworking/plugins/releases/download/${CNI_VERSION}/cni-plugins-linux-${ARCH}-${CNI_VERSION}.tgz
https://github.com/containerd/containerd/releases/download/v${CONTAINERD_VERSION}/containerd-${CONTAINERD_VERSION}-linux-${ARCH}.tar.gz
https://github.com/etcd-io/etcd/releases/download/${ETCD_VERSION}/etcd-${ETCD_VERSION}-linux-${ARCH}.tar.gz
11 changes: 0 additions & 11 deletions downloads-amd64.txt

This file was deleted.

11 changes: 0 additions & 11 deletions downloads-arm64.txt

This file was deleted.