calico con operator tigera
This commit is contained in:
@@ -54,6 +54,7 @@ sudo apt install containerd.io -y
|
||||
# sudo mkdir -p /etc/containerd
|
||||
sudo containerd config default|sudo tee /etc/containerd/config.toml >/dev/null 2>&1
|
||||
sudo sed -i 's/SystemdCgroup \= false/SystemdCgroup \= true/g' /etc/containerd/config.toml
|
||||
sudo sed -i 's/pause:3.8/pause:3.10/g' /etc/containerd/config.toml
|
||||
|
||||
# restart containerd
|
||||
sudo systemctl restart containerd
|
||||
@@ -65,13 +66,13 @@ echo "Agregando el repositorio de Kubernetes..."
|
||||
### sudo apt-get install apt-transport-https ca-certificates curl -y
|
||||
# If the folder `/etc/apt/keyrings` does not exist, it should be created before the curl command, read the note below.
|
||||
# sudo mkdir -p -m 755 /etc/apt/keyrings
|
||||
curl -fsSL https://pkgs.k8s.io/core:/stable:/v1.30/deb/Release.key | sudo gpg --dearmor -o /etc/apt/keyrings/k8s.gpg
|
||||
##### curl -fsSL https://pkgs.k8s.io/core:/stable:/v1.32/deb/Release.key | sudo gpg --dearmor -o /etc/apt/keyrings/kubernetes-apt-keyring.gpg
|
||||
##### curl -fsSL https://pkgs.k8s.io/core:/stable:/v1.30/deb/Release.key | sudo gpg --dearmor -o /etc/apt/keyrings/k8s.gpg
|
||||
curl -fsSL https://pkgs.k8s.io/core:/stable:/v1.32/deb/Release.key | sudo gpg --dearmor -o /etc/apt/keyrings/kubernetes-apt-keyring.gpg
|
||||
#sudo chmod 644 /etc/apt/keyrings/kubernetes-apt-keyring.gpg # allow unprivileged APT programs to read this keyring
|
||||
|
||||
# This overwrites any existing configuration in /etc/apt/sources.list.d/kubernetes.list
|
||||
echo 'deb [signed-by=/etc/apt/keyrings/k8s.gpg] https://pkgs.k8s.io/core:/stable:/v1.30/deb/ /' | sudo tee /etc/apt/sources.list.d/k8s.list
|
||||
##### echo 'deb [signed-by=/etc/apt/keyrings/kubernetes-apt-keyring.gpg] https://pkgs.k8s.io/core:/stable:/v1.32/deb/ /' | sudo tee /etc/apt/sources.list.d/kubernetes.list
|
||||
##### echo 'deb [signed-by=/etc/apt/keyrings/k8s.gpg] https://pkgs.k8s.io/core:/stable:/v1.30/deb/ /' | sudo tee /etc/apt/sources.list.d/k8s.list
|
||||
echo 'deb [signed-by=/etc/apt/keyrings/kubernetes-apt-keyring.gpg] https://pkgs.k8s.io/core:/stable:/v1.32/deb/ /' | sudo tee /etc/apt/sources.list.d/kubernetes.list
|
||||
#sudo chmod 644 /etc/apt/sources.list.d/kubernetes.list # helps tools such as command-not-found to work correctly
|
||||
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ USER="curso" # Usuario con acceso sudo
|
||||
|
||||
|
||||
echo "Inicializando el nodo maestro..."
|
||||
sudo kubeadm init --control-plane-endpoint=k8scp
|
||||
sudo kubeadm init --control-plane-endpoint=k8scp --upload-certs --pod-network-cidr=192.168.0.0/16
|
||||
|
||||
|
||||
# sudo kubeadm init --pod-network-cidr=174.24.0.0/16 --cri-socket=unix:///run/containerd/containerd.sock --upload-certs --control-plane-endpoint=k8scp
|
||||
|
||||
@@ -2,7 +2,35 @@
|
||||
|
||||
# Variables
|
||||
|
||||
kubectl apply -f https://raw.githubusercontent.com/projectcalico/calico/v3.29.1/manifests/calico.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 create -f custom-resources.yaml
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# kubectl apply -f https://raw.githubusercontent.com/projectcalico/calico/v3.29.1/manifests/calico.yaml
|
||||
|
||||
wget https://raw.githubusercontent.com/projectcalico/calico/v3.29.1/manifests/calico.yaml
|
||||
sed -ie 's/192.168.0.0/172.24.0.0/g' calico.yaml
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
15
5.borra_cluster.sh
Executable file
15
5.borra_cluster.sh
Executable file
@@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Variables
|
||||
|
||||
sudo kubeadm reset -f
|
||||
|
||||
sudo rm -rf /etc/cni/net.d
|
||||
|
||||
sudo ip link show | grep cni
|
||||
sudo ip link delete <nombre-del-bridge>
|
||||
|
||||
sudo rm -rf /var/lib/kubelet /var/lib/dockershim /var/lib/etcd /var/lib/cni
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user