Skip to content

Instantly share code, notes, and snippets.

@dims
Last active March 29, 2026 15:17
Show Gist options
  • Select an option

  • Save dims/29b734404b94715373759f25c18e555e to your computer and use it in GitHub Desktop.

Select an option

Save dims/29b734404b94715373759f25c18e555e to your computer and use it in GitHub Desktop.
# 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
@dims

dims commented Apr 28, 2025

Copy link
Copy Markdown
Author

4 failures with this script as of now.

Summarizing 4 Failures:
  [FAIL] [sig-node] Summary API [NodeConformance] when querying /stats/summary [It] should report resource usage through the stats api [sig-node, NodeConformance]
  k8s.io/kubernetes/test/e2e_node/summary_test.go:363
  [FAIL] [sig-node] ImageCredentialProvider [Feature:KubeletCredentialProviders] [It] should be able to create pod with image credentials fetched from external credential provider  [sig-node, Feature:KubeletCredentialProviders]
  k8s.io/kubernetes/test/e2e/common/node/image_credential_provider.go:87
  [FAIL] [sig-node] Kubelet PodOverhead handling [LinuxOnly] PodOverhead cgroup accounting On running pod with PodOverhead defined [It] Pod cgroup should be sum of overhead and resource limits [sig-node]
  k8s.io/kubernetes/test/e2e_node/runtimeclass_test.go:121
  [FAIL] [sig-node] User Namespaces for Pod Security Standards [LinuxOnly] with UserNamespacesSupport and UserNamespacesPodSecurityStandards enabled [It] should allow pod [Feature:UserNamespacesPodSecurityStandards] [sig-node, Feature:UserNamespacesPodSecurityStandards]
  k8s.io/kubernetes/test/e2e/framework/pod/output/output.go:176

Ran 502 of 761 Specs in 1767.655 seconds
FAIL! -- 498 Passed | 4 Failed | 0 Pending | 259 Skipped

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment