Eliminado archivos de documentacion duplicados.
This commit is contained in:
@ -1,34 +0,0 @@
|
|||||||
# Agregando volumen con NFS
|
|
||||||
|
|
||||||
## Agrega soporte en el host para NFS
|
|
||||||
|
|
||||||
```bash
|
|
||||||
sudo apt update
|
|
||||||
sudo apt install nfs-common -y
|
|
||||||
microk8s enable dns
|
|
||||||
```
|
|
||||||
|
|
||||||
## Crea un PV y un PVC
|
|
||||||
|
|
||||||
Usa como base [02-pv-pvc.yaml](../infrastructure/02-pv-pvc.yaml).
|
|
||||||
|
|
||||||
## Usa el PVC en algún pod o deployment
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
apiVersion: v1
|
|
||||||
kind: Pod
|
|
||||||
metadata:
|
|
||||||
name: nfs-test-pod
|
|
||||||
spec:
|
|
||||||
containers:
|
|
||||||
- name: app
|
|
||||||
image: busybox
|
|
||||||
command: ["sleep", "3600"]
|
|
||||||
volumeMounts:
|
|
||||||
- mountPath: "/mnt/data"
|
|
||||||
name: nfs-vol
|
|
||||||
volumes:
|
|
||||||
- name: nfs-vol
|
|
||||||
persistentVolumeClaim:
|
|
||||||
claimName: pvc-nfs-synology
|
|
||||||
```
|
|
@ -1,32 +0,0 @@
|
|||||||
# Configuración de Servidor (API) y Cliente de kubectl
|
|
||||||
|
|
||||||
## Agregar Nombre Alternativo de Sujeto (SAN) al Certificado del Servidor API
|
|
||||||
|
|
||||||
```bash
|
|
||||||
sudo vim /var/snap/microk8s/current/certs/csr.conf.template
|
|
||||||
# Edita la sección [ alt_names ] y agrega tu nombre de host.
|
|
||||||
|
|
||||||
sudo microk8s refresh-certs --cert server.crt
|
|
||||||
sudo openssl x509 -in /var/snap/microk8s/current/certs/server.crt -noout -text | grep -A1 "Subject Alternative Name"
|
|
||||||
sudo microk8s stop
|
|
||||||
sudo microk8s start
|
|
||||||
```
|
|
||||||
|
|
||||||
## Configuración para Acceso Externo
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# Configura tu Servidor Proxy (Ej. Nginx en Synology)
|
|
||||||
sudo microk8s kubectl create serviceaccount proxy-user -n kube-system
|
|
||||||
sudo microk8s kubectl create clusterrolebinding proxy-admin-binding --clusterrole=cluster-admin --serviceaccount=kube-system:proxy-user
|
|
||||||
sudo microk8s kubectl create token proxy-user -n kube-system --duration=876000h
|
|
||||||
```
|
|
||||||
|
|
||||||
## Configuración del Cliente `kubectl`
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
# Modifica el archivo ~/.kube/config para usar el token y el servidor proxy.
|
|
||||||
users:
|
|
||||||
- name: microk8s-user
|
|
||||||
user:
|
|
||||||
token: "AQUI_VA_EL_TOKEN_COPIADO_DEL_PASO_7.2.2"
|
|
||||||
```
|
|
@ -1,15 +0,0 @@
|
|||||||
# Configuración básica del sistema
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# Actualiza los repositorios e instala herramientas básicas
|
|
||||||
sudo apt update
|
|
||||||
sudo apt install iputils-ping
|
|
||||||
sudo apt install qemu-guest-agent
|
|
||||||
sudo apt install vim
|
|
||||||
|
|
||||||
# Inicia el agente QEMU
|
|
||||||
sudo systemctl start qemu-guest-agent
|
|
||||||
|
|
||||||
# Verifica la conectividad
|
|
||||||
ping google.com
|
|
||||||
```
|
|
@ -1,12 +0,0 @@
|
|||||||
# Configuración de MicroK8s
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# Verifica el estado de los nodos de Kubernetes
|
|
||||||
sudo microk8s.kubectl get nodes
|
|
||||||
|
|
||||||
# Configura los permisos necesarios
|
|
||||||
sudo usermod -a -G microk8s $USER
|
|
||||||
sudo chown -f -R $USER ~/.kube
|
|
||||||
# Cierra sesión y vuelve a entrar, o ejecuta:
|
|
||||||
newgrp microk8s
|
|
||||||
```
|
|
@ -1,14 +0,0 @@
|
|||||||
# Configuración de roles en los nodos
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# Etiqueta el nodo master con el rol master
|
|
||||||
kubectl label node master node-role.kubernetes.io/master=""
|
|
||||||
|
|
||||||
# Etiqueta el nodo worker con el rol worker
|
|
||||||
kubectl label node worker node-role.kubernetes.io/worker=""
|
|
||||||
|
|
||||||
# NOTA: Sustituye master y worker por los nombres reales que te dé kubectl get nodes
|
|
||||||
|
|
||||||
# Para que el master no ejecute workloads, aplica el taint:
|
|
||||||
kubectl taint nodes master node-role.kubernetes.io/master=:NoSchedule
|
|
||||||
```
|
|
@ -1,18 +0,0 @@
|
|||||||
# Crear alias para kubectl
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# Abre el archivo .bashrc con vim
|
|
||||||
vim ~/.bashrc
|
|
||||||
|
|
||||||
# Agrega al final del archivo la siguiente línea:
|
|
||||||
alias kubectl='microk8s.kubectl'
|
|
||||||
|
|
||||||
# Para guardar y salir de vim:
|
|
||||||
# Presiona ESC, luego escribe :wq y presiona Enter
|
|
||||||
|
|
||||||
# Aplica los cambios inmediatamente
|
|
||||||
source ~/.bashrc
|
|
||||||
|
|
||||||
# Prueba el alias
|
|
||||||
kubectl get nodes
|
|
||||||
```
|
|
@ -1,5 +0,0 @@
|
|||||||
# Preparación del sistema
|
|
||||||
|
|
||||||
- Descarga el ISO de Ubuntu Server LTS ([https://ubuntu.com/download/server](https://ubuntu.com/download/server))
|
|
||||||
- Instala Ubuntu server en Virtual Box o cualquier VM Manager. En el caso del taller usaré 2 VMs: un master node y un worker. (Nota: recomiendo instalar la versión minimalista para que no use muchos recursos)
|
|
||||||
- Al momento de la instalación, agrega microk8s.
|
|
@ -32,3 +32,5 @@ spec:
|
|||||||
persistentVolumeClaim:
|
persistentVolumeClaim:
|
||||||
claimName: pvc-nfs-synology
|
claimName: pvc-nfs-synology
|
||||||
```
|
```
|
||||||
|
|
||||||
|
[Volver al README principal](../../README.md)
|
||||||
|
@ -30,3 +30,5 @@ users:
|
|||||||
user:
|
user:
|
||||||
token: "AQUI_VA_EL_TOKEN_COPIADO_DEL_PASO_7.2.2"
|
token: "AQUI_VA_EL_TOKEN_COPIADO_DEL_PASO_7.2.2"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
[Volver al README principal](../../README.md)
|
||||||
|
@ -13,3 +13,5 @@ sudo systemctl start qemu-guest-agent
|
|||||||
# Verifica la conectividad
|
# Verifica la conectividad
|
||||||
ping google.com
|
ping google.com
|
||||||
```
|
```
|
||||||
|
|
||||||
|
[Volver al README principal](../../README.md)
|
||||||
|
@ -10,3 +10,5 @@ sudo chown -f -R $USER ~/.kube
|
|||||||
# Cierra sesión y vuelve a entrar, o ejecuta:
|
# Cierra sesión y vuelve a entrar, o ejecuta:
|
||||||
newgrp microk8s
|
newgrp microk8s
|
||||||
```
|
```
|
||||||
|
|
||||||
|
[Volver al README principal](../../README.md)
|
||||||
|
@ -12,3 +12,5 @@ kubectl label node worker node-role.kubernetes.io/worker=""
|
|||||||
# Para que el master no ejecute workloads, aplica el taint:
|
# Para que el master no ejecute workloads, aplica el taint:
|
||||||
kubectl taint nodes master node-role.kubernetes.io/master=:NoSchedule
|
kubectl taint nodes master node-role.kubernetes.io/master=:NoSchedule
|
||||||
```
|
```
|
||||||
|
|
||||||
|
[Volver al README principal](../../README.md)
|
||||||
|
@ -16,3 +16,5 @@ source ~/.bashrc
|
|||||||
# Prueba el alias
|
# Prueba el alias
|
||||||
kubectl get nodes
|
kubectl get nodes
|
||||||
```
|
```
|
||||||
|
|
||||||
|
[Volver al README principal](../../README.md)
|
||||||
|
@ -3,3 +3,5 @@
|
|||||||
- Descarga el ISO de Ubuntu Server LTS ([https://ubuntu.com/download/server](https://ubuntu.com/download/server))
|
- Descarga el ISO de Ubuntu Server LTS ([https://ubuntu.com/download/server](https://ubuntu.com/download/server))
|
||||||
- Instala Ubuntu server en Virtual Box o cualquier VM Manager. En el caso del taller usaré 2 VMs: un master node y un worker. (Nota: recomiendo instalar la versión minimalista para que no use muchos recursos)
|
- Instala Ubuntu server en Virtual Box o cualquier VM Manager. En el caso del taller usaré 2 VMs: un master node y un worker. (Nota: recomiendo instalar la versión minimalista para que no use muchos recursos)
|
||||||
- Al momento de la instalación, agrega microk8s para pruebas.
|
- Al momento de la instalación, agrega microk8s para pruebas.
|
||||||
|
|
||||||
|
[Volver al README principal](../../README.md)
|
||||||
|
@ -19,3 +19,5 @@ microk8s join 10.193.246.117:25000/da161908973ee3cfa5391df5fee8dcfa/a336d9e7b90a
|
|||||||
# Verifica el estado desde el master
|
# Verifica el estado desde el master
|
||||||
microk8s kubectl get nodes
|
microk8s kubectl get nodes
|
||||||
```
|
```
|
||||||
|
|
||||||
|
[Volver al README principal](../../README.md)
|
||||||
|
@ -1,21 +0,0 @@
|
|||||||
# Unir nodos al cluster
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# En el nodo master: crea un token de unión
|
|
||||||
microk8s add-node
|
|
||||||
|
|
||||||
# Esto mostrará una salida parecida a:
|
|
||||||
# From the node you wish to join to this cluster, run the following:
|
|
||||||
# microk8s join 10.193.246.117:25000/da161908973ee3cfa5391df5fee8dcfa/a336d9e7b90a
|
|
||||||
#
|
|
||||||
# Use the '--worker' flag to join a node as a worker not running the control plane, eg:
|
|
||||||
# microk8s join 10.193.246.117:25000/da161908973ee3cfa5391df5fee8dcfa/a336d9e7b90a --worker
|
|
||||||
|
|
||||||
# En el nodo worker: únete al cluster usando el comando adecuado
|
|
||||||
microk8s join 10.193.246.117:25000/da161908973ee3cfa5391df5fee8dcfa/a336d9e7b90a --worker
|
|
||||||
|
|
||||||
# NOTA: Asegúrate de que el nodo master tenga abierto el puerto 25000 (TCP).
|
|
||||||
|
|
||||||
# Verifica el estado desde el master
|
|
||||||
microk8s kubectl get nodes
|
|
||||||
```
|
|
Reference in New Issue
Block a user