Last active
March 29, 2026 15:17
-
-
Save dims/29b734404b94715373759f25c18e555e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Create a fresh Ubuntu VM and run the commands below. | |
| # Tested on a Brev CPU node (Ubuntu 22.04.5). | |
| # | |
| # Important: do not rely on the image-packaged containerd unless you have | |
| # already verified that CRI is enabled and that CNI is installed/configured. | |
| # Some cloud images ship containerd with CRI disabled and no /etc/cni/net.d | |
| # config, which leaves kubelet NotReady during node e2e setup. | |
| set -euxo pipefail | |
| # Install a bunch of stuff we need. | |
| sudo apt update | |
| sudo apt -y install curl gperf sudo htop psutils build-essential pkg-config git wget unzip | |
| # Go workspace. | |
| export GOPATH=${GOPATH:-$HOME/go} | |
| mkdir -p "$GOPATH/src/k8s.io" "$GOPATH/src/github.com/containerd" | |
| # Clone what we need. | |
| git clone https://github.com/kubernetes/kubernetes "$GOPATH/src/k8s.io/kubernetes" | |
| git clone https://github.com/containerd/containerd "$GOPATH/src/github.com/containerd/containerd" | |
| # Latest Go that matches current k/k. | |
| sudo rm -rf /usr/local/go | |
| curl -sSL https://go.dev/dl/go1.26.1.linux-amd64.tar.gz | sudo tar -C /usr/local -xzf - | |
| export PATH=/usr/local/go/bin:$GOPATH/bin:$PATH | |
| go version | |
| # Build / install and start containerd. | |
| cd "$GOPATH/src/github.com/containerd/containerd" | |
| script/setup/install-seccomp | |
| script/setup/install-runc | |
| script/setup/install-cni | |
| script/setup/install-protobuf | |
| make binaries GO_BUILD_FLAGS="-mod=vendor" | |
| sudo make install | |
| # Create and start the containerd service from the freshly built tree. | |
| sudo systemctl stop containerd || true | |
| sudo cp "$GOPATH/src/github.com/containerd/containerd/containerd.service" /etc/systemd/system/containerd.service | |
| sudo systemctl daemon-reload | |
| sudo systemctl enable containerd.service | |
| sudo systemctl restart containerd.service | |
| # Sanity checks. | |
| ctr version | |
| sudo crictl info | jq '.status.conditions' | |
| sudo ls /etc/cni/net.d /opt/cni/bin | |
| # Build k8s and run node e2e tests. | |
| cd "$GOPATH/src/k8s.io/kubernetes" | |
| USER=root make test-e2e-node |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
4 failures with this script as of now.