Development Guide
Setting Up The Development Environment
Here's an example of how you'd configure a Kubernetes development environment on Ubuntu:
Open another terminal, configure kubectl and you're all set:
Unit Tests
Unit testing is an indispensable aspect of Kubernetes development. Code modifications generally come with corresponding unit tests update or addition. These tests can be run directly on different systems, such as OSX, Linux, etc.
For instance, after modifying the pkg/kubelet/kuberuntime
code,
End-To-End (e2e) Tests
End-to-end (e2e) tests require the launch of a Kubernetes cluster and can only be run on a Linux system.
Here's an example of how to launch the tests locally:
Note: Each PR in Kubernetes automatically triggers a series of e2e tests.
Node e2e Tests
Node e2e tests involve starting the Kubelet and can currently only be run on Linux systems.
Note: Each PR in Kubernetes automatically triggers node e2e tests.
Useful git Commands
Many times, PRs need to be fetched locally for testing. To pull PR #365, for instance, you'd use
You can also configure .git/config
to fetch all PRs using git fetch
(be warned, however, that Kubernetes has a large PR count, thus this process may take a while):
Additional Resources
Compile a release version:
make quick-release
Robot commands: command list and usage documentation.
Kubernetes TestGrid, showing all test history
Kuberentes Submit Queue Status, showing the status of all Pull Requests as well as the merge queue
Node Performance Dashboard, showing performance testing results for the Node group
Kubernetes Performance Dashboard, displaying Density and Load test reports
Kubernetes PR Dashboard, listing critical Pull Requests (requires Github login)
Jenkins Logs and Prow Status, comprising Jenkins test logs for all Pull Requests
最后更新于