Merge pull request #4768 from PatrickLang/windows-build

Clarify how to build using or targetting Windows
This commit is contained in:
Kubernetes Prow Robot 2020-05-12 22:20:27 -07:00 committed by GitHub
commit eb9c87c9ba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 14 additions and 0 deletions

View File

@ -115,6 +115,13 @@ environment. Recent Linux distros should work out-of-the-box.
macOS ships with outdated BSD-based tools. We recommend installing [macOS GNU macOS ships with outdated BSD-based tools. We recommend installing [macOS GNU
tools]. tools].
Developers with Windows machines have two choices available to run the needed tools:
1. If you're using Windows 10 20h1, then you may [install WSL2] and your distro of choice
2. If you're using a previous version of Windows, then set up a Linux VM with at least 8GB of memory and 60GB of disk space.
In either case, the same Linux development tools and Kubernetes source code are needed. Start your WSL2 distro or connect
to your Linux VM and follow the steps below to install the required tools.
### make ### make
Kubernetes local build system requires `make` command to be present in your corresponding development platform. Kubernetes local build system requires `make` command to be present in your corresponding development platform.
@ -229,6 +236,12 @@ To build binaries for all platforms:
make cross make cross
``` ```
To build binaries for a specific platform, add `KUBE_BUILD_PLATFORMS=<os>/<arch>`. For example:
```sh
make cross KUBE_BUILD_PLATFORMS=windows/amd64
```
#### Install etcd #### Install etcd
```sh ```sh
@ -308,3 +321,4 @@ To check out code to work on, please refer to [this guide](/contributors/guide/g
[kubernetes.io]: https://kubernetes.io [kubernetes.io]: https://kubernetes.io
[mercurial]: http://mercurial.selenic.com/wiki/Download [mercurial]: http://mercurial.selenic.com/wiki/Download
[Build with Bazel]: sig-testing/bazel.md [Build with Bazel]: sig-testing/bazel.md
[install WSL2]: https://docs.microsoft.com/en-us/windows/wsl/wsl2-install