This commit is contained in:
alessandro
2026-07-17 09:42:52 +02:00
commit 20d506407a
93 changed files with 14526 additions and 0 deletions

59
utils.txt Normal file
View File

@@ -0,0 +1,59 @@
#master node
cd /etc/rancher/rke2/
sudo systemctl restart rke2-server.service
journalctl -xeu rke2-server.service -f
#worker node
sudo systemctl restart rke2-agent.service
sudo systemctl stop rke2-agent.service
sudo systemctl start rke2-agent.service
journalctl -xeu rke2-agent.service -f
cat /var/lib/rancher/rke2/agent/logs/kubelet.log
#load balancer
/etc/haproxy/haproxy.cfg
sudo systemctl restart haproxy
journalctl -xeu haproxy.service -f
tail -f /var/log/haproxy.log
http://<load balancer vm external ip>:8080/stats (admin/admin)
Console rancher: https://rancher.pigreco66.it/ (AdminJapp0cam)
************Check risorse***************
kubectl resource-capacity
kubectl create -n demo-apps -f - <<EOF
apiVersion: v1
kind: Pod
metadata:
name: swiss-army-knife
labels:
app: swiss-army-knife
spec:
containers:
- name: swiss-army-knife
image: leodotcloud/swiss-army-knife:latest
command: ["/bin/sleep", "3650d"]
imagePullPolicy: IfNotPresent
restartPolicy: Always
EOF
kubectl -n demo-apps exec -it swiss-army-knife -- sh
# Source - https://stackoverflow.com/a/59558862
# Posted by P Ekambaram, modified by community. See post 'Timeline' for change history
# Retrieved 2026-02-28, License - CC BY-SA 4.0
gateway-nginx-nodeport.nginx-gateway.svc.cluster.local:30864
kubectl exec -n nginx-gateway main-gateway-nginx-6968db7f9f-6v4qg -- ss -tulnp
kubectl edit gateway main-gateway -n nginx-gateway
glpat-E67BjdXoKvSEgHG31XZW0GM6MQpvOjEKdTozNzF5OQ8.01.171191k74