From 6414e44798324febc58c7ed0a80cf6299f1f1f51 Mon Sep 17 00:00:00 2001 From: Celestino Rey Date: Sun, 16 Oct 2022 12:02:36 +0200 Subject: [PATCH] =?UTF-8?q?A=C3=B1ado=20instrucciones=20de=20c=C3=B3mo=20c?= =?UTF-8?q?rear=20el=20cluster.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CreaCluster/README.md | 7 +++++++ CreaCluster/confirmaRunning.sh | 1 + CreaCluster/creaCalico.sh | 3 +++ CreaCluster/creaConfigCluster.sh | 4 ++++ CreaCluster/inicializaCluster.sh | 1 + CreaCluster/masterEsWorker.sh | 1 + Nginx/creaTodo.sh | 3 +++ 7 files changed, 20 insertions(+) create mode 100644 CreaCluster/README.md create mode 100644 CreaCluster/confirmaRunning.sh create mode 100644 CreaCluster/creaCalico.sh create mode 100644 CreaCluster/creaConfigCluster.sh create mode 100644 CreaCluster/inicializaCluster.sh create mode 100644 CreaCluster/masterEsWorker.sh create mode 100755 Nginx/creaTodo.sh diff --git a/CreaCluster/README.md b/CreaCluster/README.md new file mode 100644 index 00000000..0e38770e --- /dev/null +++ b/CreaCluster/README.md @@ -0,0 +1,7 @@ +## Instrucciones para crear el cluster + +https://computingforgeeks.com/deploy-kubernetes-cluster-on-ubuntu-with-kubeadm/ + +## Como resetearlo + +https://www.techrunnr.com/how-to-reset-kubernetes-cluster/ diff --git a/CreaCluster/confirmaRunning.sh b/CreaCluster/confirmaRunning.sh new file mode 100644 index 00000000..2a710b5d --- /dev/null +++ b/CreaCluster/confirmaRunning.sh @@ -0,0 +1 @@ +kubectl get nodes -o wide diff --git a/CreaCluster/creaCalico.sh b/CreaCluster/creaCalico.sh new file mode 100644 index 00000000..aab0b0b0 --- /dev/null +++ b/CreaCluster/creaCalico.sh @@ -0,0 +1,3 @@ +kubectl create -f https://docs.projectcalico.org/manifests/tigera-operator.yaml +kubectl create -f https://docs.projectcalico.org/manifests/custom-resources.yaml + diff --git a/CreaCluster/creaConfigCluster.sh b/CreaCluster/creaConfigCluster.sh new file mode 100644 index 00000000..a5a66881 --- /dev/null +++ b/CreaCluster/creaConfigCluster.sh @@ -0,0 +1,4 @@ +mkdir -p $HOME/.kube +sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config +sudo chown $(id -u):$(id -g) $HOME/.kube/config + diff --git a/CreaCluster/inicializaCluster.sh b/CreaCluster/inicializaCluster.sh new file mode 100644 index 00000000..b1aa6cc5 --- /dev/null +++ b/CreaCluster/inicializaCluster.sh @@ -0,0 +1 @@ +sudo kubeadm init --pod-network-cidr=192.168.0.0/16 --upload-certs --control-plane-endpoint=k8s-server diff --git a/CreaCluster/masterEsWorker.sh b/CreaCluster/masterEsWorker.sh new file mode 100644 index 00000000..7c22f235 --- /dev/null +++ b/CreaCluster/masterEsWorker.sh @@ -0,0 +1 @@ +kubectl taint nodes --all node-role.kubernetes.io/master- diff --git a/Nginx/creaTodo.sh b/Nginx/creaTodo.sh new file mode 100755 index 00000000..92c95ec4 --- /dev/null +++ b/Nginx/creaTodo.sh @@ -0,0 +1,3 @@ +kubectl create -f pv-local-nginx.yaml +kubectl create -k ./ +watch kubectl get all