renombrados

This commit is contained in:
trigkeyb
2025-01-09 21:46:02 +01:00
parent 1f349aeeeb
commit 1aa42a5e95
4 changed files with 20 additions and 22 deletions

View File

@@ -15,22 +15,6 @@ if [ "$INIT_MASTER" == "y" ]; then
sudo cp -i /etc/kubernetes/admin.conf /home/$USER/.kube/config
sudo chown $(id -u $USER):$(id -g $USER) /home/$USER/.kube/config
# Instalar red de pods (Calico)
echo "Instalando la red de pods (Calico)..."
kubectl create -f https://raw.githubusercontent.com/projectcalico/calico/v3.29.1/manifests/tigera-operator.yaml
curl -O https://raw.githubusercontent.com/projectcalico/calico/v3.29.1/manifests/custom-resources.yaml
sed -ie 's/192.168.0.0/172.24.0.0/g' custom-resources.yaml
kubectl create -f custom-resources.yaml
# curl -O https://raw.githubusercontent.com/projectcalico/calico/v3.26.1/manifests/tigera-operator.yaml
# curl -O https://raw.githubusercontent.com/projectcalico/calico/v3.26.1/manifests/custom-resources.yaml
# kubectl create -f tigera-operator.yaml
# kubectl apply -f https://docs.projectcalico.org/v3.25/manifests/calico.yaml
## kubectl get pods --all-namespaces -w
else
echo "Nodo maestro no inicializado. Ejecuta 'kubeadm init' manualmente si deseas configurarlo más tarde."
fi

20
3.instala_calico.sh Executable file
View File

@@ -0,0 +1,20 @@
#!/bin/bash
# Variables
# Instalar red de pods (Calico)
echo "Instalando la red de pods (Calico)..."
kubectl create -f https://raw.githubusercontent.com/projectcalico/calico/v3.29.1/manifests/tigera-operator.yaml
curl -O https://raw.githubusercontent.com/projectcalico/calico/v3.29.1/manifests/custom-resources.yaml
sed -ie 's/192.168.0.0/172.24.0.0/g' custom-resources.yaml
kubectl create -f custom-resources.yaml
# curl -O https://raw.githubusercontent.com/projectcalico/calico/v3.26.1/manifests/tigera-operator.yaml
# curl -O https://raw.githubusercontent.com/projectcalico/calico/v3.26.1/manifests/custom-resources.yaml
# kubectl create -f tigera-operator.yaml
# kubectl apply -f https://docs.projectcalico.org/v3.25/manifests/calico.yaml
## kubectl get pods --all-namespaces -w

6
k8s.sh
View File

@@ -7,9 +7,3 @@ apt update && apt upgrade -y
# Instalación de dependencias necesarias
apt install qemu-guest-agent -y
systemctl enable --now qemu-guest-agent
apt -y install containerd
mkdir /etc/containerd
containerd config default | tee /etc/containerd/config.toml