From bf2776eb3fb867f0b268c4bd52a3f98bb7eb71d5 Mon Sep 17 00:00:00 2001 From: m1093782566 Date: Sat, 28 Oct 2017 11:33:11 +0800 Subject: [PATCH] update ipvs proxy readme --- pkg/proxy/ipvs/README.md | 30 ++++++++++-------------------- 1 file changed, 10 insertions(+), 20 deletions(-) diff --git a/pkg/proxy/ipvs/README.md b/pkg/proxy/ipvs/README.md index b6f769d25bb..74cbd348e6d 100644 --- a/pkg/proxy/ipvs/README.md +++ b/pkg/proxy/ipvs/README.md @@ -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: