mirror of
https://github.com/kelseyhightower/kubernetes-the-hard-way.git
synced 2025-12-17 02:08:58 +03:00
Update to latest version (#325)
* Build now functional * Use ssh option to reduce questions * Use IPVS * Further e2e observations * Tidy up * RAM and CPU adjustments
This commit is contained in:
@@ -1,19 +1,27 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Sets up the kernel with the requirements for running Kubernetes
|
||||
# Requires a reboot, which is carried out by the vagrant provisioner.
|
||||
set -ex
|
||||
|
||||
# Disable cgroups v2 (kernel command line parameter)
|
||||
sed -i 's/GRUB_CMDLINE_LINUX_DEFAULT="/GRUB_CMDLINE_LINUX_DEFAULT="systemd.unified_cgroup_hierarchy=0 ipv6.disable=1 /' /etc/default/grub
|
||||
update-grub
|
||||
set -e
|
||||
|
||||
# Add br_netfilter kernel module
|
||||
echo "br_netfilter" >> /etc/modules
|
||||
cat <<EOF >> /etc/modules
|
||||
ip_vs
|
||||
ip_vs_rr
|
||||
ip_vs_wrr
|
||||
ip_vs_sh
|
||||
br_netfilter
|
||||
nf_conntrack
|
||||
EOF
|
||||
systemctl restart systemd-modules-load.service
|
||||
|
||||
# Set network tunables
|
||||
cat <<EOF >> /etc/sysctl.d/10-kubernetes.conf
|
||||
net.ipv6.conf.all.disable_ipv6 = 1
|
||||
net.ipv6.conf.default.disable_ipv6 = 1
|
||||
net.ipv6.conf.lo.disable_ipv6 = 1
|
||||
net.bridge.bridge-nf-call-iptables=1
|
||||
net.ipv4.ip_forward=1
|
||||
EOF
|
||||
|
||||
sysctl --system
|
||||
|
||||
|
||||
Reference in New Issue
Block a user