Installare un Bare Metal Cluster Kubernetes per testing e produzione senza utilizzare nessun servizio di terze parti (load balancer, storage, etc.).
Riflessioni, guide e work in progress.
- HA storage
- Load balancing dei worker (Metallb)
- Certificate issuer (Cert-manager)
- CI/CD
Generare chiave ssh sul primo nodo:
ssh-keygen
Copiare la chiave ssh su tutti gli altri nodi:
ssh-copy-id [email protected]
ssh-copy-id [email protected]
ssh-copy-id [email protected]
ssh-copy-id [email protected]
ssh-copy-id [email protected]
ssh-copy-id [email protected]
ssh-copy-id [email protected]
ssh-copy-id [email protected]
Installare juju:
sudo snap install juju --classic
Creare il cloud:
juju add-cloud
Fare il bootstrap del controller:
juju bootstrap cloud_name manual_controller_name
Aggiungere le macchine al cloud creato:
juju add-machine ssh:[email protected]
juju add-machine ssh:[email protected]
juju add-machine ssh:[email protected]
juju add-machine ssh:[email protected]
juju add-machine ssh:[email protected]
juju add-machine ssh:[email protected]
juju add-machine ssh:[email protected]
juju add-machine ssh:[email protected]
juju add-machine ssh:[email protected]
Fare il deploy di Charmed Kubernetes sul nodo dove è installato juju:
juju deploy charmed-kubernetes --map-machines=existing
Scaricare il modello custom sul nodo dove è installato juju e fare il deploy:
wget https://raw.githubusercontent.com/lascuolaopensource/pala-cluster/main/charmed-k8s-9nodi-180421.yaml
juju deploy ./*.yaml --map-machines=existing
juju add-unit -n 1 kubernetes-master --to 4
juju add-unit -n 2 kubeapi-load-balancer --to 4,5
juju deploy hacluster --series focal
juju config kubeapi-load-balancer ha-cluster-vip="192.168.1.10 192.168.1.11"
juju relate kubeapi-load-balancer hacluster
Rimuovere cloud, modelli e controller (sperimentale)
juju destroy-model "MODEL_NAME"
juju destroy-contoller "CONTROLLER_NAME"
juju remove-cloud "CLOUD_NAME"
sudo /sbin/remove-juju-services
rm ~/.kube/config
rm /home/ubuntu/*