Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
a6af8278
Commit
a6af8278
authored
Oct 20, 2017
by
Lion-Wei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
local up cluster in ipvs mode by add env 'KUBEPROXY_MODE=ipvs'
parent
70960a5e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
0 deletions
+16
-0
local-up-cluster.sh
hack/local-up-cluster.sh
+16
-0
No files found.
hack/local-up-cluster.sh
View file @
a6af8278
...
...
@@ -57,6 +57,7 @@ EVICTION_PRESSURE_TRANSITION_PERIOD=${EVICTION_PRESSURE_TRANSITION_PERIOD:-"1m"}
# and we don't know the IP of the DNS pod to pass in as --cluster-dns.
# To set this up by hand, set this flag and change DNS_SERVER_IP.
# Note also that you need API_HOST (defined above) for correct DNS.
KUBEPROXY_MODE
=
${
KUBEPROXY_MODE
:-
""
}
ENABLE_CLUSTER_DNS
=
${
KUBE_ENABLE_CLUSTER_DNS
:-
true
}
DNS_SERVER_IP
=
${
KUBE_DNS_SERVER_IP
:-
10
.0.0.10
}
DNS_DOMAIN
=
${
KUBE_DNS_NAME
:-
"cluster.local"
}
...
...
@@ -114,6 +115,11 @@ if [ "${CLOUD_PROVIDER}" == "openstack" ]; then
fi
fi
#set feature gates if using ipvs mode
if
[
"
${
KUBEPROXY_MODE
}
"
==
"ipvs"
]
;
then
FEATURE_GATES
=
"
$FEATURE_GATES
,SupportIPVSProxyMode=true"
fi
# warn if users are running with swap allowed
if
[
"
${
FAIL_SWAP_ON
}
"
==
"false"
]
;
then
echo
"WARNING : The kubelet is configured to not fail if swap is enabled; production deployments should disable swap."
...
...
@@ -738,6 +744,16 @@ clientConnection:
hostnameOverride:
${
HOSTNAME_OVERRIDE
}
featureGates:
${
FEATURE_GATES
}
EOF
if
[
"
${
KUBEPROXY_MODE
}
"
==
"ipvs"
]
;
then
cat
<<
EOF
>> /tmp/kube-proxy.yaml
mode: ipvs
EOF
sudo
modprobe ip_vs
sudo
modprobe ip_vs_rr
sudo
modprobe ip_vs_wrr
sudo
modprobe ip_vs_sh
sudo
modprobe nf_conntrack_ipv4
fi
sudo
"
${
GO_OUT
}
/hyperkube"
proxy
\
--config
=
/tmp/kube-proxy.yaml
\
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment