Last active
November 28, 2019 01:25
-
-
Save chuegel/22b590954123b312689bc6cbb9577b58 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# check supported k8s versions | |
rke config --list-version --all | |
# upgrade rancher via helm | |
helm repo update | |
helm get values rancher # use values below with set | |
helm upgrade rancher rancher-stable/rancher \ | |
--set hostname=k8smgmt.xxxx.com \ | |
--set ingress.tls.source=secret \ | |
--set proxy=http://10.2.3.124:3128 \ | |
--set noproxy="127.0.0.0/8\,10.2.0.0/16\,172.17.0.0/16" | |
# enable rancher debugging | |
kubectl -n cattle-system get pods -l app=rancher | grep '1/1' | awk '{ print $1 }' | xargs -I{} kubectl --kubeconfig $KUBECONFIG -n cattle-system exec {} -- loglevel --set debug | |
kubectl --kubeconfig $KUBECONFIG -n cattle-system logs -l app=rancher | |
#disable rancher debugging | |
kubectl -n cattle-system get pods -l app=rancher | grep '1/1' | awk '{ print $1 }' | xargs -I{} kubectl --kubeconfig $KUBECONFIG -n cattle-system exec {} -- loglevel --set info | |
# delete all evicted pods from all namespaces | |
kubectl get pods --all-namespaces | grep Evicted | awk '{print $2 " --namespace=" $1}' | xargs kubectl delete pod | |
# take one-time etcd snapshot | |
rke etcd snapshot-save --name <SNAPSHOT.db> --config rancher-cluster.yaml |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment