Merge pull request #68075 from riverzhang/fix-ipvs-readme

Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions here: https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md.

Fix how to use ipvs mode by kubeadm

**What this PR does / why we need it**:
how to use ipvs mode by kubeadm
**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes #

**Special notes for your reviewer**:

**Release note**:

```release-note

```
This commit is contained in:
Kubernetes Submit Queue 2018-08-31 14:16:16 -07:00 committed by GitHub
commit ef741c3038
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -334,19 +334,19 @@ export KUBE_PROXY_MODE=ipvs
### Cluster Created by Kubeadm ### Cluster Created by Kubeadm
Kube-proxy will run in iptables mode by default in a cluster deployed by [kubeadm](https://kubernetes.io/docs/setup/independent/create-cluster-kubeadm/). If you are using kubeadm with a [configuration file](https://kubernetes.io/docs/reference/setup-tools/kubeadm/kubeadm-init/#config-file), you have to add `mode: ipvs` and also add `SupportIPVSProxyMode: true` below the `kubeProxy` field as part of the kubeadm configuration.
If you are using kubeadm with a [configuration file](https://kubernetes.io/docs/reference/setup-tools/kubeadm/kubeadm-init/#config-file), you can specify the ipvs mode adding `SupportIPVSProxyMode: true` below the `kubeProxy` field.
```json ```json
kind: MasterConfiguration
apiVersion: kubeadm.k8s.io/v1alpha1
... ...
kubeProxy: kubeProxy:
config: config:
featureGates:
SupportIPVSProxyMode: true
mode: ipvs mode: ipvs
... ...
``` ```
Note that in Kubernetes 1.11 and later, `SupportIPVSProxyMode` is set to `true` by default.
before running before running
`kube init --config <path_to_configuration_file>` `kube init --config <path_to_configuration_file>`