Rancher 2 snippets: best practices, backup, Prometheus…
2 min readJun 22, 2020
Original Post : weareopensource.me (only the original post is updated)
We will quickly recap some practices steps to manage a Rancher quickly & cleanly. I will update these snippets over time, keep in mind it’s just personnal snippets :).
Backup
nano cluster.yml
> services:
> etcd:
> backup_config:
> enabled: true # enables recurring etcd snapshots
> interval_hours: 12 # time increment between snapshots
> retention: 50 # time in days before snapshot purge
Monitoring
You just need to activate prometheus, do not be afraid to launch, all worloads may take 5 minutes to be functional.
Upgrade
# requirments
export KUBECONFIG=$(pwd)/kube_config_rancher-cluster.yml
helm repo add rancher-latest https://releases.rancher.com/server-charts/latest
helm repo list
# upgrade
helm repo update
helm fetch rancher-latest/rancher
helm get values rancher -n cattle-system
helm upgrade rancher rancher-latest/rancher \
--namespace cattle-system \
--set hostname=rancher.my.org
Health Checks
Vue Stack :
Node Stack :
PV released to Available
kubectl patch pv my-pv-name -p '{"spec":{"claimRef": null}}'
Links
weareopensource.me | Slack | Waos Discord | My Mail | My Github | My Twitter | My Youtube | My Linkedin
Feel free to help us ! :)