Edit This Page

Node Conformance Test

Node conformance test is a test framework validating whether a node meets the minimum requirement of Kubernetes with a set of system verification and functionality test. A node which passes the tests is qualified to join a Kubernetes cluster.

Limitations

There are following limitations in the current implementation of node conformance test. They’ll be improved in future version.

Prerequisite

Node conformance test is used to test whether a node is ready to join a Kubernetes cluster, so the prerequisite is the same with a standard Kubernetes node. At least, the node should have properly installed:

Node conformance test validates kernel configurations. If the kenrel module configs is built as module in your environment, it must be loaded before the test. (See Caveats #3 for more information)

Usage

Run Node Conformance Test

# $CONFIG_DIR is the pod manifest path of your kubelet.
# $LOG_DIR is the test output path.
sudo docker run -it --rm --privileged --net=host \
  -v /:/rootfs:ro -v /var/run:/var/run \
  -v $CONFIG_DIR:/etc/manifest -v $LOG_DIR:/var/result \
  gcr.io/google_containers/node-test-amd64:v0.1

Run Node Conformance Test for Other Architectures

We also build node conformance test docker images for other architectures:

Arch Image
amd64 node-test-amd64
arm node-test-arm
arm64 node-test-arm64

Run Selected Test

In fact, Node conformance test is a containerized version of node e2e test. By default, it runs all conformance test.

Theoretically, you can run any node e2e test if you configure the container and mount required volumes properly. But it is strongly recommended to only run conformance test, because the non-conformance test needs much more complex framework configuration.

To run specific tests, overwrite the environment variable FOCUS with the regular expression of tests you want to run.

sudo docker run -it --rm --privileged --net=host \
  -v /:/rootfs:ro -v /var/run:/var/run \
  -v $CONFIG_DIR:/etc/manifest -v $LOG_DIR:/var/result \
  -e FOCUS=MirrorPod \ # Only run MirrorPod test
  gcr.io/google_containers/node-test-amd64:v0.1

To skip specific tests, overwrite the environment variable SKIP with the regular expression of tests you want to skip.

sudo docker run -it --rm --privileged --net=host \
  -v /:/rootfs:ro -v /var/run:/var/run \
  -v $CONFIG_DIR:/etc/manifest -v $LOG_DIR:/var/result \
  -e SKIP=MirrorPod \ # Run all conformance test and skip MirrorPod test
  gcr.io/google_containers/node-test-amd64:v0.1

Caveats

Analytics Create an Issue Edit this Page