gitops
This commit is contained in:
@@ -1,7 +1,32 @@
|
||||
helm repo add rancher-stable https://releases.rancher.com/server-charts/stable
|
||||
kubectl create namespace cattle-system
|
||||
|
||||
helm install rancher rancher-stable/rancher \
|
||||
helm install rancher rancher-stable/rancher --namespace cattle-system --set hostname=idc.internal --set bootstrapPassword=.... --set ingress.tls.source=rancher
|
||||
|
||||
|
||||
helm upgrade rancher rancher-stable/rancher \
|
||||
--namespace cattle-system \
|
||||
--set hostname=k8s.italiadatacenter.com \
|
||||
--set bootstrapPassword=admin
|
||||
--reuse-values \
|
||||
--set hostname=idc.internal \
|
||||
--set bootstrapPassword=KAYQE1QA7uwUZ8uI \
|
||||
--set ingress.enabled=false \
|
||||
--set ingress.tls.source=rancher
|
||||
|
||||
Poc-25_sts
|
||||
|
||||
POC-25_sts
|
||||
|
||||
vi sistemarancher.sh
|
||||
# 1. recupera il ClusterIP del service "rancher" già creato dal chart
|
||||
CLUSTERIP=$(kubectl get svc -n cattle-system rancher -o jsonpath='{.spec.clusterIP}')
|
||||
|
||||
# 2. patch del deployment per aggiungere hostAliases
|
||||
kubectl patch deployment rancher -n cattle-system --type='json' \
|
||||
-p="[{\"op\":\"add\",\"path\":\"/spec/template/spec/hostAliases\",\"value\":[{\"ip\":\"$CLUSTERIP\",\"hostnames\":[\"idc.internal\"]}]}]"
|
||||
|
||||
# 3. crea il service NodePort per l'accesso dal browser
|
||||
kubectl expose deployment rancher -n cattle-system --type=NodePort --port=443 --target-port=443 --name=rancher-nodeport
|
||||
|
||||
# 4. riavvia e segui i log
|
||||
kubectl rollout restart deployment rancher -n cattle-system
|
||||
kubectl -n cattle-system logs -l app=rancher -f
|
||||
Reference in New Issue
Block a user