e2e-node テストの実行
$ KUBE_ROOT=$(pwd) make test-e2e-node TEST_ARGS='--kubelet-flags="--fail-swap-on=false"' FOCUS=Kubelet SKIP=container

以下で Kubernetes のソースコードの root dir を探している。が、ローカルがこうなっていることは多くないので、KUBE_ROOT で指定するようにすると動いた。

func RootDir() (string, error) {
	// Get the directory of the current executable
	_, testExec, _, _ := runtime.Caller(0)
	path := filepath.Dir(testExec)

	// Look for the kubernetes source root directory
	if strings.Contains(path, "k8s.io/kubernetes") {
		splitPath := strings.Split(path, "k8s.io/kubernetes")
		return splitPath[0], nil
	}

	return "", errors.New("could not find kubernetes source root directory")
}

そもそもの動かし方のメインドキュメントはここ。 CNI のインストールと設定は以下のようにしました。

CNI のインストール
$ CNI_VERSION=v1.5.1
$ wget https://github.com/containernetworking/plugins/releases/download/${CNI_VERSION}/cni-plugins-linux-amd64-${CNI_VERSION}.tgz
$ sudo tar -xvf cni-plugins-linux-amd64-${CNI_VERSION}.tgz -C /opt/cni/bin/

ログは /tmp/_artifacts/$(date)/ にいろいろ入っている。例えば tail -f /tmp/_artifacts/240921T205914/kubelet.log