ampliando comandos
This commit is contained in:
49
k8s.sh
49
k8s.sh
@@ -1 +1,48 @@
|
|||||||
ls -lah
|
# Enable kernel modules
|
||||||
|
sudo modprobe overlay
|
||||||
|
sudo modprobe br_netfilter
|
||||||
|
|
||||||
|
# Add some settings to sysctl
|
||||||
|
sudo tee /etc/sysctl.d/kubernetes.conf<<EOF
|
||||||
|
net.bridge.bridge-nf-call-ip6tables = 1
|
||||||
|
net.bridge.bridge-nf-call-iptables = 1
|
||||||
|
net.ipv4.ip_forward = 1
|
||||||
|
EOF
|
||||||
|
|
||||||
|
# Reload sysctl
|
||||||
|
sudo sysctl --system
|
||||||
|
|
||||||
|
# Configure persistent loading of modules
|
||||||
|
sudo tee /etc/modules-load.d/containerd.conf <<EOF
|
||||||
|
overlay
|
||||||
|
br_netfilter
|
||||||
|
EOF
|
||||||
|
|
||||||
|
|
||||||
|
# Configure persistent loading of modules
|
||||||
|
sudo tee /etc/modules-load.d/containerd.conf <<EOF
|
||||||
|
overlay
|
||||||
|
br_netfilter
|
||||||
|
EOF
|
||||||
|
|
||||||
|
|
||||||
|
# Install required packages
|
||||||
|
sudo apt install -y curl gnupg2 software-properties-common apt-transport-https ca-certificates
|
||||||
|
|
||||||
|
# Add Docker repo
|
||||||
|
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/docker-archive-keyring.gpg
|
||||||
|
|
||||||
|
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
|
||||||
|
|
||||||
|
# Install containerd
|
||||||
|
sudo apt update
|
||||||
|
sudo apt install -y containerd.io
|
||||||
|
|
||||||
|
# Configure containerd and start service
|
||||||
|
sudo mkdir -p /etc/containerd
|
||||||
|
sudo containerd config default|sudo tee /etc/containerd/config.toml
|
||||||
|
|
||||||
|
# restart containerd
|
||||||
|
sudo systemctl restart containerd
|
||||||
|
sudo systemctl enable containerd
|
||||||
|
systemctl status containerd
|
||||||
Reference in New Issue
Block a user