KuberVersione2: differenze tra le versioni
		
		
		
		Vai alla navigazione
		Vai alla ricerca
		
|  (Creata pagina con "# Aggiorna i pacchetti sudo dnf update -y  # Disabilita SELinux (opzionale, ma consigliato per semplicità) sudo setenforce 0 sudo sed -i 's/^SELINUX=enforcing/SELINUX=permissive/' /etc/selinux/config  # Disabilita lo swap sudo swapoff -a sudo sed -i '/swap/d' /etc/fstab  # Attiva il modulo kernel per il networking cat <<EOF | sudo tee /etc/modules-load.d/k8s.conf br_netfilter EOF  sudo modprobe br_netfilter sudo sysctl --system  # Configura le impostazioni di rete richi...") | Nessun oggetto della modifica | ||
| (Una versione intermedia di uno stesso utente non è mostrata) | |||
| Riga 1: | Riga 1: | ||
| # Aggiorna i pacchetti |  # Aggiorna i pacchetti | ||
| sudo dnf update -y |  sudo dnf update -y | ||
|  # | |||
| # Disabilita SELinux (opzionale, ma consigliato per semplicità) |  # Disabilita SELinux (opzionale, ma consigliato per semplicità) | ||
| sudo setenforce 0 |  sudo setenforce 0 | ||
| sudo sed -i 's/^SELINUX=enforcing/SELINUX=permissive/' /etc/selinux/config |  sudo sed -i 's/^SELINUX=enforcing/SELINUX=permissive/' /etc/selinux/config | ||
|  # | |||
| # Disabilita lo swap |  # Disabilita lo swap | ||
| sudo swapoff -a |  sudo swapoff -a | ||
| sudo sed -i '/swap/d' /etc/fstab |  sudo sed -i '/swap/d' /etc/fstab | ||
|  # | |||
| # Attiva il modulo kernel per il networking |  # Attiva il modulo kernel per il networking | ||
| cat <<EOF | sudo tee /etc/modules-load.d/k8s.conf |  cat <<EOF | sudo tee /etc/modules-load.d/k8s.conf | ||
| br_netfilter |  br_netfilter | ||
| EOF |  EOF | ||
|  #  | |||
| sudo modprobe br_netfilter |  sudo modprobe br_netfilter | ||
| sudo sysctl --system |  sudo sysctl --system | ||
|  # | |||
| # Configura le impostazioni di rete richieste da Kubernetes |  # Configura le impostazioni di rete richieste da Kubernetes | ||
| cat <<EOF | sudo tee /etc/sysctl.d/k8s.conf |  cat <<EOF | sudo tee /etc/sysctl.d/k8s.conf | ||
| net.bridge.bridge-nf-call-ip6tables = 1 |  net.bridge.bridge-nf-call-ip6tables = 1 | ||
| net.bridge.bridge-nf-call-iptables = 1 |  net.bridge.bridge-nf-call-iptables = 1 | ||
| EOF |  EOF | ||
| sudo sysctl --system |  sudo sysctl --system | ||
|  # | |||
| # Installa i prerequisiti |  # Installa i prerequisiti | ||
| sudo dnf install -y yum-utils |  sudo dnf install -y yum-utils | ||
|  # | |||
| # Aggiungi il repository di Docker |  # Aggiungi il repository di Docker | ||
| sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo |  sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo | ||
|  # | |||
| # Installa Docker |  # Installa Docker | ||
| sudo dnf install -y docker-ce docker-ce-cli containerd.io |  sudo dnf install -y docker-ce docker-ce-cli containerd.io | ||
|  # | |||
| # Avvia e abilita Docker |  # Avvia e abilita Docker | ||
| sudo systemctl enable --now docker |  sudo systemctl enable --now docker | ||
Versione attuale delle 20:56, 24 dic 2024
# Aggiorna i pacchetti sudo dnf update -y # # Disabilita SELinux (opzionale, ma consigliato per semplicità) sudo setenforce 0 sudo sed -i 's/^SELINUX=enforcing/SELINUX=permissive/' /etc/selinux/config # # Disabilita lo swap sudo swapoff -a sudo sed -i '/swap/d' /etc/fstab # # Attiva il modulo kernel per il networking cat <<EOF | sudo tee /etc/modules-load.d/k8s.conf br_netfilter EOF # sudo modprobe br_netfilter sudo sysctl --system # # Configura le impostazioni di rete richieste da Kubernetes cat <<EOF | sudo tee /etc/sysctl.d/k8s.conf net.bridge.bridge-nf-call-ip6tables = 1 net.bridge.bridge-nf-call-iptables = 1 EOF sudo sysctl --system # # Installa i prerequisiti sudo dnf install -y yum-utils # # Aggiungi il repository di Docker sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo # # Installa Docker sudo dnf install -y docker-ce docker-ce-cli containerd.io # # Avvia e abilita Docker sudo systemctl enable --now docker