Rancher 2 - best practices, backup, Prometheus...
We will recap some practices steps to manage a Rancher quickly & cleanly. I will update these snippets ...
We will recap some practice steps to manage a Rancher quickly & cleanly. I will update these snippets over time. Keep in mind it's just personal 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=MYHOSTNAME
Health Checks
Vue Stack :
Node Stack :
PV Released to Available
kubectl patch pv my-pv-name -p '{"spec":{"claimRef": null}}'