mirror of https://github.com/k3s-io/k3s
update ipvs proxy readme
parent
5ad34ac60a
commit
bf2776eb3f
|
@ -2,7 +2,7 @@
|
|||
|
||||
This document shows how to use kube-proxy ipvs mode.
|
||||
|
||||
### What is IPVS
|
||||
## What is IPVS
|
||||
|
||||
**IPVS (IP Virtual Server)** implements transport-layer load balancing, usually called Layer 4 LAN switching, as part of
|
||||
Linux kernel.
|
||||
|
@ -10,9 +10,9 @@ Linux kernel.
|
|||
IPVS runs on a host and acts as a load balancer in front of a cluster of real servers. IPVS can direct requests for TCP
|
||||
and UDP-based services to the real servers, and make services of real servers appear as irtual services on a single IP address.
|
||||
|
||||
### How to use
|
||||
## How to use
|
||||
|
||||
##### Load IPVS kernel modules
|
||||
#### Load IPVS kernel modules
|
||||
|
||||
Currently the IPVS kernel module can't be loaded automatically, so first we should use the following command to load IPVS kernel
|
||||
modules manually.
|
||||
|
@ -27,27 +27,17 @@ modprobe nf_conntrack_ipv4
|
|||
|
||||
After that, use `lsmod | grep ip_vs` to make sure kernel modules are loaded.
|
||||
|
||||
##### Run kube-proxy in ipvs mode
|
||||
#### Run kube-proxy in ipvs mode
|
||||
|
||||
First, [run cluster locally](https://github.com/kubernetes/community/blob/master/contributors/devel/running-locally.md).
|
||||
#### Local UP Cluster
|
||||
|
||||
By default kube-proxy will run in iptables mode, with configuration file `/tmp/kube-proxy.yaml`. so we need to change the
|
||||
configuration file and restart it. Here is a yaml file for reference.
|
||||
Kube-proxy will run in iptables mode by default in a [local-up cluster](https://github.com/kubernetes/community/blob/master/contributors/devel/running-locally.md).
|
||||
|
||||
```yaml
|
||||
apiVersion: componentconfig/v1alpha1
|
||||
kind: KubeProxyConfiguration
|
||||
clientConnection:
|
||||
kubeconfig: /var/run/kubernetes/kube-proxy.kubeconfig
|
||||
hostnameOverride: 127.0.0.1
|
||||
mode: ipvs
|
||||
featureGates: AllAlpha=true
|
||||
ipvs:
|
||||
minSyncPeriod: 10s
|
||||
syncPeriod: 60s
|
||||
```
|
||||
Users should export the env `KUBEPROXY_MODE=ipvs` to specify the ipvs mode before deploying the cluster if want to run kube-proxy in ipvs mode.
|
||||
|
||||
##### Test
|
||||
// TODO: Kubeadm
|
||||
|
||||
#### Test
|
||||
|
||||
Use `ipvsadm` tool to test whether the kube-proxy start succeed. By default we may get result like:
|
||||
|
||||
|
|
Loading…
Reference in New Issue