diff --git a/instala_kubernetes.sh b/1.instala_kubernetes.sh similarity index 100% rename from instala_kubernetes.sh rename to 1.instala_kubernetes.sh diff --git a/levanta_cluster.sh b/2.levanta_cluster.sh similarity index 51% rename from levanta_cluster.sh rename to 2.levanta_cluster.sh index 678bd80..6f8228a 100755 --- a/levanta_cluster.sh +++ b/2.levanta_cluster.sh @@ -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 diff --git a/3.instala_calico.sh b/3.instala_calico.sh new file mode 100755 index 0000000..166f7e1 --- /dev/null +++ b/3.instala_calico.sh @@ -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 diff --git a/k8s.sh b/k8s.sh index 3c2f2e1..f657574 100755 --- a/k8s.sh +++ b/k8s.sh @@ -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